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()