From fa8ba4260f5f1b4e50c590bb3a8d1417b4bad212 Mon Sep 17 00:00:00 2001 From: danshihao Date: Tue, 12 Dec 2023 17:53:22 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=B7=A5=E4=BD=9C=E7=BB=84=E5=8D=95?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../selection/WorkGroupSelectionModal.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/selection/WorkGroupSelectionModal.vue b/src/components/selection/WorkGroupSelectionModal.vue index 43f544c5..7376c2d9 100644 --- a/src/components/selection/WorkGroupSelectionModal.vue +++ b/src/components/selection/WorkGroupSelectionModal.vue @@ -92,7 +92,8 @@ export default { treeScreenClass () { return { 'my-dept-select-tree': true, - fullscreen: this.fullscreen + fullscreen: this.fullscreen, + 'radio-tree': !this.multi } } }, @@ -132,7 +133,7 @@ export default { item.title = item.name item.value = item.id item.key = item.id - item.disabled = item.subset && item.subset.length + item.disabled = !!(item.subset && item.subset.length) item.children = this.dealTreeData(item.subset) return item }) @@ -339,6 +340,7 @@ export default { background: #fff; border-radius: 0 0 2px 2px; } +// 禁用的不需要显示选择框 .select-work-group-tree { /deep/.ant-tree-checkbox-disabled { display: none; @@ -348,4 +350,16 @@ export default { } } +// 单选不显示选择框 +.select-work-group-tree.radio-tree { + /deep/.ant-tree-checkbox { + display: none; + } +} + +// 单选鼠标悬浮时宽度调整 +.ant-tree.radio-tree /deep/ li .ant-tree-node-content-wrapper:hover { + margin-left: 0; + padding-left: 5px; +}