修改秒杀添加商品可能出现的bug

master
lemon橪 2021-10-21 14:09:00 +08:00
parent 28473979ec
commit b9aa720bea
2 changed files with 13 additions and 4 deletions

View File

@ -21,7 +21,6 @@
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择"
clearable
@on-change="applyTimeChange"
style="width: 200px"
>
</DatePicker>
@ -33,7 +32,6 @@
format="yyyy-MM-dd"
placeholder="请选择"
clearable
@on-change="startTimeChange"
style="width: 200px"
>
</DatePicker>

View File

@ -17,9 +17,9 @@
</template>
</Row>
<Row class="operation">
<Tabs type="card" v-model="tabIndex">
<Tabs type="card" v-model="tabCurrent">
<TabPane v-for="(tab, tabIndex) in goodsList" :key="tabIndex" :label="tab.hour" :name="tabIndex + ''">
<Table :loading="loading" border :columns="goodsColumns" :data="tab.list" :ref="'table' + tabIndex"
<Table :loading="loading" border :columns="goodsColumns" v-if="tabIndex == tabCurrent" :data="tab.list" :ref="'table' + tabIndex"
@on-selection-change="changeSelect">
<template slot-scope="{ row }" slot="originalPrice">
<div>{{ row.originalPrice | unitPrice("¥") }}</div>
@ -86,8 +86,14 @@ export default {
components: {
skuSelect,
},
watch:{
tabCurrent(val){
this.tabIndex = val
}
},
data() {
return {
tabCurrent:0,
promotionStatus: "", //
loading: false, //
searchForm: {
@ -269,6 +275,7 @@ export default {
selectedGoodsData(callback) {
let way = [];
let data = JSON.parse(JSON.stringify(callback));
data.forEach((e) => {
way.push({
goodsName: e.goodsName,
@ -284,10 +291,14 @@ export default {
});
});
this.$set(this.goodsList[this.tabIndex], "list", [
...way,
...this.defaultGoodsList,
]);
// this.$nextTick(() => {
// this.$forceUpdate();
// });
},
openSkuList() {
//