ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.13k stars 14.64k forks source link

[bug report] the emitpath property of El cascade is set to false, and the value obtained is not the value of the last node #20594

Open elevenwangyang opened 3 years ago

elevenwangyang commented 3 years ago

Element UI version

2.14.1

OS/Browsers version

win10

Vue version

2.6.10

Reproduction Link

https://codepen.io/eleven-wang/pen/LYRjyrp

Steps to reproduce

将emit-path设置为"false",change方法触发的时候打印出value的值

What is Expected?

返回应该是该节点的值

What is actually happening?

实际返回由该节点所在的各级菜单的值所组成的数组

element-bot commented 3 years ago

Translation of this issue:

Element UI version

2.14.1

OS/Browsers version

win10

Vue version

2.6.10

Reproduction Link

https://codepen.io/eleven-wang/pen/LYRjyrp

Steps to reproduce

Set emit path to "false" and print the value when the change method is triggered

What is Expected?

Returns the value that should be the node

What is actually happening?

The actual return is an array composed of the values of all levels of the menu where the node is located

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.