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

View File

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