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

Created on 20 Aug 2018  ·  3Comments  ·  Source: ElemeFE/element

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?

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

tree

Most helpful comment

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

All 3 comments

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.
  1. 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.

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chenzhe-pro picture chenzhe-pro  ·  3Comments

yubo111 picture yubo111  ·  3Comments

chao-hua picture chao-hua  ·  3Comments

akaylh picture akaylh  ·  3Comments

yuchonghua picture yuchonghua  ·  3Comments