From e331c86047c3d61d727a34e746e06b69bf02bef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F?= <943146732@qq.com> Date: Sun, 17 Mar 2024 10:45:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataCenter/goods/Create.vue | 2 +- src/views/dataCenter/goods/Update.vue | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/views/dataCenter/goods/Create.vue b/src/views/dataCenter/goods/Create.vue index 89163a3..1360f69 100644 --- a/src/views/dataCenter/goods/Create.vue +++ b/src/views/dataCenter/goods/Create.vue @@ -161,7 +161,7 @@ @change="onForceUpdate()" > 单规格 - 多规格 + diff --git a/src/views/dataCenter/goods/Update.vue b/src/views/dataCenter/goods/Update.vue index a8cec74..5432fe2 100644 --- a/src/views/dataCenter/goods/Update.vue +++ b/src/views/dataCenter/goods/Update.vue @@ -506,6 +506,16 @@ export default { checkList:[] } }, + watch: { + // 监听商品ID变化 + '$route.query.goodsId' (val) { + if (val) { + this.goodsId = val + this.initData() + this.getDataList() + } + } + }, created () { // 初始化数据 this.initData()