|
@@ -6,19 +6,39 @@
|
|
<!-- Header 部分(透明背景) -->
|
|
<!-- Header 部分(透明背景) -->
|
|
<el-header class="layout-header" v-if="!isFullScreen" :class="{ 'transparent-header': isSpecialBg }">
|
|
<el-header class="layout-header" v-if="!isFullScreen" :class="{ 'transparent-header': isSpecialBg }">
|
|
<div class="logo-title-row">
|
|
<div class="logo-title-row">
|
|
- <img src="@/assets/logo.png" alt="Logo" class="logo" />
|
|
|
|
|
|
+ <div class="logo-and-lang">
|
|
|
|
+ <img src="@/assets/logo.png" alt="Logo" class="logo" />
|
|
|
|
+
|
|
|
|
+ <!--语言切换按钮(左上方,logo右侧)-->
|
|
|
|
+ <div class="language-toggle-wrapper" :class="{ 'light-text':isSpecialBg}">
|
|
|
|
+ <span class="text-toggle" @click="toggleLanguage">
|
|
|
|
+ {{ currentLanguageName }}
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
<div class="title-and-user">
|
|
<div class="title-and-user">
|
|
<span class="project-name" :class="{ 'light-text': isSpecialBg }">
|
|
<span class="project-name" :class="{ 'light-text': isSpecialBg }">
|
|
- 区域土壤重金属污染风险评估
|
|
|
|
|
|
+ <!--i18n:Title-->{{ $t("Title")}}
|
|
</span>
|
|
</span>
|
|
|
|
|
|
<!-- 用户信息 - 在select-city页面隐藏 -->
|
|
<!-- 用户信息 - 在select-city页面隐藏 -->
|
|
<div class="user-info-row" v-if="!isSelectCity">
|
|
<div class="user-info-row" v-if="!isSelectCity">
|
|
- <span class="welcome-text" :class="{ 'light-text': isSpecialBg }">
|
|
|
|
- 欢迎{{
|
|
|
|
- tokenStore.token.loginType === "admin" ? "管理员" : "用户"
|
|
|
|
- }}登录成功
|
|
|
|
- </span>
|
|
|
|
|
|
+ <span class="welcome-text" :class="{ 'light-text': isSpecialBg }">
|
|
|
|
+ <!-- 欢迎语部分 -->
|
|
|
|
+ <span :class="getLangClass($t('login.welcome'))">
|
|
|
|
+ {{ $t("login.welcome") }}
|
|
|
|
+ </span>
|
|
|
|
+ <!-- 角色名部分(管理员/用户) -->
|
|
|
|
+ <span :class="getLangClass(roleText)">
|
|
|
|
+ {{ roleText }}
|
|
|
|
+ </span>
|
|
|
|
+ <!-- 登录成功提示部分 -->
|
|
|
|
+ <span :class="getLangClass($t('login.loginSuccess'))">
|
|
|
|
+ {{ $t("login.loginSuccess") }}
|
|
|
|
+ </span>
|
|
|
|
+ </span>
|
|
<el-dropdown>
|
|
<el-dropdown>
|
|
<span class="el-dropdown-link">
|
|
<span class="el-dropdown-link">
|
|
<el-avatar :size="40" :class="{ 'light-avatar-border': isSpecialBg }"
|
|
<el-avatar :size="40" :class="{ 'light-avatar-border': isSpecialBg }"
|
|
@@ -26,8 +46,8 @@
|
|
</span>
|
|
</span>
|
|
<template #dropdown>
|
|
<template #dropdown>
|
|
<el-dropdown-menu>
|
|
<el-dropdown-menu>
|
|
- <el-dropdown-item disabled>用户名:{{ userInfo.name }}</el-dropdown-item>
|
|
|
|
- <el-dropdown-item divided @click="handleLogout">退出登录</el-dropdown-item>
|
|
|
|
|
|
+ <el-dropdown-item disabled>{{ $t("login.userName")}}{{ userInfo.name }}</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item divided @click="handleLogout">{{ $t("login.exitlogin")}}</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
</template>
|
|
</template>
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
@@ -42,13 +62,17 @@
|
|
<el-tab-pane v-for="tab in tabs" :key="tab.name" :name="tab.name">
|
|
<el-tab-pane v-for="tab in tabs" :key="tab.name" :name="tab.name">
|
|
<template #label>
|
|
<template #label>
|
|
<i :class="['tab-icon', tab.icon]"></i>
|
|
<i :class="['tab-icon', tab.icon]"></i>
|
|
- <span class="tab-label-text">{{ tab.label }}</span>
|
|
|
|
|
|
+ <span class="tab-label-text"
|
|
|
|
+ :class="locale === 'en'?'en-label':'zh-label'"
|
|
|
|
+ >{{ tab.label }}</span>
|
|
</template>
|
|
</template>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
<div v-else class="single-tab" @click="handleClick(tabs[0], $event)">
|
|
<div v-else class="single-tab" @click="handleClick(tabs[0], $event)">
|
|
<i :class="['tab-icon', tabs[0].icon]"></i>
|
|
<i :class="['tab-icon', tabs[0].icon]"></i>
|
|
- <span class="tab-label-text">{{ tabs[0].label }}</span>
|
|
|
|
|
|
+ <span class="tab-label-text"
|
|
|
|
+ :class="locale === 'en' ?'en-label':'zh-label'"
|
|
|
|
+ >{{ tabs[0].label }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -77,12 +101,26 @@ import { useRouter, useRoute } from "vue-router";
|
|
import { useTokenStore } from "@/stores/mytoken";
|
|
import { useTokenStore } from "@/stores/mytoken";
|
|
import { ElMessageBox, ElMessage } from "element-plus";
|
|
import { ElMessageBox, ElMessage } from "element-plus";
|
|
import { logout } from "@/API/users";
|
|
import { logout } from "@/API/users";
|
|
|
|
+import { useI18n } from "vue-i18n";
|
|
|
|
+const { t }=useI18n();
|
|
|
|
|
|
|
|
+const {locale}=useI18n();//获取i18n实例
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
const tokenStore = useTokenStore();
|
|
const tokenStore = useTokenStore();
|
|
const currentBgImage = ref("");
|
|
const currentBgImage = ref("");
|
|
|
|
|
|
|
|
+//当前语言名称
|
|
|
|
+const currentLanguageName = computed(()=>{
|
|
|
|
+ return locale.value ==="zh"?"English":"中文";
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+const toggleLanguage = ()=>{
|
|
|
|
+ locale.value = locale.value === "zh"?"en":"zh";
|
|
|
|
+ localStorage.setItem("lang",locale.value);
|
|
|
|
+ ElMessage.success(`已切换为${locale.value === 'zh' ?'中文' :'英文'}`)
|
|
|
|
+}
|
|
|
|
+
|
|
// 定义需要背景图的特殊路由和对应图片文件名
|
|
// 定义需要背景图的特殊路由和对应图片文件名
|
|
const bgRouteMap: Record<string, string> = {
|
|
const bgRouteMap: Record<string, string> = {
|
|
// 添加灌溉水相关页面的背景图
|
|
// 添加灌溉水相关页面的背景图
|
|
@@ -163,7 +201,7 @@ const tabs = computed(() => {
|
|
return [
|
|
return [
|
|
{
|
|
{
|
|
name: "dataManagement",
|
|
name: "dataManagement",
|
|
- label: "数据管理",
|
|
|
|
|
|
+ label: t("Menu.dataManagement"),//数据管理
|
|
icon: "el-icon-folder",
|
|
icon: "el-icon-folder",
|
|
routes: [
|
|
routes: [
|
|
"/soilAcidReductionData",
|
|
"/soilAcidReductionData",
|
|
@@ -179,13 +217,13 @@ const tabs = computed(() => {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "infoManagement",
|
|
name: "infoManagement",
|
|
- label: "信息管理",
|
|
|
|
|
|
+ label: t("Menu.infoManagement"),//信息管理
|
|
icon: "el-icon-document",
|
|
icon: "el-icon-document",
|
|
routes: ["/IntroductionUpdate"],
|
|
routes: ["/IntroductionUpdate"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "modelManagement",
|
|
name: "modelManagement",
|
|
- label: "模型管理及配置",
|
|
|
|
|
|
+ label: t("Menu.modelManagement"),//模型管理及配置
|
|
icon: "el-icon-cpu",
|
|
icon: "el-icon-cpu",
|
|
routes: [
|
|
routes: [
|
|
"/CadmiumPredictionModel",
|
|
"/CadmiumPredictionModel",
|
|
@@ -200,7 +238,7 @@ const tabs = computed(() => {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "userManagement",
|
|
name: "userManagement",
|
|
- label: "用户管理",
|
|
|
|
|
|
+ label: t("Menu.userManagement"),//用户管理
|
|
icon: "el-icon-user",
|
|
icon: "el-icon-user",
|
|
routes: ["/UserManagement", "/UserRegistration"],
|
|
routes: ["/UserManagement", "/UserRegistration"],
|
|
},
|
|
},
|
|
@@ -209,19 +247,19 @@ const tabs = computed(() => {
|
|
return [
|
|
return [
|
|
{
|
|
{
|
|
name: "shuJuKanBan",
|
|
name: "shuJuKanBan",
|
|
- label: "数据看板",
|
|
|
|
|
|
+ label: t("i18n:Menu.shuJuKanBan"),//数据看板
|
|
icon: "el-icon-data-analysis",
|
|
icon: "el-icon-data-analysis",
|
|
routes: ["/shuJuKanBan"],
|
|
routes: ["/shuJuKanBan"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "introduction",
|
|
name: "introduction",
|
|
- label: "软件简介",
|
|
|
|
|
|
+ label: t("i18n:Menu.introduction"),//软件简介
|
|
icon: "el-icon-info-filled",
|
|
icon: "el-icon-info-filled",
|
|
routes: ["/SoilPro", "/Overview", "/ResearchFindings", "/Unit"],
|
|
routes: ["/SoilPro", "/Overview", "/ResearchFindings", "/Unit"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "HmOutFlux",
|
|
name: "HmOutFlux",
|
|
- label: "重金属输入通量",
|
|
|
|
|
|
+ label: t("Menu.HmOutFlux"),//重金属输入通量
|
|
icon: "el-icon-refresh",
|
|
icon: "el-icon-refresh",
|
|
routes: [
|
|
routes: [
|
|
"/samplingMethodDevice1",
|
|
"/samplingMethodDevice1",
|
|
@@ -238,7 +276,7 @@ const tabs = computed(() => {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "hmInFlux",
|
|
name: "hmInFlux",
|
|
- label: "重金属输出通量",
|
|
|
|
|
|
+ label: t("Menu.hmInFlux"),//重金属输出通量
|
|
icon: "el-icon-refresh",
|
|
icon: "el-icon-refresh",
|
|
routes: [
|
|
routes: [
|
|
"/samplingDesc1",
|
|
"/samplingDesc1",
|
|
@@ -253,13 +291,13 @@ const tabs = computed(() => {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "mapView",
|
|
name: "mapView",
|
|
- label: "地图展示",
|
|
|
|
|
|
+ label: t("Menu.mapView"),//地图展示
|
|
icon: "el-icon-map-location",
|
|
icon: "el-icon-map-location",
|
|
routes: ["/mapView"],
|
|
routes: ["/mapView"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "cadmiumPrediction",
|
|
name: "cadmiumPrediction",
|
|
- label: "土壤污染物含量预测",
|
|
|
|
|
|
+ label: t("Menu.cadmiumPrediction"),//土壤污染物含量预测
|
|
icon: "el-icon-c-scale-to-original",
|
|
icon: "el-icon-c-scale-to-original",
|
|
routes: [
|
|
routes: [
|
|
"/totalInputFlux",
|
|
"/totalInputFlux",
|
|
@@ -273,25 +311,25 @@ const tabs = computed(() => {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "cropRiskAssessment",
|
|
name: "cropRiskAssessment",
|
|
- label: "作物风险评估",
|
|
|
|
|
|
+ label: t("Menu.cropRiskAssessment"),//作物风险评估
|
|
icon: "el-icon-warning",
|
|
icon: "el-icon-warning",
|
|
routes: ["/cropRiskAssessment"],
|
|
routes: ["/cropRiskAssessment"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "farmlandQualityAssessment",
|
|
name: "farmlandQualityAssessment",
|
|
- label: "耕地质量评估",
|
|
|
|
|
|
+ label:t("Menu.farmlandQualityAssessment"),//耕地质量评估
|
|
icon: "el-icon-rank",
|
|
icon: "el-icon-rank",
|
|
routes: ["/farmlandQualityAssessment"],
|
|
routes: ["/farmlandQualityAssessment"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "soilAcidificationPrediction",
|
|
name: "soilAcidificationPrediction",
|
|
- label: "土壤酸化预测",
|
|
|
|
|
|
+ label: t("Menu.soilAcidificationPrediction"),//土壤酸化预测
|
|
icon: "el-icon-magic-stick",
|
|
icon: "el-icon-magic-stick",
|
|
routes: ["/Calculation", "/AcidNeutralizationModel"],
|
|
routes: ["/Calculation", "/AcidNeutralizationModel"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "scenarioSimulation",
|
|
name: "scenarioSimulation",
|
|
- label: "情景模拟",
|
|
|
|
|
|
+ label: t("Menu.scenarioSimulation"),//情景模拟
|
|
icon: "el-icon-s-operation",
|
|
icon: "el-icon-s-operation",
|
|
routes: [
|
|
routes: [
|
|
"/TraditionalFarmingRisk",
|
|
"/TraditionalFarmingRisk",
|
|
@@ -301,7 +339,7 @@ const tabs = computed(() => {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "dataStatistics",
|
|
name: "dataStatistics",
|
|
- label: "数据统计",
|
|
|
|
|
|
+ label: t("Menu.dataStatistics"),//数据统计
|
|
icon: "el-icon-pie-chart",
|
|
icon: "el-icon-pie-chart",
|
|
routes: [
|
|
routes: [
|
|
"/DetectionStatistics",
|
|
"/DetectionStatistics",
|
|
@@ -390,20 +428,29 @@ const mainStyle = computed(() => {
|
|
overflow: "hidden",
|
|
overflow: "hidden",
|
|
};
|
|
};
|
|
});
|
|
});
|
|
-</script>
|
|
|
|
|
|
|
|
|
|
+// 新增:判断文本是否为中文,返回对应样式类
|
|
|
|
+const getLangClass = (text: string) => {
|
|
|
|
+ // 匹配中文Unicode范围(\u4e00-\u9fa5)
|
|
|
|
+ const isChinese = /[\u4e00-\u9fa5]/.test(text);
|
|
|
|
+ return isChinese ? 'welcome-chinese' : 'welcome-english';
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+// 新增:角色名文本(建议用i18n翻译,避免硬编码)
|
|
|
|
+const roleText = computed(() => {
|
|
|
|
+ return tokenStore.token.loginType === "admin"
|
|
|
|
+ ? t('role.admin') // 中文"管理员",英文"Admin"(需在i18n配置)
|
|
|
|
+ : t('role.user'); // 中文"用户",英文"User"(需在i18n配置)
|
|
|
|
+});
|
|
|
|
+</script>
|
|
<style>
|
|
<style>
|
|
/* 隐藏所有滚动条 */
|
|
/* 隐藏所有滚动条 */
|
|
*::-webkit-scrollbar {
|
|
*::-webkit-scrollbar {
|
|
display: none;
|
|
display: none;
|
|
- /* Chrome, Safari, Opera */
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
* {
|
|
* {
|
|
-ms-overflow-style: none;
|
|
-ms-overflow-style: none;
|
|
- /* IE and Edge */
|
|
|
|
scrollbar-width: none;
|
|
scrollbar-width: none;
|
|
- /* Firefox */
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/* 整体布局容器 */
|
|
/* 整体布局容器 */
|
|
@@ -413,11 +460,10 @@ const mainStyle = computed(() => {
|
|
height: 100vh;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
position: relative;
|
|
position: relative;
|
|
- background-color: #f5f7fa;
|
|
|
|
- /* 默认背景色 */
|
|
|
|
|
|
+ background-color: transparent;
|
|
}
|
|
}
|
|
|
|
|
|
-/* 背景层 - 关键修改 */
|
|
|
|
|
|
+/* 背景层 */
|
|
.background-layer {
|
|
.background-layer {
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 0;
|
|
top: 0;
|
|
@@ -437,32 +483,6 @@ const mainStyle = computed(() => {
|
|
min-height: 100vh;
|
|
min-height: 100vh;
|
|
}
|
|
}
|
|
|
|
|
|
-/* 特殊背景页面的Header样式 */
|
|
|
|
-.transparent-header {
|
|
|
|
- background: transparent !important;
|
|
|
|
- backdrop-filter: blur(2px);
|
|
|
|
- /* 添加轻微模糊效果增强可读性 */
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/* 特殊背景页面的文字颜色 */
|
|
|
|
-.light-text {
|
|
|
|
- color: #ffffff !important;
|
|
|
|
- /* 白色文字 */
|
|
|
|
- text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
|
|
|
|
- /* 文字阴影增强可读性 */
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/* 特殊背景页面的头像边框 */
|
|
|
|
-.light-avatar-border {
|
|
|
|
- border: 2px solid #ffffff !important;
|
|
|
|
- /* 白色边框 */
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/* 内容区域在特殊背景页面透明 */
|
|
|
|
-.transparent-scroll {
|
|
|
|
- background-color: transparent !important;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/* Header 样式 */
|
|
/* Header 样式 */
|
|
.layout-header {
|
|
.layout-header {
|
|
height: 150px;
|
|
height: 150px;
|
|
@@ -470,64 +490,95 @@ const mainStyle = computed(() => {
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
color: #333;
|
|
color: #333;
|
|
- /* 深色文字 */
|
|
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
position: relative;
|
|
- z-index: 2;
|
|
|
|
- /* 确保在背景层上方 */
|
|
|
|
- background-color: white;
|
|
|
|
- /* 默认背景色 */
|
|
|
|
|
|
+ z-index: 1;
|
|
|
|
+ background-color: transparent;
|
|
}
|
|
}
|
|
|
|
|
|
.logo-title-row {
|
|
.logo-title-row {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- gap: 24px;
|
|
|
|
|
|
+ gap: 40px;
|
|
width: 100%;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+.logo-and-lang {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: center;
|
|
|
|
+ gap: 8px;
|
|
|
|
+}
|
|
|
|
+
|
|
.title-and-user {
|
|
.title-and-user {
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
flex: 1;
|
|
}
|
|
}
|
|
|
|
|
|
-/* 用户信息区域 */
|
|
|
|
.user-info-row {
|
|
.user-info-row {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
gap: 24px;
|
|
gap: 24px;
|
|
color: #333;
|
|
color: #333;
|
|
- /* 深色文字 */
|
|
|
|
padding-top: 1px;
|
|
padding-top: 1px;
|
|
position: static;
|
|
position: static;
|
|
z-index: 1;
|
|
z-index: 1;
|
|
}
|
|
}
|
|
|
|
|
|
-.welcome-text {
|
|
|
|
- font-size: 28px;
|
|
|
|
- font-weight: 500;
|
|
|
|
- color: #333 !important;
|
|
|
|
- /* 深色文字 */
|
|
|
|
|
|
+/* 欢迎文本-中文样式 */
|
|
|
|
+.welcome-text .welcome-chinese {
|
|
|
|
+ font-family: "Microsoft YaHei", "SimHei", sans-serif; /* 中文字体 */
|
|
|
|
+ font-size: 28px; /* 中文字号 */
|
|
|
|
+ margin: 0 2px; /* 与其他片段的间距 */
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/* 欢迎文本-英文样式 */
|
|
|
|
+.welcome-text .welcome-english {
|
|
|
|
+ font-family: "Arial", "Helvetica", sans-serif; /* 英文字体 */
|
|
|
|
+ font-size: 24px; /* 英文字号(可与中文不同) */
|
|
|
|
+ letter-spacing: 0.5px; /* 英文字母间距优化 */
|
|
|
|
+ margin: 0 2px; /* 与其他片段的间距 */
|
|
}
|
|
}
|
|
|
|
|
|
-/* Tab 区域 - 不透明 */
|
|
|
|
|
|
+/* 特殊背景下的浅色文本兼容 */
|
|
|
|
+.welcome-text.light-text .welcome-chinese,
|
|
|
|
+.welcome-text.light-text .welcome-english {
|
|
|
|
+ color: #fff; /* 保持与原light-text的颜色一致 */
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/* Tab 区域核心修复 */
|
|
.tabs-row {
|
|
.tabs-row {
|
|
height: 48px;
|
|
height: 48px;
|
|
display: flex;
|
|
display: flex;
|
|
- justify-content: center;
|
|
|
|
align-items: center;
|
|
align-items: center;
|
|
- padding: 0 24px;
|
|
|
|
|
|
+ padding: 0 12px;
|
|
background: linear-gradient(to right, #1092d8, #02c3ad);
|
|
background: linear-gradient(to right, #1092d8, #02c3ad);
|
|
border-bottom: none !important;
|
|
border-bottom: none !important;
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
position: relative;
|
|
z-index: 2;
|
|
z-index: 2;
|
|
- /* 确保在背景层上方 */
|
|
|
|
|
|
+ overflow-x: auto; /* 外层滚动容器 */
|
|
|
|
+ overflow-y: hidden;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/* 隐藏 Tab 滚动条 */
|
|
|
|
+.tabs-row::-webkit-scrollbar {
|
|
|
|
+ display: none;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/* 修复 Element Plus Tabs 内部滚动 */
|
|
|
|
+.el-tabs__nav-scroll {
|
|
|
|
+ overflow-x: auto !important;
|
|
|
|
+ overflow-y: hidden !important;
|
|
|
|
+ width: 100% !important;
|
|
|
|
+}
|
|
|
|
+.el-tabs__nav {
|
|
|
|
+ flex-wrap: nowrap !important;
|
|
|
|
+ width: auto !important;
|
|
}
|
|
}
|
|
|
|
|
|
-/* el-tabs 外层容器 */
|
|
|
|
.demo-tabs {
|
|
.demo-tabs {
|
|
height: 48px !important;
|
|
height: 48px !important;
|
|
display: flex;
|
|
display: flex;
|
|
@@ -538,37 +589,29 @@ const mainStyle = computed(() => {
|
|
border-bottom: none !important;
|
|
border-bottom: none !important;
|
|
}
|
|
}
|
|
|
|
|
|
-/* 清除滑块条和底部线条 */
|
|
|
|
.el-tabs__nav-wrap::after,
|
|
.el-tabs__nav-wrap::after,
|
|
.el-tabs__active-bar {
|
|
.el-tabs__active-bar {
|
|
display: none !important;
|
|
display: none !important;
|
|
- height: 0 !important;
|
|
|
|
- border: none !important;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-.el-tabs__nav-scroll {
|
|
|
|
- padding: 0 !important;
|
|
|
|
- margin: 0 !important;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/* Tabs 单项样式 */
|
|
|
|
.el-tabs__item {
|
|
.el-tabs__item {
|
|
height: 48px !important;
|
|
height: 48px !important;
|
|
line-height: 48px !important;
|
|
line-height: 48px !important;
|
|
display: flex !important;
|
|
display: flex !important;
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
- padding: 0 20px !important;
|
|
|
|
- font-size: 20px;
|
|
|
|
|
|
+ padding: 0 12px !important; /* 更小内边距 */
|
|
|
|
+ min-width: auto !important;
|
|
|
|
+ font-size: 14px; /* 统一字体大小 */
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
border-radius: 10px;
|
|
border-radius: 10px;
|
|
transition: all 0.2s ease-in-out;
|
|
transition: all 0.2s ease-in-out;
|
|
background-color: transparent;
|
|
background-color: transparent;
|
|
position: relative;
|
|
position: relative;
|
|
z-index: 1;
|
|
z-index: 1;
|
|
|
|
+ white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
|
|
-/* 激活 Tab */
|
|
|
|
.el-tabs__item.is-active {
|
|
.el-tabs__item.is-active {
|
|
background-color: #2a53ba;
|
|
background-color: #2a53ba;
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
@@ -577,25 +620,52 @@ const mainStyle = computed(() => {
|
|
z-index: 2;
|
|
z-index: 2;
|
|
}
|
|
}
|
|
|
|
|
|
-/* 鼠标悬停 */
|
|
|
|
.el-tabs__item:hover {
|
|
.el-tabs__item:hover {
|
|
background-color: #455a64;
|
|
background-color: #455a64;
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
}
|
|
}
|
|
|
|
|
|
-/* 图标样式 */
|
|
|
|
.tab-icon {
|
|
.tab-icon {
|
|
font-size: 24px;
|
|
font-size: 24px;
|
|
margin-right: 4px;
|
|
margin-right: 4px;
|
|
color: inherit;
|
|
color: inherit;
|
|
}
|
|
}
|
|
|
|
|
|
-/* 文字样式 */
|
|
|
|
|
|
+/* 语言切换 */
|
|
|
|
+.language-toggle-wrapper {
|
|
|
|
+ margin: 0 20px;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.text-toggle {
|
|
|
|
+ color: black;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ text-decoration: underline;
|
|
|
|
+ transition: color 0.3s;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/* 标签文字样式 */
|
|
.tab-label-text {
|
|
.tab-label-text {
|
|
- font-size: 20px;
|
|
|
|
- color: inherit;
|
|
|
|
- line-height: 1;
|
|
|
|
- display: inline-block;
|
|
|
|
|
|
+ white-space: nowrap !important;
|
|
|
|
+ overflow: hidden !important;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.zh-label {
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ color: black;
|
|
|
|
+ font-weight: 1000;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.en-label {
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ color: black;
|
|
|
|
+ letter-spacing: 0.2px;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
|
|
.logo {
|
|
.logo {
|
|
@@ -607,7 +677,6 @@ const mainStyle = computed(() => {
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
margin-top: 30px;
|
|
margin-top: 30px;
|
|
color: #333;
|
|
color: #333;
|
|
- /* 深色文字 */
|
|
|
|
}
|
|
}
|
|
|
|
|
|
.layout-main-container {
|
|
.layout-main-container {
|
|
@@ -617,10 +686,8 @@ const mainStyle = computed(() => {
|
|
min-height: 0;
|
|
min-height: 0;
|
|
position: relative;
|
|
position: relative;
|
|
z-index: 1;
|
|
z-index: 1;
|
|
- /* 确保在背景层上方 */
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-/* 侧边栏 - 白色背景 */
|
|
|
|
.layout-aside {
|
|
.layout-aside {
|
|
width: 360px;
|
|
width: 360px;
|
|
background: linear-gradient(to bottom, #B7F1FC, #FFF8F0);
|
|
background: linear-gradient(to bottom, #B7F1FC, #FFF8F0);
|
|
@@ -631,23 +698,31 @@ const mainStyle = computed(() => {
|
|
height: 100%;
|
|
height: 100%;
|
|
position: relative;
|
|
position: relative;
|
|
z-index: 2;
|
|
z-index: 2;
|
|
- /* 确保在背景层上方 */
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-/* 隐藏侧边栏滚动条 */
|
|
|
|
.layout-aside::-webkit-scrollbar {
|
|
.layout-aside::-webkit-scrollbar {
|
|
display: none;
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
|
|
-.layout-aside .el-menu-item,
|
|
|
|
|
|
+.layout-aside .el-menu-item {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: 500; /* 可选:调整粗细 */
|
|
|
|
+ color: #333; /* 可选:调整颜色 */
|
|
|
|
+ /* 其他公共样式(如 padding、过渡效果 可保留) */
|
|
|
|
+ background-color: transparent;
|
|
|
|
+ transition: all 0.2s ease;
|
|
|
|
+ border-radius: 6px;
|
|
|
|
+ padding: 12px 16px !important;
|
|
|
|
+}
|
|
.layout-aside .el-sub-menu__title {
|
|
.layout-aside .el-sub-menu__title {
|
|
- font-size: 18px;
|
|
|
|
|
|
+ font-size: 15px;
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
color: #000000;
|
|
color: #000000;
|
|
background-color: transparent;
|
|
background-color: transparent;
|
|
transition: all 0.2s ease;
|
|
transition: all 0.2s ease;
|
|
border-radius: 6px;
|
|
border-radius: 6px;
|
|
padding: 12px 16px !important;
|
|
padding: 12px 16px !important;
|
|
|
|
+ letter-spacing: -1px;
|
|
}
|
|
}
|
|
|
|
|
|
.layout-aside .el-menu-item:hover,
|
|
.layout-aside .el-menu-item:hover,
|
|
@@ -673,7 +748,6 @@ const mainStyle = computed(() => {
|
|
position: relative;
|
|
position: relative;
|
|
}
|
|
}
|
|
|
|
|
|
-/* 强制重置 el-tabs header 高度/边距/背景/阴影,避免背景层穿透错位 */
|
|
|
|
.el-tabs__header.is-top {
|
|
.el-tabs__header.is-top {
|
|
height: 48px !important;
|
|
height: 48px !important;
|
|
margin: 0 !important;
|
|
margin: 0 !important;
|
|
@@ -684,7 +758,6 @@ const mainStyle = computed(() => {
|
|
z-index: 0 !important;
|
|
z-index: 0 !important;
|
|
}
|
|
}
|
|
|
|
|
|
-/* 全屏页面特殊处理 */
|
|
|
|
.layout-wrapper.full-screen .layout-main-container {
|
|
.layout-wrapper.full-screen .layout-main-container {
|
|
height: 100vh;
|
|
height: 100vh;
|
|
}
|
|
}
|
|
@@ -694,8 +767,7 @@ const mainStyle = computed(() => {
|
|
overflow: auto;
|
|
overflow: auto;
|
|
padding: 0 20px;
|
|
padding: 0 20px;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
- background-color: white;
|
|
|
|
- /* 默认背景色 */
|
|
|
|
|
|
+ background-color: transparent;
|
|
}
|
|
}
|
|
|
|
|
|
.scrollable-content.transparent-scroll {
|
|
.scrollable-content.transparent-scroll {
|