|
|
@@ -37,10 +37,16 @@ export default {
|
|
|
return {};
|
|
|
}
|
|
|
},
|
|
|
- storeItem:{
|
|
|
+ classItem: {
|
|
|
type: Object,
|
|
|
default() {
|
|
|
- return {bigCount:0,smallCount:0,userPrice:0};
|
|
|
+ return {};
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectList: {
|
|
|
+ type: Array,
|
|
|
+ default() {
|
|
|
+ return []
|
|
|
}
|
|
|
},
|
|
|
scrollTop: {
|
|
|
@@ -94,10 +100,15 @@ export default {
|
|
|
this.showPrice = this.info.priceLabel==1?null:this.info.price
|
|
|
this.oldPrice = (Number(this.info.cost) + Number(this.info.addPrice)).toFixed(2)
|
|
|
|
|
|
- this.bigCount = this.storeItem.bigCount
|
|
|
- this.smallCount = this.storeItem.smallCount
|
|
|
- this.userPrice = this.storeItem.userPrice
|
|
|
-
|
|
|
+ let newList = this.selectList
|
|
|
+ if(!this.$util.isEmpty(newList)){
|
|
|
+ const item = newList && newList.find(ele => { return ele.id == this.info.id && ele.classId == this.classItem.classId })
|
|
|
+ if (item) {
|
|
|
+ this.bigCount = item.bigCount
|
|
|
+ this.smallCount = item.smallCount
|
|
|
+ this.userPrice = item.userPrice
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
addEvents(variety) {
|