修复数据不响应的问题

This commit is contained in:
aixianling
2024-07-15 09:51:18 +08:00
parent 2fa84b7e93
commit 0e9f702cbf

View File

@@ -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],