From 7c7a6b5904c789cfc0fbd58a311718bfe3d98ee9 Mon Sep 17 00:00:00 2001 From: ysn <2126564605@qq.com> Date: Mon, 15 Jun 2026 10:14:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=AE=AF=E5=BD=95-=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9E=B6=E6=9E=84-=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=89=93=E5=BC=80=E4=B8=80=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/contacts/index.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/views/contacts/index.vue b/src/views/contacts/index.vue index 0fb12f3..a9dff30 100644 --- a/src/views/contacts/index.vue +++ b/src/views/contacts/index.vue @@ -16,7 +16,7 @@ ref="orgTree" :data="treeData" :props="treeProps" - default-expand-all + :default-expanded-keys="defaultExpandedKeys" highlight-current node-key="id" @node-click="handleNodeClick" @@ -143,6 +143,7 @@ export default { return { treeData: [], treeProps: { label: "name", children: "child" }, + defaultExpandedKeys: [], currentGroupId: null, currentStructureName: "", memberList: [], @@ -200,7 +201,9 @@ export default { async fetchOrgTree() { try { const { data } = await getGroupsList(); - this.treeData =data.list + this.treeData = data.list; + // 默认只展开一级节点 + this.defaultExpandedKeys = this.treeData.map((node) => node.id); if (!this.userGroupId) return; const parentKeys = this.findParentKeys(this.treeData, this.userGroupId); this.$nextTick(() => { @@ -447,6 +450,14 @@ export default { flex-shrink: 0; } } + .load-more { + padding: 12px; + text-align: center; + .loading-text { + font-size: 12px; + color: #909399; + } + } } } // 右侧详情