feat: 商品item组件

This commit is contained in:
2026-05-11 13:15:31 +08:00
parent 5bbdeb6236
commit ce35f788ca
2 changed files with 6 additions and 1 deletions

View File

@@ -16,6 +16,10 @@ const props = defineProps({
download: { download: {
type: Boolean, type: Boolean,
default: false default: false
},
showPrice: {
type: Boolean,
default: true
} }
}) })
const emit = defineEmits(['addShopping', 'openDetail', 'download']) const emit = defineEmits(['addShopping', 'openDetail', 'download'])
@@ -43,7 +47,7 @@ const {} = toRefs(data)
<div class="name"> <div class="name">
{{ props.name }} {{ props.name }}
</div> </div>
<div class="price" :class="{ 'is-download': download }"> <div class="price" :class="{ 'is-download': download }" v-if="props.showPrice">
{{ props.price }} {{ props.price }}
</div> </div>
</div> </div>

View File

@@ -94,6 +94,7 @@
:url="item.url" :url="item.url"
:name="item.title" :name="item.title"
:price="item.price" :price="item.price"
:showPrice="false"
></CommodityItem> ></CommodityItem>
</div> </div>
</div> </div>