赞
踩
-
-
- checkChange(flag) { // 点击切换状态、展开|收起
- this.isUnfold({ data: this.data, flag })
- },
- isUnfold({ data, flag }) { // 全部展开or收起
- const that = this
- data.forEach((el) => {
- that.$refs.tree[0].store.nodesMap[el.id].expanded = flag
- if (el.children && el.children.length > 0) {
- that.isUnfold({ data: el.children, flag })
- }
- })
- },
- <el-checkbox
- v-model="checked"@change="checkChange">
- 全部展开|收起
- </el-checkbox>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。