press-plus
Version:
63 lines (62 loc) • 1.34 kB
text/typescript
export function getMatchItemMixin() {
return {
props: {
matchInfo: {
type: Object,
default: () => ({}),
required: false,
},
popoverAwardIndex: {
type: Array,
default: () => ([-1, -1, -1]),
},
popoverTitle: {
type: String,
default: '',
},
popoverContent: {
type: String,
default: '',
},
showPopover: {
type: Boolean,
default: false,
},
popoverRotate: {
type: Boolean,
default: false,
},
bannerShow: {
type: Boolean,
default: false,
},
},
data() {
return {
};
},
computed: {
awardIndex(this: any) {
const index = this.popoverAwardIndex[2];
return index == undefined ? -1 : index;
},
},
methods: {
clickPrize(this: any) {
this.$emit('clickPrize');
},
onShowPopover(this: any, item: any, index: number) {
this.$emit('onShowPopover', item, index);
},
closePopover(this: any) {
this.$emit('closePopover');
},
clickMatchButton(this: any) {
this.$emit('clickMatchButton', this.matchInfo);
},
clickMatch(this: any) {
this.$emit('clickMatch', this.matchInfo);
},
},
};
}