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

@@ -4,13 +4,14 @@
<view class="border-box flex flex-items-center justify-between pt-[12px] pb-[12px] relative">
<view class="flex flex-col flex-items-center flex-full ">
<view class="flex-full font-size-16 text-[#0B5C2D] text-center">核销凭证</view>
<view class="flex-full font-size-12 text-[#02C34E] text-center mt-4">请向工作人员出示此码</view>
<view class="flex-full font-size-12 text-[#02C34E] text-center mt-[4px]">请向工作人员出示此码</view>
</view>
<!-- 关闭按钮 -->
<uni-icons class="close absolute" type="close" size="20" color="#CACFD8" @click="handleClose" />
</view>
<view class="bg-white rounded-[12px] flex flex-col flex-items-center flex-justify-center p-[12px] mb-12 mx-12">
<view
class="bg-white rounded-[12px] flex flex-col flex-items-center flex-justify-center p-[12px] mb-[12px] mx-[12px]">
<view class="flex w-full flex-row flex-items-center flex-justify-between py-[4px]">
<view>
@@ -20,7 +21,8 @@
</view>
<view v-if="selectedVoucher" class="flex flex-row">
<view class="bg-[#f5f7fa] text-[#02C34E] font-size-12 p-[4px] rounded-[4px] mr-4">总计{{ selectedVoucher.count
<view class="bg-[#f5f7fa] text-[#02C34E] font-size-12 p-[4px] rounded-[4px] mr-[4px]">总计{{
selectedVoucher.count
}}{{
selectedVoucher.unit }}
</view>
@@ -30,7 +32,7 @@
</view>
<view
class="flex flex-col w-full flex-items-center flex-justify-center rounded-[8px] border pt-[16px] pb-[32px] mt-12">
class="flex flex-col w-full flex-items-center flex-justify-center rounded-[8px] border pt-[16px] pb-[32px] mt-[12px]">
<view class="flex flex-row flex-justify-between w-full px-[12px]">
<view class="bg-[#F0F8F3] text-[#0CCD58] font-size-14 px-[12px] leading-[24px] rounded-[12px]">凭证{{
selectedVoucherList.length > 1 ? currentVoucherIndex + 1 : '' }}</view>
@@ -40,20 +42,20 @@
selectedVoucher.writeOffCount }}</view>
</view>
<view class="flex flex-items-center flex-justify-center mt-20 p-[20px] rounded-[12px] border borderColor"
<view class="flex flex-items-center flex-justify-center mt-[20px] p-[20px] rounded-[12px] border borderColor"
:style="{ borderColor: selectedVoucher?.color }">
<Qrcode v-if="showQrcode" :size="props.size" :unit="props.unit" :val="qrcodeVal" :loadMake="true"
:onval="true" />
</view>
<view v-if="false"
class="mt-20 bg-[#F0F8F3] text-[#0CCD58] font-size-14 px-[12px] leading-[24px] rounded-[12px]">
class="mt-[20px] bg-[#F0F8F3] text-[#0CCD58] font-size-14 px-[12px] leading-[24px] rounded-[12px]">
{{ selectedVoucher.name }}
</view>
</view>
<view v-if="selectedVoucherList.length > 1"
class="flex flex-row w-full flex-items-center flex-justify-between mt-16 mb-24">
class="flex flex-row w-full flex-items-center flex-justify-between mt-[16px] mb-[24px]">
<view class="actions-btn" @click.stop="upAction">
<uni-icons type="left" size="16" color="#171717" />
</view>
@@ -71,7 +73,7 @@
<uni-icons type="right" size="16" color="#171717" />
</view>
</view>
<view v-else class="mb-24"></view>
<view v-else class="mb-[24px]"></view>
</view>
</view>