refactor: remove font-size utility file and replace with inline text classes

Delete the src/static/scss/font-size.scss utility file, and replace all legacy `font-size-*` class usages across the codebase with inline `text-[numberpx]` styling to consolidate font size definitions and remove redundant utility code.
This commit is contained in:
duanshuwen
2026-07-24 22:10:16 +08:00
parent 872a3fac18
commit 157b4f7e22
69 changed files with 255 additions and 324 deletions

View File

@@ -5,7 +5,7 @@
<view class="poi-compare-card__mark flex flex-items-center flex-justify-center rounded-full flex-shrink-0">
{{ data.icon }}
</view>
<view class="poi-compare-card__title text-[#1e293b] font-size-18 font-bold ellipsis-1 flex-full">
<view class="poi-compare-card__title text-[#1e293b] text-[18px] font-bold ellipsis-1 flex-full">
{{ data.title }}
</view>
</view>
@@ -15,14 +15,14 @@
:class="{ 'is-disabled': disabled }" @click="handleSelect(item)">
<image class="poi-compare-card__image block w-full" :src="item.image" mode="aspectFill" />
<view v-for="field in item.fields" :key="field.label" class="poi-compare-card__field">
<view class="poi-compare-card__field-label text-[#94a3b8] font-size-12 font-bold">
<view class="poi-compare-card__field-label text-[#94a3b8] text-[12px] font-bold">
{{ field.label }}
</view>
<view v-if="field.tone" class="poi-compare-card__chip font-size-12 font-bold"
<view v-if="field.tone" class="poi-compare-card__chip text-[12px] font-bold"
:class="getToneClass(field.tone)">
{{ field.value }}
</view>
<view v-else class="poi-compare-card__field-value text-[#1e293b] font-size-14 font-bold">
<view v-else class="poi-compare-card__field-value text-[#1e293b] text-[14px] font-bold">
{{ field.value }}
</view>
</view>
@@ -30,7 +30,7 @@
</view>
<view
class="poi-compare-card__primary flex flex-items-center flex-justify-center bg-[#0f172a] text-white font-size-15 font-bold"
class="poi-compare-card__primary flex flex-items-center flex-justify-center bg-[#0f172a] text-white text-[15px] font-bold"
:class="{ 'is-disabled': disabled }" @click="openDetail">
{{ data.detailButtonText }}
</view>
@@ -42,10 +42,10 @@
@click="closeDetail">
<uni-icons type="left" size="16" color="#CBD5E1"></uni-icons>
</view>
<view class="poi-compare-card__detail-title text-[#1e293b] font-size-20 font-bold flex-full">
<view class="poi-compare-card__detail-title text-[#1e293b] text-[20px] font-bold flex-full">
{{ detail.title }}
</view>
<view class="poi-compare-card__compare-label text-[#94a3b8] font-size-12 font-bold">
<view class="poi-compare-card__compare-label text-[#94a3b8] text-[12px] font-bold">
{{ detail.compareLabel }}
</view>
</view>
@@ -54,30 +54,30 @@
<view class="poi-compare-card__table-head poi-compare-card__table-row">
<view></view>
<view v-for="item in items" :key="item.id || item.name"
class="poi-compare-card__table-title text-[#1e293b] font-size-14 font-bold">
class="poi-compare-card__table-title text-[#1e293b] text-[14px] font-bold">
{{ item.name }}
</view>
</view>
<view v-for="row in detail.rows" :key="row.label"
class="poi-compare-card__table-row poi-compare-card__data-row">
<view class="poi-compare-card__row-label text-[#94a3b8] font-size-12 font-bold">
<view class="poi-compare-card__row-label text-[#94a3b8] text-[12px] font-bold">
{{ row.label }}
</view>
<view v-for="cell in row.values" :key="row.label + '-' + cell.text"
class="poi-compare-card__cell text-[#1e293b] font-size-14 font-bold" :class="getCellClass(cell.tone)">
class="poi-compare-card__cell text-[#1e293b] text-[14px] font-bold" :class="getCellClass(cell.tone)">
{{ cell.text }}
</view>
</view>
</view>
<view class="poi-compare-card__recommend">
<view class="poi-compare-card__recommend-title text-[#94a3b8] font-size-12 font-bold">
<view class="poi-compare-card__recommend-title text-[#94a3b8] text-[12px] font-bold">
{{ detail.recommendTitle }}
</view>
<view class="poi-compare-card__tips">
<view v-for="tip in detail.tips" :key="tip.text" class="poi-compare-card__tip flex gap-[10px]">
<view class="poi-compare-card__dot rounded-full flex-shrink-0" :class="getDotClass(tip.tone)" />
<view class="poi-compare-card__tip-text text-[#334155] font-size-14 font-bold">
<view class="poi-compare-card__tip-text text-[#334155] text-[14px] font-bold">
{{ tip.text }}
</view>
</view>
@@ -86,7 +86,7 @@
<view class="poi-compare-card__actions grid grid-cols-2 gap-14">
<view v-for="action in detail.actions" :key="action.id || action.text"
class="poi-compare-card__action flex flex-items-center flex-justify-center font-size-15 font-bold"
class="poi-compare-card__action flex flex-items-center flex-justify-center text-[15px] font-bold"
:class="[action.primary ? 'poi-compare-card__action--primary bg-[#0f172a] text-white' : 'poi-compare-card__action--secondary text-[#334155]', { 'is-disabled': disabled }]"
@click="handleAction(action)">
<text class="poi-compare-card__action-icon">{{ action.icon }}</text>