refactor: migrate legacy color classes to inline tailwind text utilities

Replace all usages of legacy `.color-*` and `.text-color-*` SCSS utility classes with inline Tailwind `text-[#hexcode]` arbitrary value classes. Remove the deprecated `src/static/scss/colors.scss` file, and fix minor formatting/indentation issues across multiple component files.
This commit is contained in:
duanshuwen
2026-07-24 21:38:17 +08:00
parent 01fdf80a72
commit 5f06d8ef11
67 changed files with 282 additions and 505 deletions

View File

@@ -2,10 +2,10 @@
<view class="card bg-white p-[8px] rounded-12 flex flex-items-start m-12" @click.stop="handleClick(item)">
<image class="left rounded-10" :src="item.commodityPhoto" mode="aspectFill" />
<view class="right flex-full pl-[12px]">
<view class="font-size-16 leading-[24px] color-171717 mb-4">
<view class="font-size-16 leading-[24px] text-[#171717] mb-4">
{{ item.commodityName }}
</view>
<view v-if="item.commodityFacility" class="font-size-12 leading-[16px] color-99A0AE mb-4 ellipsis-1">
<view v-if="item.commodityFacility" class="font-size-12 leading-[16px] text-[#99a0ae] mb-4 ellipsis-1">
{{ item.commodityFacility.join(" ") }}
</view>
<view class="font-size-12 leading-[18px] color-43669A">
@@ -13,13 +13,13 @@
</view>
<view class="flex flex-items-center flex-justify-end">
<text class="amt font-size-18 font-500 font-family-misans-vf leading-[24px] color-FF3D60 mr-4">
<text class="amt font-size-18 font-500 font-family-misans-vf leading-[24px] text-[#ff3d60] mr-4">
{{ item.specificationPrice }}
</text>
<text v-if="item.stockUnitLabel" class="font-size-12 leading-[16px] color-99A0AE">
<text v-if="item.stockUnitLabel" class="font-size-12 leading-[16px] text-[#99a0ae]">
/{{ item.stockUnitLabel }}
</text>
<text class="btn rounded-10 color-white ml-16"></text>
<text class="btn rounded-10 text-white ml-16"></text>
</view>
</view>
</view>

View File

@@ -6,12 +6,13 @@
activeIndex === index && 'tab-item-active',
]" @click="handleTabClick(index)">
<view class="tab-item-inner flex flex-items-center">
<uni-icons :class="['icon mr-4', activeIndex === index && 'icon-active']" fontFamily="znicons" size="20" color="opacity">
<uni-icons :class="['icon mr-4', activeIndex === index && 'icon-active']" fontFamily="znicons" size="20"
color="opacity">
{{ zniconsMap[item.iconCode] }}
</uni-icons>
<text :class="[
'font-size-16 font-500 color-525866 ',
'font-size-16 font-500 text-[#525866] ',
activeIndex === index && 'tab-text-active',
]">
{{ item.iconTitle }}
@@ -113,7 +114,7 @@ onMounted(() => {
// 获取商品类型列表(示例方法,实际使用时根据需要调用)
const getCommodityTypePageList = async () => {
const res = await commodityTypePageList({size: 20, current: 1});
const res = await commodityTypePageList({ size: 20, current: 1 });
if (res && res.data && res.data.records) {
tabList.value = res.data.records;
} else {

View File

@@ -10,20 +10,20 @@
<view v-if="didSelectedTabItem && didSelectedTabItem.orderType == 0"
class="bg-white flex flex-items-center p-[12px]">
<view class="in flex flex-items-center">
<text class="font-size-11 font-500 color-99A0AE mr-4">入住</text>
<text class="font-size-14 font-500 color-171717">
<text class="font-size-11 font-500 text-[#99a0ae] mr-4">入住</text>
<text class="font-size-14 font-500 text-[#171717]">
{{ selectedDate.startDate }}
</text>
</view>
<!-- 几晚 -->
<text class="nights bg-[#e5e8ee] font-size-11 font-500 color-525866 rounded-50 ml-8 mr-8">
<text class="nights bg-[#e5e8ee] font-size-11 font-500 text-[#525866] rounded-50 ml-8 mr-8">
{{ selectedDate.totalDays }}
</text>
<view class="out flex flex-items-center">
<text class="font-size-11 font-500 color-99A0AE mr-4">离店</text>
<text class="font-size-14 font-500 color-171717">
<text class="font-size-11 font-500 text-[#99a0ae] mr-4">离店</text>
<text class="font-size-14 font-500 text-[#171717]">
{{ selectedDate.endDate }}
</text>
</view>