From 04eaeb3dd8bf493cc21139ede8d80417867aa78a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Sun, 29 Jan 2023 14:21:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/goodsCategory/index.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/views/system/goodsCategory/index.vue b/src/views/system/goodsCategory/index.vue index e6b8cdf..9dd4fcf 100644 --- a/src/views/system/goodsCategory/index.vue +++ b/src/views/system/goodsCategory/index.vue @@ -203,7 +203,6 @@ @change="change" style="width: 340px" :show-all-levels="false" - :clearable="true" ref="cascader" :placeholder="form.parentName ? form.parentName : ''" > @@ -520,6 +519,10 @@ export default { updatePicture(obj).then((res) => {}); } this.$modal.msgSuccess("修改成功"); + // 清空选中的节点 + this.$refs.cascader.$refs.panel.clearCheckedNodes(); + // 设置为空可以让节点不高亮显示 + this.$refs.cascader.$refs.panel.activePath = []; this.open = false; this.getList(); this.info(); @@ -527,6 +530,10 @@ export default { } else { addGoodsCategory(this.form).then((response) => { this.$modal.msgSuccess("新增成功"); + // 清空选中的节点 + this.$refs.cascader.$refs.panel.clearCheckedNodes(); + // 设置为空可以让节点不高亮显示 + this.$refs.cascader.$refs.panel.activePath = []; this.open = false; this.getList(); this.info();