element-ui 动态控制树形菜单 default-expand-all 实现展开/关闭功能
伪代码如下:
//业务代码 js如下:
handleOpen() { //展开 this.refreshTree = false; this.isExpand = true; this.$nextTick(() => { this.refreshTree = true; }); }, handleClose() { //收起 this.refreshTree = false; this.isExpand = false; this.$nextTick(() => { this.refreshTree = true; }); },
合并

展开
版权声明:本文为weixin_29275257原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。