| | |
| | | ref="table" |
| | | class="prize-table" |
| | | > |
| | | <template slot-scope="{ row }" slot="prizeCoverUrl"> |
| | | <template slot-scope="{ row }" slot="prizeImgUrl"> |
| | | <img |
| | | :src="row.prizeCoverUrl" |
| | | :src="row.prizeImgUrl" |
| | | alt="奖品封面" |
| | | class="thumbnail" |
| | | > |
| | |
| | | :loading="choiceLoading" |
| | | > |
| | | <!-- 奖品图片 slot --> |
| | | <template slot-scope="{ row }" slot="prizeCoverUrl"> |
| | | <img :src="row.prizeCoverUrl" alt="奖品封面" style="width: 50px; height: 50px; object-fit: cover;"> |
| | | <template slot-scope="{ row }" slot="prizeImgUrl"> |
| | | <img :src="row.prizeImgUrl" alt="奖品封面" style="width: 50px; height: 50px; object-fit: cover;"> |
| | | </template> |
| | | <!-- 数量 slot --> |
| | | <template slot-scope="{ row, index }" slot="maxPreDay"> |
| | |
| | | choiceColumns:[ |
| | | { |
| | | title: '奖品图片', |
| | | slot: 'prizeCoverUrl', |
| | | slot: 'prizeImgUrl', |
| | | width: 80, |
| | | align: 'center' |
| | | }, |
| | |
| | | prizeColumns:[ |
| | | { |
| | | title: '奖品封面', |
| | | key: 'prizeCoverUrl', |
| | | slot:'prizeCoverUrl', |
| | | key: 'prizeImgUrl', |
| | | slot:'prizeImgUrl', |
| | | align: 'center', |
| | | minWidth: 100, |
| | | }, |
| | |
| | | }, |
| | | choicePrize(row){ |
| | | //判断数组长度 |
| | | if(this.choiceData.length >= 5){ |
| | | this.$Message.warning("最多添加5个奖品") |
| | | return; |
| | | } |
| | | // if(this.choiceData.length >= 5){ |
| | | // this.$Message.warning("最多添加5个奖品") |
| | | // return; |
| | | // } |
| | | console.log(row.prizeId) |
| | | if (this.isPrizeChosen(row.id)){ |
| | | |
| | |
| | | this.choiceLoading = true; |
| | | |
| | | const prizeToAdd = { |
| | | prizeCoverUrl:row.prizeCoverUrl, |
| | | prizeImgUrl:row.prizeImgUrl, |
| | | prizeType: row.prizeType, |
| | | prizeName: row.prizeName, |
| | | prizeNum: 1, // 默认数量为1 |