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

@@ -2,7 +2,7 @@
<view class="bg-[#f5f7fa] flex flex-col h-screen overflow-hidden">
<TopNavBar title="房间相册" backgroundColor="transparent" />
<view class="p-[8px]">
<text class="ml-4 font-size-18 text-[#171717] font-500">全部({{ albumList.length }})</text>
<text class="ml-[4px] font-size-18 text-[#171717] font-500">全部({{ albumList.length }})</text>
</view>
<scroll-view scroll-y class="scroll-container overflow-auto">

View File

@@ -9,12 +9,12 @@
<uni-icons fontFamily="znicons" size="20" color="#171717">
{{ zniconsMap[moduleItem.icon] }}
</uni-icons>
<text class="ml-4 font-size-12 text-[#171717] leading-[20px]">
<text class="ml-[4px] font-size-12 text-[#171717] leading-[20px]">
{{ moduleItem.title }}
</text>
</view>
<view class="border-box flex flex-col flex-items-start mt-4 pb-[12px]">
<text class="font-size-12 text-[#525866] leading-[20px] mb-4" v-for="(text, index) in moduleItem.desc"
<view class="border-box flex flex-col flex-items-start mt-[4px] pb-[12px]">
<text class="font-size-12 text-[#525866] leading-[20px] mb-[4px]" v-for="(text, index) in moduleItem.desc"
:key="index">
{{ text }}
</text>

View File

@@ -2,7 +2,7 @@
<view class="border-box border-top-8 pl-[12px] pr-[12px] pt-[6px] pb-[12px]">
<ModuleTitle v-if="showTitle" title="套餐包含内容" />
<view class="flex flex-items-start flex-col" v-for="(item, index) in goodsData.commodityPackageConfig" :key="index">
<view class="title-row py-[4px] ml-4">
<view class="title-row py-[4px] ml-[4px]">
<text class="left font-size-14 text-[#171717]">{{ item.name }}</text>
<view class="sep" aria-hidden="true"></view>
<text class="right font-size-14 text-[#171717]">{{ item.count }}{{ item.unit }}</text>

View File

@@ -35,7 +35,7 @@
<!-- 立即抢购 -->
<view class="footer border-top">
<view class="amt font-size-20 font-bold text-[#ff3d60] line-height-28 flex flex-items-center mr-8">
<view class="amt font-size-20 font-bold text-[#ff3d60] line-height-28 flex flex-items-center mr-[8px]">
{{ calculatedTotalPrice }}
</view>