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,6 +1,6 @@
<template>
<!-- 选择数量 -->
<view class="border-box bg-white p-[12px] rounded-[12px] flex flex-items-center mb-12">
<view class="border-box bg-white p-[12px] rounded-[12px] flex flex-items-center mb-[12px]">
<view class="flex-full">
<view class="font-size-16 font-500 text-[#000000] leading-[24px]">选择数量</view>
<view class="font-size-12 text-[#a3a3a3] leading-[16px]">
@@ -20,7 +20,7 @@
<view class="bg-white rounded-[12px] overflow-hidden">
<view class="border-box border-bottom font-size-16 font-500 text-[#000000] leading-[24px] p-[12px]">联系方式</view>
<view class="flex flex-items-center p-[12px]">
<view class="font-size-14 font-500 text-[#525866] mr-12"> 联系人姓名 </view>
<view class="font-size-14 font-500 text-[#525866] mr-[12px]"> 联系人姓名 </view>
<view class="right">
<input class="border-box px-[4px] py-[2px] font-size-15 text-[#000000] leading-[20px]"
v-model.trim="userFormList[0].visitorName" placeholder="请输入联系人" maxlength="20" />
@@ -28,7 +28,7 @@
</view>
<view class="flex flex-items-center p-[12px]">
<view class="font-size-14 font-500 text-[#525866] mr-12"> 手机号码 </view>
<view class="font-size-14 font-500 text-[#525866] mr-[12px]"> 手机号码 </view>
<view class="right">
<input class="border-box px-[4px] py-[2px] font-size-15 text-[#000000] leading-[20px]"
v-model.trim="userFormList[0].contactPhone" placeholder="请输入联系手机" maxlength="11" />

View File

@@ -1,10 +1,10 @@
<template>
<view class="booking-footer bg-white flex flex-items-center font-family-misans-vf">
<text class="amt font-size-20 font-bold text-[#ff3d60] line-height-28 flex flex-items-center mr-8">
<text class="amt font-size-20 font-bold text-[#ff3d60] line-height-28 flex flex-items-center mr-[8px]">
{{ totalAmt }}
</text>
<!-- <view class="flex flex-items-center" @click="emit('detailClick')">
<text class="font-size-12 text-[#a3a3a3] mr-4">明细</text>
<text class="font-size-12 text-[#a3a3a3] mr-[4px]">明细</text>
<uni-icons type="up" size="16" color="#A3A3A3" />
</view> -->
<view class="btn rounded-[10px] flex flex-items-center ml-auto pl-[8px]" @click="handleBooking">

View File

@@ -1,5 +1,5 @@
<template>
<view class="bg-white rounded-[12px] overflow-hidden mb-12">
<view class="bg-white rounded-[12px] overflow-hidden mb-[12px]">
<view class="flex flex-items-center p-[12px] border-bottom">
<view class="font-size-16 font-500 text-[#000000] leading-[24px] flex-full">入住信息</view>
<view class="right">
@@ -10,7 +10,7 @@
<view class="border-box pl-[12px] pr-[12px]">
<view class="border-box border-bottom pt-[12px] pb-[12px] flex flex-items-center"
v-for="(item, index) in userFormList" :key="index">
<view class="font-size-14 font-500 text-[#525866] mr-12"> 住客姓名 </view>
<view class="font-size-14 font-500 text-[#525866] mr-[12px]"> 住客姓名 </view>
<view class="right">
<input class="border-box px-[4px] py-[2px] font-size-15 text-[#000000] leading-[20px]"
v-model.trim="item.visitorName" placeholder="请输入姓名" maxlength="11" />
@@ -18,7 +18,7 @@
</view>
<view class="flex flex-items-center pt-[12px] pb-[12px]">
<view class="font-size-14 font-500 text-[#525866] mr-12"> 联系手机 </view>
<view class="font-size-14 font-500 text-[#525866] mr-[12px]"> 联系手机 </view>
<view class="right">
<input class="border-box px-[4px] py-[2px] font-size-15 text-[#000000] leading-[20px]"
v-model.trim="userFormList[0].contactPhone" placeholder="请输入联系手机" maxlength="11" />

View File

@@ -8,7 +8,7 @@
<view class="booking-content flex-full p-[12px] overflow-hidden scroll-y">
<!-- 预约内容 -->
<view class="border-box bg-white p-[12px] rounded-[12px] mb-12">
<view class="border-box bg-white p-[12px] rounded-[12px] mb-[12px]">
<!-- 酒店类型入住离店日期部分 -->
<DateRangeSection v-if="orderData.orderType == 0" :selectedDate="selectedDate" :showBtn="true"
@click="navigateToDetail(orderData)" />
@@ -23,9 +23,9 @@
</view>
<!-- 权益部分 -->
<view class="flex flex-items-center mb-8">
<view class="flex flex-items-center mb-[8px]">
<text
class="bg-[#f7f7f7] rounded-[4px] font-size-11 text-[#525866] mr-4 pt-[4px] pb-[4px] pl-[6px] pr-[6px]"
class="bg-[#f7f7f7] rounded-[4px] font-size-11 text-[#525866] mr-[4px] pt-[4px] pb-[4px] pl-[6px] pr-[6px]"
v-for="(item, index) in orderData.commodityFacilityList" :key="index">
{{ item }}
</text>