fix: 设备适配 —— 宽屏居中锁定手机尺寸 + 全面屏底部安全区
宽屏(桌面/平板): - pages.json 配置 rpxCalcMaxDeviceWidth=750/rpxCalcBaseDeviceWidth=375, 窗口超过 750px 时 rpx 换算基准锁定为 375px(uni-app 官方机制),不再随屏幕拉伸 - 页面列宽 750rpx 居中展示,两侧露出底色+阴影形成手机框视觉 - 固定底栏统一 left/right:0+margin:auto 视口居中,与页面列对齐 - 悬浮球及菜单项宽屏时锚定到页面列左缘 全面屏(iPhone 刘海屏): - 订单底栏/订单详情按钮栏/弹窗确认栏用同色边框向下延伸覆盖 home 指示条区域 - 悬浮按钮(完成/选择)整体上移避开安全区 - 确认订单页底栏改为 bottom 锚定(原来用 JS 计算 top) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
4190565eb7
commit
f767aa93de
@@ -167,7 +167,7 @@
|
||||
<u-parse style="margin-top: 24rpx;" :html="obj.sku.refundPolicy"></u-parse>
|
||||
<view style="width: 654rpx;height: 120rpx;"></view>
|
||||
<view
|
||||
style="width: 654rpx;position: fixed;height: 88rpx;line-height: 88rpx;background: #fff;bottom: 0rpx;">
|
||||
style="width: 654rpx;position: fixed;height: 88rpx;line-height: 88rpx;background: #fff;bottom: 0rpx;left: 0rpx;right: 0rpx;margin: 0 auto;border-bottom: constant(safe-area-inset-bottom) solid #fff;border-bottom: env(safe-area-inset-bottom) solid #fff;">
|
||||
<u-button shape="circle" size="default"
|
||||
style="background: linear-gradient(180deg, #FF9E49 0%, #ED3B1A 100%);color: #fff;"
|
||||
@click="show1=false">确定</u-button>
|
||||
@@ -488,6 +488,13 @@
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
bottom: 0rpx;
|
||||
// xuchao: 视口水平居中(宽屏下与页面列对齐)+ 全面屏底部安全区
|
||||
left: 0rpx;
|
||||
right: 0rpx;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
border-bottom: constant(safe-area-inset-bottom) solid #fff;
|
||||
border-bottom: env(safe-area-inset-bottom) solid #fff;
|
||||
gap: 20rpx;
|
||||
padding-right: 24rpx;
|
||||
justify-content: flex-end;
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
</view>
|
||||
<view style="width: 654rpx;height: 120rpx;"></view>
|
||||
<view
|
||||
style="width: 654rpx;position: fixed;height: 88rpx;line-height: 88rpx;background: #fff;bottom: 0rpx;">
|
||||
style="width: 654rpx;position: fixed;height: 88rpx;line-height: 88rpx;background: #fff;bottom: 0rpx;left: 0rpx;right: 0rpx;margin: 0 auto;border-bottom: constant(safe-area-inset-bottom) solid #fff;border-bottom: env(safe-area-inset-bottom) solid #fff;">
|
||||
<u-button shape="circle" size="default"
|
||||
style="background: linear-gradient(180deg, #FF9E49 0%, #ED3B1A 100%);color: #fff;"
|
||||
@click="show1=false">确定</u-button>
|
||||
@@ -559,7 +559,16 @@
|
||||
background-color: #fff;
|
||||
height: 62px;
|
||||
position: fixed;
|
||||
// bottom: 0rpx;
|
||||
// xuchao: 改为底部锚定(原来用 JS 算 top,宽屏缩放后会错位),并给全面屏留出底部安全区
|
||||
top: auto !important;
|
||||
bottom: 0;
|
||||
// xuchao: 视口水平居中 —— 宽屏下与居中的页面列对齐
|
||||
left: 0rpx;
|
||||
right: 0rpx;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
border-bottom: constant(safe-area-inset-bottom) solid #fff;
|
||||
border-bottom: env(safe-area-inset-bottom) solid #fff;
|
||||
padding: 14rpx 24rpx;
|
||||
}
|
||||
|
||||
|
||||
@@ -208,8 +208,13 @@
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
background: linear-gradient(180deg, #FF9E49 0%, #ED3B1A 100%);
|
||||
margin-left: 30rpx;
|
||||
// xuchao: 视口水平居中(宽屏下与页面列对齐)
|
||||
left: 0rpx;
|
||||
right: 0rpx;
|
||||
margin: 0 auto;
|
||||
position: fixed;
|
||||
bottom: 25rpx;
|
||||
// xuchao: 全面屏底部安全区 —— 悬浮按钮整体上移
|
||||
bottom: calc(25rpx + constant(safe-area-inset-bottom));
|
||||
bottom: calc(25rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
</style>
|
||||
@@ -13,7 +13,7 @@
|
||||
<u-checkbox v-model="item.isSelect" active-color="#457AF7"></u-checkbox>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 702rpx;left: 24rpx;position: fixed;bottom: 24rpx;">
|
||||
<view style="width: 702rpx;position: fixed;left: 0rpx;right: 0rpx;margin: 0 auto;bottom: calc(24rpx + env(safe-area-inset-bottom));">
|
||||
<u-button shape="circle" size="default" style="background: linear-gradient(180deg, #FF9E49 0%, #ED3B1A 100%);color: #fff;" @click="select">完成</u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user