import { use, isDef } from '../utils';
import Tag from '../tag';
const [sfc, bem] = use('card');
export default sfc({
props: {
tag: String,
desc: String,
thumb: String,
title: String,
centered: Boolean,
lazyLoad: Boolean,
thumbLink: String,
num: [Number, String],
price: [Number, String],
originPrice: [Number, String],
currency: {
type: String,
default: '¥'
}
},
render(h) {
const { thumb, $slots: slots } = this;
const Thumb = (slots.thumb || thumb) && (
{slots.thumb ||
(this.lazyLoad ? (
) : (
))}
{this.tag && (