fix: rating

This commit is contained in:
zzc
2026-05-26 07:29:52 +08:00
parent da6fb97da4
commit 7ef0e46cc8
3 changed files with 44 additions and 12 deletions

View File

@@ -12,8 +12,9 @@
<view class="sparkle s-2"></view>
<view class="sparkle s-3"></view>
</view>
<text class="title">评分成功</text>
<text class="subtitle">你已将TA评价为{{ actionData?.label || '...' }}</text>
<text class="title">{{ type === 'comment' ? '评论成功' : '评分成功' }}</text>
<text class="subtitle" v-if="type === 'comment'">{{ actionData?.label || '你的锐评已发布' }}</text>
<text class="subtitle" v-else>你已将TA评价为{{ actionData?.label || '...' }}</text>
</view>
</view>
</template>
@@ -24,10 +25,12 @@ import { ref } from 'vue';
const visible = ref(false);
const showAnim = ref(false);
const actionData = ref(null);
const type = ref('rating');
let timer = null;
const show = (action) => {
const show = (action, popupType = 'rating') => {
actionData.value = action;
type.value = popupType;
visible.value = true;
// 留一点时间让DOM渲染然后添加动画类