|
@@ -721,13 +721,14 @@
|
|
|
// 默认选中第一个节点
|
|
// 默认选中第一个节点
|
|
|
this.treeNode = this.typeTree.length > 0 ? this.typeTree[0] : null;
|
|
this.treeNode = this.typeTree.length > 0 ? this.typeTree[0] : null;
|
|
|
// console.log('this.treeNode`1111111111111111111111`', this.treeNode);
|
|
// console.log('this.treeNode`1111111111111111111111`', this.treeNode);
|
|
|
- if (this.treeNode) {
|
|
|
|
|
- // 默认选中节点
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 默认选中节点
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ if (this.treeNode) {
|
|
|
this.$refs.treeRef.setCurrentKey(this.treeNode.id);
|
|
this.$refs.treeRef.setCurrentKey(this.treeNode.id);
|
|
|
- this.reload();
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ this.reload();
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
console.log('typeTree', this.typeTree);
|
|
console.log('typeTree', this.typeTree);
|