fix(ui-layout): correct flex text truncation issues
Add min-w-0, w-full, and block classes to flex child elements and text nodes across various UI components to ensure text truncation works correctly. Remove outdated hardcoded card item width styles from global SCSS and replace them with inline responsive width classes where appropriate.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="discovery-photo-tool-card" hover-class="is-pressed" hover-stay-time="80" @tap="handleSelect">
|
||||
<view class="photo-visual">
|
||||
<view class="photo-visual w-[88px] min-w-0">
|
||||
<view class="camera-illustration">
|
||||
<view class="camera-top" />
|
||||
<view class="camera-flash" />
|
||||
@@ -12,21 +12,21 @@
|
||||
<view class="camera-dot is-small" />
|
||||
</view>
|
||||
</view>
|
||||
<text class="photo-badge truncate">{{ normalizedItem.badge }}</text>
|
||||
<text class="photo-badge w-[calc(100%_-_18px)] truncate">{{ normalizedItem.badge }}</text>
|
||||
</view>
|
||||
|
||||
<view class="photo-content">
|
||||
<text class="photo-title truncate">{{ normalizedItem.title }}</text>
|
||||
<text class="photo-subtitle truncate">{{ normalizedItem.subTitle }}</text>
|
||||
<view class="photo-content min-w-0 flex-1">
|
||||
<text class="photo-title block w-full truncate">{{ normalizedItem.title }}</text>
|
||||
<text class="photo-subtitle block w-full truncate">{{ normalizedItem.subTitle }}</text>
|
||||
|
||||
<view class="photo-options">
|
||||
<view v-for="(option, index) in normalizedItem.options" :key="getOptionKey(option, index)" class="photo-option"
|
||||
<view v-for="(option, index) in normalizedItem.options" :key="getOptionKey(option, index)" class="photo-option min-w-0 flex-1"
|
||||
hover-class="is-option-pressed" hover-stay-time="80" @tap.stop="handleOptionSelect(option, index)">
|
||||
<view class="photo-option-thumb">
|
||||
<image v-if="option.coverImage" class="photo-option-image" :src="option.coverImage" mode="aspectFill" />
|
||||
<view v-else class="photo-option-placeholder" :class="`is-${index}`" />
|
||||
</view>
|
||||
<text class="photo-option-label truncate">{{ option.label }}</text>
|
||||
<text class="photo-option-label block w-[76px] truncate">{{ option.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user