element-plus [Bug Report] [Component] [tree] Tree doesn't refreshes on data update when props object has an uppercase name {children: 'Children', ...}

djp7away  于 2022-11-05  发布在  其他
关注(0)|答案(1)|浏览(237)

Bug Type:Component

Environment

  • Vue Version: 3.2.33
  • Element Plus Version: 2.1.11
  • Browser / OS: Chrome 100.0.4896.127
  • Build Tool: Vue CLI

Reproduction

  • el-tree

Element Plus Playground

Steps to reproduce

In the reproduction example, if I press the 'Add node' button I expect to see the new node as child of node 'Level one 1'.

Bug happens when the props object has for children property an uppercase string value like 'Children'.
defaultProps: {
children: 'Children',
label: 'label',
}

In the reproduction example, if the data and defaultProps objects are modified to contain lowercase property name 'children', the tree updates correctly when new nodes are added using the Add node button.

What is Expected?

Tree should refresh on data updates.

What is actually happening?

Tree doesn't refreshes on data updates.

Additional comments

  • (empty)*
w8f9ii69

w8f9ii691#

Me too, i change props like

{
        label: 'name',
        children: 'dirchildren',
        disabled: '',
 }

Then change child node data, UI will not update。

相关问题