Open rplss opened 3 years ago
Translation of this issue:
2.15.3
macOS Big Sur 11.4
2.6.14
https://codepen.io/pen/nothing-here
Use V-model to bind a cascading menu using lazpayload, such as the initial value of 1 / 2 / 3
Set the value in the parent component to the value of other levels, such as 1 / 5 / 9 The cascading menu cannot be echoed at this time
It can be displayed normally
When using lazpayload, the cascade has no response to the change of V-model binding value
You can call ref.panel.initstore to reload options But loadcount is not duplicated
const nodeValue = this.checkedValue[this.loadCount ]; Incorrect value This.loadcount needs to be reset to 0 during visual initstore execution
遇到相同问题,用以下代码解决了:
_self.$refs['cascader'][0].$refs['panel'].activePath = []
Element UI version
2.15.3
OS/Browsers version
macOS Big Sur 11.4
Vue version
2.6.14
Reproduction Link
https://codepen.io/pen/nothing-here
Steps to reproduce
What is Expected?
可以正常回显
What is actually happening?
使用 lazyload 时 cascader 对 v-model 绑定的值改变无反应 此时可以调用 ref.panel.initStore 重新加载 options 但是 loadCount 没有重制 const nodeValue = this.checkedValue[this.loadCount ]; 取值不正确 目测 initStore 执行时 this.loadCount 需要重制为 0