Element UI version
2.13.2
OS/Browsers version
Mac/Chrome 84.0.4147.105
Vue version
2.6.11
Reproduction Link
https://codepen.io/thj2/pen/yLOerdR
Steps to reproduce
1.点击全部
2.点击其他选项就会报错
3.不能删除
What is Expected?
修改 element-ui->lib->casader-panel.js 下
handleExpand: function handleExpand(node, silent) {}
在此方法中判断node是否为空
if(!node)return
不知道什么原因我在@chang方法中二次修改后node为空
在1294行 var nodes = activePath.map(function (node) {
return _this2.getNodeByValue(node.getValue());
});
nodes为 []导致后面的错误
What is actually happening?
统一报错(TypeError: Cannot read property 'level' of null)
版本element-ui 2.10.0是可以的
2条答案
按热度按时间iecba09b1#
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.
jdzmm42g2#
是将options清空导致的。
里面有bug,options清空后,activePath没有清空,内部使用activePath去查找就会找不到成为null导致。
将options清空前先执行