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

The [Bug Report] tree component removes nodes directly from the data operation, and the components are not updated. #12421

Closed
shuaiyaotian opened this issue Aug 20, 2018 · 3 comments
Assignees

Comments

@shuaiyaotian
Copy link

Element UI version

2.4.6

OS/Browsers version

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3526.0 Safari/537.36

Vue version

2.5.17

Reproduction Link

https://jsfiddle.net/yt5jnqrm/

Steps to reproduce

  1. 点击删除按钮,data已经更新,但界面上tree的节点没有被删除
  2. 点击增加按钮,data已更新,按钮新增,之前删除的节点仍然可以看到

What is Expected?

期望直接操作数据,界面与数据同步。

What is actually happening?

直接操作数据删除节点,界面没有同步。

@element-bot element-bot changed the title [Bug Report] tree组件直接对data操作删除节点,组件不更新 The [Bug Report] tree component removes nodes directly from the data operation, and the components are not updated. Aug 20, 2018
@element-bot
Copy link
Member

Translation of this issue:

Element UI version
2.4.6

OS/Browsers version
Mozilla / 5.0 (Macintosh; Intel Mac OS X 10_13_6) Apple WebKit / 537.36 (KHTML, like Gecko) Chrome / 70.0.3526.0 Safari / 537.36

Vue version
2.5.17

Reproduction Link
https://jsfiddle.net/yt5jnqrm/

Steps to reproduce

  1. click the delete button, data has been updated, but the tree node on the interface has not been deleted.

  2. click the Add button, data has been updated, the button is added, and the deleted nodes can still be seen.
    What is Expected?

It is expected to directly manipulate data and synchronize interface with data.
What is actually happening?

Direct operation of data deletion nodes, interface is not synchronized.

@huahaichuan
Copy link

try this.$refs.tree.remove(data);

@TY-LIU
Copy link

TY-LIU commented Aug 31, 2018

@ziyoung 我也遇到同样的问题,element升级到了2.4.6出现的问题。官网上的文档删除按钮也失效了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants