feat: 展示调整
This commit is contained in:
@@ -74,8 +74,8 @@ const slogan = computed(() =>
|
||||
|
||||
const validText = computed(() => {
|
||||
const { valid_until: until, valid_days: days } = b.value;
|
||||
if (until) return `有效期至 ${dotDate(until)}`;
|
||||
if (days) return `有效期:${days} 天`;
|
||||
if (until) return `有效至 ${dotDate(until)}`;
|
||||
if (days) return `有效期 ${days} 天`;
|
||||
return "长期有效";
|
||||
});
|
||||
|
||||
@@ -197,16 +197,15 @@ const onTap = () => {
|
||||
<view class="min-w-0 flex-1 line-clamp-1">{{ b.title || b.special_notes || b.description || b.merchant_name || "" }}</view>
|
||||
</view>
|
||||
|
||||
<!-- ④ 有效期 + 第二项随态 -->
|
||||
<!-- ④ 有效期 + 第二项随态(有效期恒完整;第二项空间不足时收缩截断,避免整行溢出) -->
|
||||
<view class="flex items-center gap-2 mt-auto text-[10px] text-ink3">
|
||||
<view v-if="validText" class="flex items-center gap-[3.5px] shrink-0 whitespace-nowrap">
|
||||
<view class="shrink-0 flex items-center gap-[3.5px] whitespace-nowrap">
|
||||
<AppIcon name="clock" tone="ink3" :size="12" />
|
||||
<text>{{ validText }}</text>
|
||||
</view>
|
||||
<view class="flex items-center gap-[3.5px] shrink-0 whitespace-nowrap"
|
||||
:class="secondMeta.ok ? 'text-[#00A46C]' : ''">
|
||||
<AppIcon :name="secondMeta.icon" :tone="secondMeta.ok ? 'brand' : 'ink3'" :size="12" />
|
||||
<text>{{ secondMeta.text }}</text>
|
||||
<view class="min-w-0 flex-1 flex items-center gap-[3.5px]" :class="secondMeta.ok ? 'text-[#00A46C]' : ''">
|
||||
<AppIcon :name="secondMeta.icon" :tone="secondMeta.ok ? 'brand' : 'ink3'" :size="12" class="shrink-0" />
|
||||
<view class="min-w-0 line-clamp-1">{{ secondMeta.text }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user