refactor: replace custom ellipsis classes with native utilities

delete unused ellipsis.scss partial and its import, update all components to use truncate and line-clamp-2 utilities
This commit is contained in:
duanshuwen
2026-07-24 22:19:35 +08:00
parent 0e79cf2ad0
commit 2b12398f2a
32 changed files with 86 additions and 203 deletions

View File

@@ -1,33 +1,18 @@
<template>
<view class="explore-cards">
<scroll-view
class="explore-scroll"
scroll-x
show-scrollbar="false"
>
<scroll-view class="explore-scroll" scroll-x show-scrollbar="false">
<view class="explore-track">
<view
v-for="(item, index) in normalizedList"
:key="getItemKey(item, index)"
class="explore-card"
:class="`is-${item.tone}`"
hover-class="is-pressed"
hover-stay-time="80"
@tap="handleCardTap(item.raw, index)"
>
<image
v-if="item.coverImage"
class="explore-card-image"
:src="item.coverImage"
mode="aspectFill"
/>
<view v-for="(item, index) in normalizedList" :key="getItemKey(item, index)" class="explore-card"
:class="`is-${item.tone}`" hover-class="is-pressed" hover-stay-time="80"
@tap="handleCardTap(item.raw, index)">
<image v-if="item.coverImage" class="explore-card-image" :src="item.coverImage" mode="aspectFill" />
<view class="explore-card-gradient" />
<view class="explore-card-content">
<text class="explore-card-tag ellipsis-1">{{ item.tag }}</text>
<text class="explore-card-title ellipsis-1">{{ item.title }}</text>
<text v-if="item.subTitle" class="explore-card-desc ellipsis-1">
<text class="explore-card-tag truncate">{{ item.tag }}</text>
<text class="explore-card-title truncate">{{ item.title }}</text>
<text v-if="item.subTitle" class="explore-card-desc truncate">
{{ item.subTitle }}
</text>
</view>