From 2935e94ebb038beb8f25157c75bcf201bc6a822f 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 17:28:31 +0800
Subject: [PATCH] update
---
src/views/goods/Create.vue | 2 +-
src/views/goods/Update.vue | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/views/goods/Create.vue b/src/views/goods/Create.vue
index 5052d12..bb8c63c 100644
--- a/src/views/goods/Create.vue
+++ b/src/views/goods/Create.vue
@@ -161,7 +161,7 @@
@change="onForceUpdate()"
>
单规格
- 多规格
+
diff --git a/src/views/goods/Update.vue b/src/views/goods/Update.vue
index 60fcefe..81d4b6e 100644
--- a/src/views/goods/Update.vue
+++ b/src/views/goods/Update.vue
@@ -508,6 +508,16 @@ export default {
formData: GoodsModel.formData
}
},
+ watch: {
+ // 监听商品ID变化
+ '$route.query.goodsId' (val) {
+ if (val) {
+ this.goodsId = val
+ this.initData()
+ this.getDataList()
+ }
+ }
+ },
created () {
// 初始化数据
this.initData()