digital item 页面
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user