digital item 页面

This commit is contained in:
X1627315083@163.com
2026-04-23 14:08:35 +08:00
parent 7ca69021c4
commit 45298e5f23
12 changed files with 388 additions and 10 deletions

View File

@@ -15,14 +15,17 @@ const props = defineProps({
}
})
const emit = defineEmits([
'addShopping'
'addShopping',
'openDetail'
])
let data = reactive({
})
const addShopping = () => {
emit('addShopping')
}
const openDetail = () => {
emit('openDetail')
}
onMounted(()=>{
})
onUnmounted(()=>{
@@ -32,7 +35,7 @@ const {} = toRefs(data);
</script>
<template>
<div class="commodity-item">
<img :src="props.url" alt="">
<img :src="props.url" alt="" @click="openDetail">
<div class="detail">
<div class="text">
<div class="name">
@@ -55,6 +58,7 @@ const {} = toRefs(data);
width: var(--commodity-width,100%);
> img{
width: 100%;
cursor: pointer;
height: var(--commodity-height,auto);
margin-bottom: var(--commodity-marginBottom,1rem);
}
@@ -79,5 +83,8 @@ const {} = toRefs(data);
}
}
}
.btn{
cursor: pointer;
}
}
</style>