[bug report] error is reported after the options are changed after the cascader component is selected
- Dominant language
- Vue
- Stars
- 54k
- Forks
- 14.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Element UI version
2.13.0
### OS/Browsers version
Chrome
### Vue version
2.6.10
### Reproduction Link
https://elementui.github.io/issue-generator/#/zh-CN/莫得
### Steps to reproduce
级联选择器 Cascader,
更新 options 属性,
选择某个子节点,
更新options 属性,
报错。
Error in callback for watcher "options": "TypeError: Cannot read property 'level' of null"
found in
---> at packages/cascader-panel/src/cascader-panel.vue
at packages/cascader/src/cascader.vue
--------------------------------------------------------------------
vue.runtime.esm.js:1888 TypeError: Cannot read property 'level' of null
at VueComponent.handleExpand (cascader-panel.js:1368)
at cascader-panel.js:1312
at Array.forEach ()
at VueComponent.expandNodes (cascader-panel.js:1311)
at VueComponent.syncActivePath (cascader-panel.js:1297)
at VueComponent.syncMenuState (cascader-panel.js:1270)
at VueComponent.initStore (cascader-panel.js:1254)
at VueComponent.handler (cascader-panel.js:1219)
at Watcher.run (vue.runtime.esm.js:4562)
at flushSchedulerQueue (vue.runtime.esm.js:4304)
--------------------------------------------------------------------
vue.runtime.esm.js:619 [Vue warn]: Error in callback for watcher "value": "TypeError: Cannot read property 'level' of null"
found in
---> at packages/cascader-panel/src/cascader-panel.vue
at packages/cascader/src/cascader.vue
--------------------------------------------------------------------
vue.runtime.esm.js:1888 TypeError: Cannot read property 'level' of null
at VueComponent.handleExpand (cascader-panel.js:1368)
at cascader-panel.js:1312
at Array.forEach ()
at VueComponent.expandNodes (cascader-panel.js:1311)
at VueComponent.syncActivePath (cascader-panel.js:1297)
at VueComponent.syncMenuState (cascader-panel.js:1270)
at VueComponent.syncCheckedValue (cascader-panel.js:1263)
at VueComponent.value (cascader-panel.js:1225)
at Watcher.run (vue.runtime.esm.js:4562)
at flushSchedulerQueue (vue.runtime.esm.js:4304)
### What is Expected?
期待 可一动态更新 options 属性 使 Cascader 可以动态更新。
### What is actually happening?
实际可以动态更新,可是会报错,期待无报错。
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.