节点重构
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<el-container>
|
||||
<el-aside>
|
||||
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small" style="margin-bottom: 10px" clearable />
|
||||
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small" style="margin-bottom: 10px" clearable/>
|
||||
<el-tree class="filter-tree" :data="groupList" @node-click="nodeClick" node-key="id" highlight-current :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree" :default-expanded-keys="[0]">
|
||||
<span class="custom-tree-node" slot-scope="{ node, data }" v-if="groupState !== 'list' && editId === data.id">
|
||||
<span>
|
||||
@@ -102,8 +102,10 @@ export default {
|
||||
});
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.groupId = res.data[0].id;
|
||||
this.$refs.tree.setCurrentKey(this.groupId);
|
||||
this.$emit('click', this.groupId);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tree.setCurrentKey(this.groupId);
|
||||
this.$emit('click', this.groupId);
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user