Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 当数据动态绑定以后,dataList的Length没变化,界面不刷新 #41

Closed
light499960904 opened this issue May 24, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@light499960904
Copy link

Describe the bug
清空DataList,重新赋值(数据长度一致),页面不变
image
image

@light499960904 light499960904 added the bug Something isn't working label May 24, 2023
@xpyjs xpyjs closed this as completed in c3cb633 May 24, 2023
@imlinhanchao
Copy link

发现得吧 data 置空,然后再 nextTick 设置才能正常刷新数据。比如这样:

data.value = [];
nextTick(() => {
      data.value = rsp,data;
});

而直接赋值则无法联动,比如:

data.value = rsp,data;

xpyjs pushed a commit that referenced this issue May 31, 2023
@jeremyjone
Copy link
Collaborator

参考 demo @imlinhanchao

reactive 替换 ref 的方式我也试了,同样没有问题。如果还有问题,给我一个示例

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants