修复:项目配置 空白,多标签背景色 bug

This commit is contained in:
xiaoma
2022-01-06 09:50:28 +08:00
parent c0ff8985ea
commit 8288f0a84b
6 changed files with 723 additions and 736 deletions

View File

@@ -1,6 +1,6 @@
<template>
<n-drawer v-model:show="isDrawer" :width="width" :placement="placement" :native-scrollbar="false">
<n-drawer-content :title="title">
<n-drawer v-model:show="isDrawer" :width="width" :placement="placement">
<n-drawer-content :title="title" :native-scrollbar="false">
<div class="drawer">
<n-divider title-placement="center">主题</n-divider>
@@ -358,7 +358,7 @@
border-radius: 2px;
margin: 0 5px 5px 0;
text-align: center;
line-height: 14px;
.n-icon {
color: #fff;
}

View File

@@ -115,6 +115,7 @@
import elementResizeDetectorMaker from 'element-resize-detector';
import { useDesignSetting } from '@/hooks/setting/useDesignSetting';
import { useProjectSettingStore } from '@/store/modules/projectSetting';
import { useThemeVars } from 'naive-ui';
export default defineComponent({
name: 'TabsView',
@@ -145,6 +146,16 @@
const navWrap: any = ref(null);
const isCurrent = ref(false);
const themeVars = useThemeVars();
const getCardColor = computed(() => {
return themeVars.value.cardColor;
});
const getBaseColor = computed(() => {
return themeVars.value.textColor1;
});
const state = reactive({
activeKey: route.fullPath,
scrollable: false,
@@ -505,6 +516,8 @@
onClickOutside,
getDarkTheme,
getAppTheme,
getCardColor,
getBaseColor,
};
},
});
@@ -565,8 +578,8 @@
overflow: hidden;
&-item {
background: var(--color);
color: var(--text-color);
background: v-bind(getCardColor);
color: v-bind(getBaseColor);
height: 32px;
padding: 6px 16px 4px;
border-radius: 3px;