Commit 4e1673a1 by Lin

style(reception): 增加接待中心列表底部提示文案样式

- 新增列表底部提示文案的字号和行高变量,支持动态适配
- 在竖屏模式下增加底部安全区占位,避免内容被自定义 tabbar 覆盖
- 更新列表底部文本样式以使用新定义的 CSS 变量
1 parent cc2cc630
...@@ -8,6 +8,10 @@ export default { ...@@ -8,6 +8,10 @@ export default {
// 兼容旧变量(scss 里有引用) // 兼容旧变量(scss 里有引用)
'--reception-main-tabs-font-size': '17px', '--reception-main-tabs-font-size': '17px',
// receptionCenter: 列表底部提示文案(加载中/已到底)默认字号(可被 resolutions 覆盖)
'--reception-list-footer-font-size': '13px',
'--reception-list-footer-line-height': '18px',
// receptionCenter: dashboard header 默认样式变量(可被 resolutions 覆盖) // receptionCenter: dashboard header 默认样式变量(可被 resolutions 覆盖)
'--reception-dash-header-content-padding': '16px', '--reception-dash-header-content-padding': '16px',
'--reception-dash-header-margin-bottom': '16px', '--reception-dash-header-margin-bottom': '16px',
...@@ -142,6 +146,10 @@ export default { ...@@ -142,6 +146,10 @@ export default {
// 兼容旧变量(scss 里有引用) // 兼容旧变量(scss 里有引用)
'--reception-main-tabs-font-size': '24px', '--reception-main-tabs-font-size': '24px',
// 针对 768x1174 竖屏:列表底部提示文案字号自适应增大
'--reception-list-footer-font-size': '16px',
'--reception-list-footer-line-height': '22px',
// 针对 768x1174 竖屏:看板头部(header) 尺寸自适应增大 // 针对 768x1174 竖屏:看板头部(header) 尺寸自适应增大
'--reception-dash-header-content-padding': '22px', '--reception-dash-header-content-padding': '22px',
'--reception-dash-header-margin-bottom': '22px', '--reception-dash-header-margin-bottom': '22px',
......
...@@ -138,6 +138,9 @@ ...@@ -138,6 +138,9 @@
<text v-if="receptionListLoadingMore == true" class="list-footer-text">加载中...</text> <text v-if="receptionListLoadingMore == true" class="list-footer-text">加载中...</text>
<text v-else-if="receptionListHasMore != true && receptionRecordList.length > 0" class="list-footer-text">- 已经到底了 -</text> <text v-else-if="receptionListHasMore != true && receptionRecordList.length > 0" class="list-footer-text">- 已经到底了 -</text>
</view> </view>
<!-- 竖屏:底部增加 tabbar 占位 + 安全区 padding,避免内容被自定义 tabbar 覆盖 -->
<view v-if="isPortraitMode == true" class="list-bottom-safe-spacer" :style="bottomSafeSpacerStyle"></view>
</view> </view>
</list-item> </list-item>
</list-view> </list-view>
...@@ -153,6 +156,7 @@ import CustomEmpty from '@/components/CustomEmpty/index.uvue' ...@@ -153,6 +156,7 @@ import CustomEmpty from '@/components/CustomEmpty/index.uvue'
import ReceptionListPrimaryFilter from '../filters/ReceptionListPrimaryFilter.uvue' import ReceptionListPrimaryFilter from '../filters/ReceptionListPrimaryFilter.uvue'
import ReceptionListSecondaryFilter from '../filters/ReceptionListSecondaryFilter.uvue' import ReceptionListSecondaryFilter from '../filters/ReceptionListSecondaryFilter.uvue'
import { cssClassRef } from '@/services/adapter' import { cssClassRef } from '@/services/adapter'
import { getPortraitConfig, PORTRAIT_COMMON } from '@/components/HomeFrame/styles/portrait.uts'
import { import {
getReceptionPortraitListSubTabsConfig, getReceptionPortraitListSubTabsConfig,
type ReceptionPortraitListSubTabsConfig, type ReceptionPortraitListSubTabsConfig,
...@@ -219,6 +223,21 @@ const showCustomerEmpty = computed((): boolean => { ...@@ -219,6 +223,21 @@ const showCustomerEmpty = computed((): boolean => {
const showReceptionEmpty = computed((): boolean => { const showReceptionEmpty = computed((): boolean => {
return props.receptionRecordList.length == 0 && props.receptionListHasMore != true && props.receptionListLoadingMore != true return props.receptionRecordList.length == 0 && props.receptionListHasMore != true && props.receptionListLoadingMore != true
}) })
const isPortraitMode = computed((): boolean => {
const cls = cssClassRef.value
return cls != null && cls.indexOf('layout-portrait') >= 0
})
const bottomSafeSpacerStyle = computed((): UTSJSONObject => {
if (isPortraitMode.value != true) {
return {} as UTSJSONObject
}
const cls = cssClassRef.value
const cfg = getPortraitConfig(cls)
const h = cfg != null ? (cfg.tabbarHeight as number) : (PORTRAIT_COMMON.tabbarHeight as number)
return { height: `${h}px` } as UTSJSONObject
})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
...@@ -364,6 +383,7 @@ const showReceptionEmpty = computed((): boolean => { ...@@ -364,6 +383,7 @@ const showReceptionEmpty = computed((): boolean => {
flex-direction: column; flex-direction: column;
padding-left: 12px; padding-left: 12px;
padding-right: 12px; padding-right: 12px;
padding-bottom: env(safe-area-inset-bottom);
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -380,8 +400,13 @@ const showReceptionEmpty = computed((): boolean => { ...@@ -380,8 +400,13 @@ const showReceptionEmpty = computed((): boolean => {
flex-direction: row; flex-direction: row;
} }
.list-bottom-safe-spacer {
width: 100%;
}
.list-footer-text { .list-footer-text {
font-size: 10px; font-size: var(--reception-list-footer-font-size, 13px);
line-height: var(--reception-list-footer-line-height, 18px);
color: #94A3B8; color: #94A3B8;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!