修复数据不响应的问题
This commit is contained in:
@@ -4,6 +4,7 @@ export default {
|
|||||||
label: "表格",
|
label: "表格",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
tableData: [],
|
||||||
columns: [
|
columns: [
|
||||||
{label: "重点单品", prop: "goodsName"},
|
{label: "重点单品", prop: "goodsName"},
|
||||||
{label: "当日目标", prop: "targetNum", width: 70},
|
{label: "当日目标", prop: "targetNum", width: 70},
|
||||||
@@ -15,7 +16,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
tableData: v => v.$storeBoard.storeKeyGoods || [],
|
|
||||||
tableConfig: v => {
|
tableConfig: v => {
|
||||||
return {
|
return {
|
||||||
headerBGC: 'rgba(13, 48, 99, 0.6)', rowNum: 9,
|
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: {
|
methods: {
|
||||||
openNearbyStores({rowIndex}) {
|
openNearbyStores({rowIndex}) {
|
||||||
const {thirdGoodsCode} = this.tableData[rowIndex],
|
const {thirdGoodsCode} = this.tableData[rowIndex],
|
||||||
|
|||||||
Reference in New Issue
Block a user