refactor: remove margin utils, use inline pixel spacing

Delete the src/static/scss/margin.scss utility file, update all component templates to replace pre-defined margin classes with inline arbitrary pixel values (e.g. mb-[4px] instead of mb-4), and clean up long template lines for better readability.
This commit is contained in:
duanshuwen
2026-07-24 22:02:09 +08:00
parent 0883d2b9c9
commit c125154a75
53 changed files with 167 additions and 554 deletions

View File

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

View File

@@ -6,7 +6,7 @@
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"
<uni-icons :class="['icon mr-[4px]', activeIndex === index && 'icon-active']" fontFamily="znicons" size="20"
color="opacity">
{{ zniconsMap[item.iconCode] }}
</uni-icons>

View File

@@ -10,19 +10,19 @@
<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 text-[#99a0ae] mr-4">入住</text>
<text class="font-size-11 font-500 text-[#99a0ae] mr-[4px]">入住</text>
<text class="font-size-14 font-500 text-[#171717]">
{{ selectedDate.startDate }}
</text>
</view>
<!-- 几晚 -->
<text class="nights bg-[#e5e8ee] font-size-11 font-500 text-[#525866] rounded-[50px] ml-8 mr-8">
<text class="nights bg-[#e5e8ee] font-size-11 font-500 text-[#525866] rounded-[50px] ml-[8px] mr-[8px]">
{{ selectedDate.totalDays }}
</text>
<view class="out flex flex-items-center">
<text class="font-size-11 font-500 text-[#99a0ae] mr-4">离店</text>
<text class="font-size-11 font-500 text-[#99a0ae] mr-[4px]">离店</text>
<text class="font-size-14 font-500 text-[#171717]">
{{ selectedDate.endDate }}
</text>