From 0e9f702cbf9051b5f579b696088a0f4b600ae658 Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 15 Jul 2024 09:51:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E4=B8=8D?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AppStoreKeyGoods.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/views/AppStoreKeyGoods.vue b/src/views/AppStoreKeyGoods.vue index e058f82..e84070a 100644 --- a/src/views/AppStoreKeyGoods.vue +++ b/src/views/AppStoreKeyGoods.vue @@ -4,6 +4,7 @@ export default { label: "表格", data() { return { + tableData: [], columns: [ {label: "重点单品", prop: "goodsName"}, {label: "当日目标", prop: "targetNum", width: 70}, @@ -15,7 +16,6 @@ export default { } }, computed: { - tableData: v => v.$storeBoard.storeKeyGoods || [], tableConfig: v => { return { headerBGC: 'rgba(13, 48, 99, 0.6)', rowNum: 9, @@ -28,6 +28,13 @@ export default { } }, }, + watch: { + $storeBoard: { + deep: true, immediate: true, handler(v) { + this.tableData = v.storeKeyGoods || [] + } + } + }, methods: { openNearbyStores({rowIndex}) { const {thirdGoodsCode} = this.tableData[rowIndex],