feat: 数据接口的字段对接 与交互对接
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
>
|
||||
<view class="card-shell">
|
||||
<view class="card-media">
|
||||
<image class="card-image" :src="slot.item.image" mode="aspectFill" />
|
||||
<image class="card-image" :src="slot.item.coverImage" mode="aspectFill" />
|
||||
</view>
|
||||
|
||||
<view class="card-body">
|
||||
@@ -28,8 +28,8 @@
|
||||
<view class="card-title ellipsis-1">
|
||||
{{ slot.item.title }}
|
||||
</view>
|
||||
<view v-if="slot.item.desc" class="card-desc ellipsis-2">
|
||||
{{ slot.item.desc }}
|
||||
<view v-if="slot.item.subTitle" class="card-desc ellipsis-2">
|
||||
{{ slot.item.subTitle }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -58,7 +58,7 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:modelValue", "change", "card-click"]);
|
||||
const emit = defineEmits(["update:modelValue", "change", "didSelectItem"]);
|
||||
|
||||
const DURATION = 280;
|
||||
const CLICK_THRESHOLD = 8;
|
||||
@@ -407,7 +407,7 @@ const handleTouchCancel = () => {
|
||||
|
||||
const handleCardTap = (slot) => {
|
||||
if (slot.role !== "current" || isDragging.value || isAnimating.value) return;
|
||||
emit("card-click", slot.item, slot.index);
|
||||
emit("didSelectItem", slot.item, slot.index);
|
||||
};
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
|
||||
Reference in New Issue
Block a user