From 52373573a1c8bb6c1943b2a9731a121bb746c0b1 Mon Sep 17 00:00:00 2001 From: zhangjiabao Date: Mon, 5 Feb 2024 10:15:34 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(=E6=A0=87=E7=AD=BE):=20?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=A8=A1=E5=9D=97=E6=B7=BB=E5=8A=A0=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=B8=80=E7=BA=A7=E6=8C=89=E6=89=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tag/index.vue | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/src/views/tag/index.vue b/src/views/tag/index.vue index d61c273..a4ab137 100644 --- a/src/views/tag/index.vue +++ b/src/views/tag/index.vue @@ -96,9 +96,8 @@ plain icon="el-icon-full-screen" type="primary" - v-if="tagType === 1" @click="handleChangeChildrenTag" - >查看二级{{ ["", "查看二级", "查看一级"][tagType] }} @@ -595,14 +594,24 @@ export default { * 查看二级按钮点击事件 */ handleChangeChildrenTag() { - this.tagType = 2; - // 搜索条件重置 - this.queryForm.data.level = 2; - this.handleResetClick(); - // 弹窗内容重置 - this.modifyDialog.form.rules["parentId"] = [ - { required: true, message: "请选择父级", trigger: "change" } - ]; + if (this.tagType === 1) { + this.tagType = 2; + // 搜索条件重置 + this.queryForm.data.level = 2; + this.handleResetClick(); + // 弹窗内容重置 + this.modifyDialog.form.rules["parentId"] = [ + { required: true, message: "请选择父级", trigger: "change" } + ]; + } else { + this.tagType = 1; + // 搜索条件重置 + this.queryForm.data.level = 1; + this.handleResetClick(); + // 弹窗内容重置 + delete this.modifyDialog.form.rules["parentId"]; + } + // 表格、分页重置 this.table.data = []; this.table.page.current = 1;