Commit 06a09850 by Lin

refactor(reception): 移除接待中心主标签的样式覆盖逻辑

- 删除与分辨率相关的样式计算,简化主标签样式定义
- 确保主标签样式在所有设备上保持一致性
1 parent de5a2274
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<!-- Tab 切换 --> <!-- Tab 切换 -->
<view v-if="isLandscape != true" <view v-if="isLandscape != true"
class="reception-tabs-container" class="reception-tabs-container"
:style="receptionTabsContainerStyle"> >
<un-tabs :active-style="mainTabActiveStyle" <un-tabs :active-style="mainTabActiveStyle"
class="reception-main-tabs" class="reception-main-tabs"
:height="mainTabBarHeight" :height="mainTabBarHeight"
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
:line-height="mainTabLineHeight" :line-height="mainTabLineHeight"
:line-width="mainTabLineWidth" :line-width="mainTabLineWidth"
:list="mainTabs" :list="mainTabs"
:style="receptionMainTabsShellStyle"
:value="mainTabIndex" :value="mainTabIndex"
@change="onMainTabChange"> @change="onMainTabChange">
</un-tabs> </un-tabs>
...@@ -177,7 +176,6 @@ import { storage } from "@/utils/storage.uts"; ...@@ -177,7 +176,6 @@ import { storage } from "@/utils/storage.uts";
import FormDetail from "./forms/FormDetail.uvue"; import FormDetail from "./forms/FormDetail.uvue";
import ReceptionDetail from "./receptionDetail.uvue"; import ReceptionDetail from "./receptionDetail.uvue";
import pageVars from "./styles/index.vars"; import pageVars from "./styles/index.vars";
import { getReceptionPortraitMainTabsConfig, type ReceptionPortraitMainTabsConfig } from "./styles/portrait.uts";
import ReceptionCustomerListTab from "./tabs/ReceptionCustomerListTab.uvue"; import ReceptionCustomerListTab from "./tabs/ReceptionCustomerListTab.uvue";
import ReceptionDashboardTab from "./tabs/ReceptionDashboardTab.uvue"; import ReceptionDashboardTab from "./tabs/ReceptionDashboardTab.uvue";
import { getCurrentMonthRange, getMockPerformanceData, getNum, getStr, getTodayDayRangeStrings, mergeByKey, resolveHasMore } from "./types/reception-center-helpers.uts"; import { getCurrentMonthRange, getMockPerformanceData, getNum, getStr, getTodayDayRangeStrings, mergeByKey, resolveHasMore } from "./types/reception-center-helpers.uts";
...@@ -227,95 +225,24 @@ const mainTabs: UnTabItem[] = [ ...@@ -227,95 +225,24 @@ const mainTabs: UnTabItem[] = [
{ name: "业绩看板" } as UnTabItem, { name: "业绩看板" } as UnTabItem,
{ name: "客户列表" } as UnTabItem { name: "客户列表" } as UnTabItem
]; ];
/** 仅 layout-portrait-768x1174 有值;其它分辨率为 null,主 Tab 保持模板 + scss 原样式 */ // 主 Tab(un-tabs)样式:固定使用默认档位(移除 portrait.uts 的分辨率覆盖逻辑)
const receptionPortraitMainTabsOverride = computed((): null | ReceptionPortraitMainTabsConfig => { const mainTabBarHeight = 52;
return getReceptionPortraitMainTabsConfig(cssClassRef.value); const mainTabLineWidth = 42;
}); const mainTabLineHeight = 4;
const mainTabActiveStyle = {
const receptionTabsContainerStyle = computed((): UTSJSONObject => {
const c = receptionPortraitMainTabsOverride.value;
if (c == null) {
return {} as UTSJSONObject;
}
return {
padding: c.containerPadding,
marginTop: "30px",
} as UTSJSONObject;
});
const receptionMainTabsShellStyle = computed((): UTSJSONObject => {
const c = receptionPortraitMainTabsOverride.value;
if (c == null) {
return {} as UTSJSONObject;
}
return {
padding: c.mainTabsPadding,
borderRadius: c.mainTabsBorderRadius,
boxShadow: c.mainTabsBoxShadow
} as UTSJSONObject;
});
const mainTabBarHeight = computed((): number => {
const c = receptionPortraitMainTabsOverride.value;
return c != null ? c.height : 52;
});
const mainTabLineWidth = computed((): number => {
const c = receptionPortraitMainTabsOverride.value;
return c != null ? c.lineWidth : 42;
});
const mainTabLineHeight = computed((): number => {
const c = receptionPortraitMainTabsOverride.value;
return c != null ? c.lineHeight : 4;
});
const mainTabActiveStyle = computed((): UTSJSONObject => {
const c = receptionPortraitMainTabsOverride.value;
if (c == null) {
return {
color: "#1677ff", color: "#1677ff",
fontWeight: 700, fontWeight: 700,
fontSize: "17px" fontSize: "17px"
} as UTSJSONObject; } as UTSJSONObject;
} const mainTabInactiveStyle = {
return {
color: "#1677ff",
fontWeight: 700,
fontSize: c.activeFontSize
} as UTSJSONObject;
});
const mainTabInactiveStyle = computed((): UTSJSONObject => {
const c = receptionPortraitMainTabsOverride.value;
if (c == null) {
return {
color: "#94a3b8", color: "#94a3b8",
fontWeight: 500, fontWeight: 500,
fontSize: "15px" fontSize: "15px"
} as UTSJSONObject; } as UTSJSONObject;
} const mainTabItemStyle = {
return {
color: "#94a3b8",
fontWeight: 400,
fontSize: c.inactiveFontSize
} as UTSJSONObject;
});
const mainTabItemStyle = computed((): UTSJSONObject => {
const c = receptionPortraitMainTabsOverride.value;
if (c == null) {
return {
paddingLeft: "18px", paddingLeft: "18px",
paddingRight: "18px" paddingRight: "18px"
} as UTSJSONObject; } as UTSJSONObject;
}
return {
paddingLeft: c.itemPaddingLeft,
paddingRight: c.itemPaddingRight,
paddingBottom: c.itemPaddingBottom
} as UTSJSONObject;
});
/** 客户列表下的二级 Tab:0=客户录入,1=接待复盘(原 rightTabIndex) */ /** 客户列表下的二级 Tab:0=客户录入,1=接待复盘(原 rightTabIndex) */
const listSubTabIndex = ref(0); const listSubTabIndex = ref(0);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!