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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user