2 Commits

Author SHA1 Message Date
7ff5fa6933 Merge branch 'aigc' of https://git.nianxx.cn/zoujing/YGChatCS into home3.0 2026-07-16 22:21:17 +08:00
duanshuwen
f3b4fd04d0 feat(record-card): expand card clickable area
move view event emission from the action button to the root record card component, expanding the clickable area to let the entire card trigger the view event when actionText is present, improving user experience.
2026-07-16 22:16:58 +08:00

View File

@@ -1,5 +1,5 @@
<template>
<view class="record-card">
<view class="record-card" @tap="handleView">
<video v-if="isVideoRecord" class="record-card-image" :src="mediaUrl" :controls="false" :show-play-btn="false"
:show-center-play-btn="false" object-fit="cover" />
<image v-else-if="mediaUrl" class="record-card-image" :src="mediaUrl" mode="aspectFill" />
@@ -13,7 +13,7 @@
<text class="record-card-status ellipsis-1">{{ statusText }}</text>
</view>
<view v-if="actionText" class="record-card-action" @tap="emit('view', record)">
<view v-if="actionText" class="record-card-action">
{{ actionText }}
</view>
</view>
@@ -55,6 +55,11 @@ const actionText = computed(() => {
return "";
});
const handleView = () => {
if (!actionText.value) return;
emit("view", props.record);
};
const mediaUrl = computed(() => {
if (!isCompleted.value) return "";
return props.record.imageResultUrl || props.record.videoResultUrl || "";