import { Icon, Image } from 'vant' import { defineComponent } from 'vue' import styles from './index.module.less' import iconAddCart from '../../images/icon-add-cart.png' import iconSellOut from '../../images/icon-sell-out.png' import { moneyFormat } from '@/helpers/utils' export default defineComponent({ name: 'goods', props: { showAdd: { type: Boolean, default: true }, item: { type: Object, default: {} }, onItemClick: { type: Function, default: (item: any) => {} }, onBuyClick: { type: Function, default: (item: any) => {} } }, render() { const item = this.item return (
¥{moneyFormat(item.price)}
{this.showAdd && (