Commit cb7f40e2 by liimin

refactor(ui): 优化界面组件样式和图标实现

- 移除 FinishStep 组件中的 duration 属性
- 将图标显示逻辑从自定义类改为 un-icon 组件实现
- 新增 getIconName 方法处理图标状态切换逻辑
- 统一调整 TabBar 高度为 70px,图标大小为 34px
- 优化 ToolBox 组件浮动按钮位置从顶部居中改为右侧居中
- 清理屏幕适配相关配置,移除多余的分辨率特定设置
1 parent 6f15ab86
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
:round="isLandscapeMode ? 0 : 20" :round="isLandscapeMode ? 0 : 20"
:closeable="true" :closeable="true"
:z-index="10075" :z-index="10075"
duration="600"
@close="close"> @close="close">
<view class="popup-wrapper" :class="isLandscapeMode ? 'landscape-wrapper' : 'portrait-wrapper'"> <view class="popup-wrapper" :class="isLandscapeMode ? 'landscape-wrapper' : 'portrait-wrapper'">
<!-- 标题栏 --> <!-- 标题栏 -->
...@@ -83,8 +82,11 @@ ...@@ -83,8 +82,11 @@
<view class="choose-item" <view class="choose-item"
:class="[`${item.status == receptionStatus ? (item.status == '1' ? 'success' : 'error') : ''}`]" :class="[`${item.status == receptionStatus ? (item.status == '1' ? 'success' : 'error') : ''}`]"
@click="chooseResult(item.status)"> @click="chooseResult(item.status)">
<view class="sprite-icon" :class="[`icon-face-${item.status == receptionStatus ? `${item.icon}-active` : item.icon}`]"> <un-icon class="sprite-icon"
</view> :name="getIconName(item.icon, item.status == receptionStatus)"
:size="24"
:color="item.status == receptionStatus ? (item.status == '1' ? '#14cc68' : '#f24724') : '#999'"
customStyle="margin-right: 12px" />
<text class="choose-item-text" :class="[`${item.status == receptionStatus ? (item.status == '1' ? 'success-text' : 'error-text') : ''}`]">{{ item.text }}</text> <text class="choose-item-text" :class="[`${item.status == receptionStatus ? (item.status == '1' ? 'success-text' : 'error-text') : ''}`]">{{ item.text }}</text>
</view> </view>
</template> </template>
...@@ -538,6 +540,19 @@ const chooseResult = (val: string): void => { ...@@ -538,6 +540,19 @@ const chooseResult = (val: string): void => {
recordService.updateBusinessData({ receptionStatus: val }); recordService.updateBusinessData({ receptionStatus: val });
}; };
// 获取图标名称
const getIconName = (icon: string, isActive: boolean): string => {
// success -> checkmark-circle-fill (选中时) / checkmark-circle (未选中)
// error -> close-circle-fill (选中时) / close-circle (未选中)
if (icon === "success") {
return isActive ? "checkmark-circle-fill" : "checkmark-circle";
}
if (icon === "error") {
return isActive ? "close-circle-fill" : "close-circle";
}
return "question-circle";
};
// 暴露方法 // 暴露方法
defineExpose({ open, close }); defineExpose({ open, close });
......
...@@ -44,8 +44,8 @@ export default { ...@@ -44,8 +44,8 @@ export default {
'--entrance-icon-size': '52px', '--entrance-icon-size': '52px',
'--entrance-item-gap': 'var(--l-spacing-xl)', '--entrance-item-gap': 'var(--l-spacing-xl)',
// TabBar 相关(竖屏底部) // TabBar 相关(竖屏底部)
'--tabbar-height': '60px', '--tabbar-height': '70px',
'--tabbar-icon-size': '24px', '--tabbar-icon-size': '34px',
}, },
landscape: { landscape: {
...@@ -63,20 +63,12 @@ export default { ...@@ -63,20 +63,12 @@ export default {
'--tabbar-height': '540px', '--tabbar-height': '540px',
'--tabbar-padding': '16px', '--tabbar-padding': '16px',
'--tabbar-icon-size': '28px', '--tabbar-icon-size': '28px',
// TabBar 相关(竖屏底部)
'--tabbar-height': '70px',
'--tabbar-icon-size': '34px',
}, },
resolutions: { resolutions: {
// iPad 横屏优化 (1024x768) - 产品介绍占 65%
// 可用高度 = 768 - 44(状态栏) - 52(标题) ≈ 672px
'landscape-1024x768': {
'--module-box-height': '440px',
'--tool-box-height': '200px',
'--common-title-height': '52px',
'--entrance-icon-size': '60px',
'--tabbar-height': '600px',
'--tabbar-icon-size': '32px',
},
// 大屏平板横屏 (1174x768) - 产品介绍占 65% // 大屏平板横屏 (1174x768) - 产品介绍占 65%
// 可用高度 = 768 - 44(状态栏) - 54(标题) ≈ 670px // 可用高度 = 768 - 44(状态栏) - 54(标题) ≈ 670px
'landscape-1174x768': { 'landscape-1174x768': {
...@@ -97,24 +89,18 @@ export default { ...@@ -97,24 +89,18 @@ export default {
'--tool-box-height': '90px', '--tool-box-height': '90px',
'--common-title-height': '44px', '--common-title-height': '44px',
'--entrance-icon-size': '52px', '--entrance-icon-size': '52px',
'--tabbar-height': '480px', '--tabbar-height': '70px',
'--tabbar-icon-size': '26px', '--tabbar-icon-size': '34px',
},
// 大屏手机竖屏 (414x896) - 产品介绍占 60%
// 可用高度 = 896 - 44(状态栏) - 44(标题) - 60(TabBar) ≈ 748px
'portrait-414x896': {
'--module-box-height': '450px',
'--tool-box-min-height': '220px',
'--common-title-height': '44px',
}, },
// iPhone 14 Pro 竖屏 (393x816) - 产品介绍占 60% // iPhone 14 Pro 竖屏 (393x816) - 产品介绍占 60%
// 可用高度 = 816 - 44(状态栏) - 42(标题) - 60(TabBar) ≈ 670px // 可用高度 = 816 - 44(状态栏) - 42(标题) - 60(TabBar) ≈ 670px
'portrait-393x816': { 'portrait-393x816': {
'--module-box-height': '400px', '--module-box-height': '300px',
'--tool-box-min-height': '200px', '--tool-box-min-height': '200px',
'--common-title-height': '42px', '--common-title-height': '42px',
'--tabbar-height': '70px',
'--tabbar-icon-size': '34px',
}, },
// 大屏平板竖屏 (768x1174) - 产品介绍占 65% // 大屏平板竖屏 (768x1174) - 产品介绍占 65%
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
inactive-icon="folder" inactive-icon="folder"
:offset-right="20" :offset-right="20"
:offset-top="120" :offset-top="120"
position="top-center" position="right-center"
:size="56" :size="56"
type="primary" type="primary"
@click="handleFabClick"> @click="handleFabClick">
......
...@@ -15,8 +15,8 @@ export const globalScreenVars = { ...@@ -15,8 +15,8 @@ export const globalScreenVars = {
'--font-md': '14px', '--font-md': '14px',
// HomeFrame 底部 Tab:与 components/HomeFrame/styles/index.vars.uts portrait 一致; // HomeFrame 底部 Tab:与 components/HomeFrame/styles/index.vars.uts portrait 一致;
// 非首页路由若未传 pageVars,仍要有约束,避免图标按位图原始尺寸撑满。 // 非首页路由若未传 pageVars,仍要有约束,避免图标按位图原始尺寸撑满。
'--tabbar-height': '60px', '--tabbar-height': '70px',
'--tabbar-icon-size': '24px', '--tabbar-icon-size': '34px',
}, },
// 横屏全局 // 横屏全局
...@@ -24,10 +24,8 @@ export const globalScreenVars = { ...@@ -24,10 +24,8 @@ export const globalScreenVars = {
'--padding': '20px', '--padding': '20px',
'--gap': '12px', '--gap': '12px',
'--font-md': '16px', '--font-md': '16px',
'--tabbar-width': '120px', '--tabbar-height': '70px',
'--tabbar-height': '540px', '--tabbar-icon-size': '34px',
'--tabbar-padding': '16px',
'--tabbar-icon-size': '28px',
}, },
// 精准分辨率 // 精准分辨率
...@@ -35,23 +33,22 @@ export const globalScreenVars = { ...@@ -35,23 +33,22 @@ export const globalScreenVars = {
'portrait-768x1174': { 'portrait-768x1174': {
'--padding': '14px', '--padding': '14px',
'--tabbar-height': '70px', '--tabbar-height': '70px',
'--tabbar-icon-size': '32px', '--tabbar-icon-size': '34px',
}, },
// 须与 components/HomeFrame/styles/index.vars.uts 中 landscape-1174x768 一致; // 须与 components/HomeFrame/styles/index.vars.uts 中 landscape-1174x768 一致;
// 接待中心等路由若未传入 HomeFrame 的 pageVars,否则会沿用此处偏大的 46px,切换 Tab 时图标会突然变大。 // 接待中心等路由若未传入 HomeFrame 的 pageVars,否则会沿用此处偏大的 46px,切换 Tab 时图标会突然变大。
'landscape-1174x768': { 'landscape-1174x768': {
'--padding': '22px', '--padding': '22px',
'--tabbar-height': '640px', '--tabbar-height': '70px',
'--tabbar-icon-size': '34px', '--tabbar-icon-size': '34px',
'--tabbar-width': '140px',
}, },
'landscape-1024x768': { 'landscape-1024x768': {
'--tabbar-height': '600px', '--tabbar-height': '70px',
'--tabbar-icon-size': '32px', '--tabbar-icon-size': '34px',
}, },
'landscape-816x393': { 'landscape-816x393': {
'--tabbar-height': '480px', '--tabbar-height': '70px',
'--tabbar-icon-size': '26px', '--tabbar-icon-size': '34px',
}, },
}, },
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!