修复:项目配置 空白,多标签背景色 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,5 +1,14 @@
# CHANGELOG # CHANGELOG
## 1.6.1 (2022-01-06)
### 🐛 Bug Fixes
- 修复 `项目配置` 打开空白
- 修复 `多标签` 背景和字体色变量丢失
- ### ✨ Features
- 依赖升级
## 1.6.0 (2021-12-24) ## 1.6.0 (2021-12-24)
### 🐛 Bug Fixes ### 🐛 Bug Fixes

View File

@@ -1,5 +1,5 @@
## 留步 ## 留步
少侠留步,早知如此绊人心,何如当初莫相识,右上角免费的 `Star` 点一点,帮我们突破一下 `1.5k`谢谢O(∩_∩)O 少侠留步,早知如此绊人心,何如当初莫相识,右上角免费的 `Star` 点一点,帮我们突破一下 `2k`谢谢O(∩_∩)O
## 简介 ## 简介

View File

@@ -1,6 +1,6 @@
{ {
"name": "naive-ui-admin", "name": "naive-ui-admin",
"version": "1.6.0", "version": "1.6.1",
"author": { "author": {
"name": "Ahjung", "name": "Ahjung",
"email": "735878602@qq.com", "email": "735878602@qq.com",

View File

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

View File

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

1423
yarn.lock

File diff suppressed because it is too large Load Diff