captain-ui
Version:
有赞vue wap业务组件库
89 lines (85 loc) • 2.02 kB
JavaScript
var _components;
import Goods from './components/goods';
import { SIZE_MAP } from './constant';
export default {
render: function render() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', {
class: ['cap-ump-limitdiscount', "cap-ump-limitdiscount--" + _vm.sizeType, "cap-ump-limitdiscount--btn-" + _vm.buyBtnType, {
'cap-ump-limitdiscount--preview': _vm.isPreview
}]
}, _vm._l(_vm.goodsList, function (goods) {
return _c('cap-ump-limitdiscount-goods', {
key: goods.id,
attrs: {
"ratio": _vm.ratio,
"goods": goods,
"size": _vm.size,
"show-countdown": _vm.showCountdown,
"show-buy-btn": _vm.showBuyBtn,
"show-title": _vm.showTitle,
"show-time-limit": _vm.showTimeLimit,
"show-stock-num": _vm.showStockNum,
"image-fill-style": _vm.imageFillStyle,
"is-preview": _vm.isPreview,
"activity-status": _vm.activityStatus
}
});
}), 1);
},
name: 'cap-ump-limitdiscount',
components: (_components = {}, _components[Goods.name] = Goods, _components),
props: {
activityStatus: Number,
size: Number,
ratio: {
type: String,
default: '1,1'
},
showCountdown: {
type: Number,
default: 1
},
showBuyBtn: {
type: Number,
default: 1
},
showTitle: {
type: Number,
default: 1
},
showTimeLimit: {
type: Number,
default: 1
},
showStockNum: {
type: Number,
default: 1
},
buyBtnType: {
type: Number,
default: 0
},
goodsList: {
type: Array,
default: function _default() {
return [];
}
},
imageFillStyle: {
type: Number,
default: 0
},
isPreview: {
type: Boolean,
default: false
}
},
computed: {
sizeType: function sizeType() {
return SIZE_MAP[this.size];
}
}
};