From 078364b6f9c764a36d3272bf1177a096258df03b Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 3 Sep 2024 14:25:38 +0800 Subject: [PATCH] =?UTF-8?q?style(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E3=80=81=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E5=A4=96=E9=83=A8?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=AE=BE=E7=BD=AE=E7=95=8C=E9=9D=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../visualization/OuterParamsSet.vue | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/core/core-frontend/src/components/visualization/OuterParamsSet.vue b/core/core-frontend/src/components/visualization/OuterParamsSet.vue index c7b9fb59f8..4cb5af941e 100644 --- a/core/core-frontend/src/components/visualization/OuterParamsSet.vue +++ b/core/core-frontend/src/components/visualization/OuterParamsSet.vue @@ -24,7 +24,7 @@ menu ref="outerParamsInfoTree" :data="state.outerParamsInfoArray" - node-key="id" + node-key="paramsInfoId" highlight-current :props="state.treeProp" @node-click="nodeClick" @@ -56,7 +56,7 @@ { state.mapOuterParamsInfoArray[outerParamsInfo.paramsInfoId] = outerParamsInfo }) state.curNodeId = null + const firstNode = state.outerParamsInfoArray[0] nextTick(() => { - // outerParamsInfoTree.value.setCurrentKey(firstNode.paramsInfoId) - // nodeClick(firstNode) + outerParamsInfoTree.value.setCurrentKey(firstNode.paramsInfoId) + nodeClick(firstNode) }) } }) @@ -581,6 +582,14 @@ const viewInfoOnChange = targetViewInfo => { targetViewInfo.targetFieldId = null } } + +const initSelected = data => { + nextTick(() => { + outerParamsInfoTree.value.setCurrentKey(data.paramsInfoId) + nodeClick(data) + }) +} + const sourceFieldCheckedChange = data => { if (data.checked) { state.outerParams.checked = true @@ -601,6 +610,7 @@ const addOuterParamsInfo = () => { state.outerParamsInfoArray.push(outerParamsInfo) state.mapOuterParamsInfoArray[outerParamsInfo.paramsInfoId] = outerParamsInfo curEditDataId.value = outerParamsInfo['paramsInfoId'] + initSelected(outerParamsInfo) } const removeOuterParamsInfo = (node, data) => { @@ -719,6 +729,9 @@ defineExpose({ width: 100%; overflow-y: auto; background: none; + :deep(.ed-tree-node__expand-icon) { + display: none; + } } .custom-tree-node { @@ -730,7 +743,7 @@ defineExpose({ .icon-more { margin-left: auto; - visibility: hidden; + visibility: visible; } &:hover .icon-more { @@ -839,8 +852,9 @@ defineExpose({ .auth-span { float: right; - width: 40px; - margin-right: 5px; + width: 16px; + margin-right: 8px; + margin-left: 16px; } .tree-content {