From 48db282ed085711dca0ad6702abba8eacb14f4c3 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Mon, 25 Mar 2024 11:53:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=A0=91=E4=BA=A4=E4=BA=92=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1033817 --user=宋昌昌 【测试跟踪】测试计划-重命名自定义模块-复制部分名称-点击添加子模块-提示名称不能为空-未显示子模块添加输入框 https://www.tapd.cn/55049933/s/1479684 --- .../frontend/src/components/new-ui/MsNodeTree.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/new-ui/MsNodeTree.vue b/framework/sdk-parent/frontend/src/components/new-ui/MsNodeTree.vue index b3718689c5..290e28f882 100644 --- a/framework/sdk-parent/frontend/src/components/new-ui/MsNodeTree.vue +++ b/framework/sdk-parent/frontend/src/components/new-ui/MsNodeTree.vue @@ -49,7 +49,7 @@ v-if="data.id && !isDefault(data) && !hideNodeOperator" :content="$t('test_track.module.add_submodule')" placement="top"> - + @@ -142,7 +142,7 @@ v-if="data.id && !isDefault(data) && !hideNodeOperator" :content="$t('test_track.module.add_submodule')" placement="top" :case-num="getCaseNum(data)"> - + @@ -210,6 +210,7 @@ export default { label: "label" }, extendTreeNodes: [], + appendChildDisable: false }; }, props: { @@ -396,6 +397,7 @@ export default { } }, edit(node, data, isAppend) { + this.appendChildDisable = true; this.$set(data, 'isEdit', true); this.$nextTick(() => { this.$refs.nameInput.focus(); @@ -469,11 +471,8 @@ export default { this.$set(data, 'children', []) } data.children.push(newChild); - this.edit(node, newChild, true); node.expanded = true; - this.$nextTick(() => { - this.$refs.nameInput.focus(); - }); + this.edit(node, newChild, true); }, save(node, data) { if (data.name.trim() === '') { @@ -506,10 +505,12 @@ export default { data.level = param.level; } this.$set(data, 'isEdit', false); + this.appendChildDisable = false; }, remove(node, data) { if (data.label === undefined) { this.$refs.tree.remove(node); + this.appendChildDisable = false; return; } let title = this.$t('commons.confirm_delete') + ': ' + this.$t("project.project_file.file_module_type.module") + data.label + "?";