fix: The built-in theme does not take effect, fixed #55 [deploy]

pull/48/MERGE
vben 2024-07-29 22:53:04 +08:00
parent cd10eb9471
commit 239f681ea1
4 changed files with 15 additions and 8 deletions

View File

@ -5,10 +5,14 @@ export default {
], ],
'*.{scss,less,styl,html,vue,css}': [ '*.{scss,less,styl,html,vue,css}': [
'prettier --cache --ignore-unknown --write', 'prettier --cache --ignore-unknown --write',
'stylelint --fix', 'stylelint --fix --allow-empty-input',
], ],
'*.md': ['prettier --cache --ignore-unknown --write'], '*.md': ['prettier --cache --ignore-unknown --write'],
'*.vue': ['prettier --write', 'eslint --cache --fix', 'stylelint --fix'], '*.vue': [
'prettier --write',
'eslint --cache --fix',
'stylelint --fix --allow-empty-input',
],
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': [ '{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': [
'prettier --cache --write--parser json', 'prettier --cache --write--parser json',
], ],

View File

@ -443,10 +443,10 @@ $namespace: vben;
// --menu-submenu-opened-background-color: hsl(var(--menu-opened-dark)); // --menu-submenu-opened-background-color: hsl(var(--menu-opened-dark));
--menu-item-background-color: var(--menu-background-color); --menu-item-background-color: var(--menu-background-color);
--menu-item-color: hsl(var(--foreground) / 80%); --menu-item-color: hsl(var(--foreground) / 80%);
--menu-item-hover-color: hsl(var(--primary-foreground)); --menu-item-hover-color: hsl(var(--accent-foreground));
--menu-item-hover-background-color: hsl(var(--accent)); --menu-item-hover-background-color: hsl(var(--accent));
--menu-item-active-color: hsl(var(--foreground)); --menu-item-active-color: hsl(var(--primary-foreground));
--menu-item-active-background-color: hsl(var(--accent)); --menu-item-active-background-color: hsl(var(--primary));
--menu-submenu-hover-color: hsl(var(--foreground)); --menu-submenu-hover-color: hsl(var(--foreground));
--menu-submenu-hover-background-color: hsl(var(--accent)); --menu-submenu-hover-background-color: hsl(var(--accent));
--menu-submenu-active-color: hsl(var(--foreground)); --menu-submenu-active-color: hsl(var(--foreground));

View File

@ -49,6 +49,7 @@ export function useTabbar() {
refreshTab, refreshTab,
toggleTabPin, toggleTabPin,
} = useTabs(); } = useTabs();
const currentActive = computed(() => { const currentActive = computed(() => {
return route.fullPath; return route.fullPath;
}); });

View File

@ -121,10 +121,11 @@ export const useCoreTabbarStore = defineStore('core-tabbar', {
} else { } else {
// 页面已经存在,不重复添加选项卡,只更新选项卡参数 // 页面已经存在,不重复添加选项卡,只更新选项卡参数
const currentTab = toRaw(this.tabs)[tabIndex]; const currentTab = toRaw(this.tabs)[tabIndex];
if (!currentTab.meta.affixTab) { const mergedTab = { ...currentTab, ...tab };
const mergedTab = { ...currentTab, ...tab }; if (Reflect.has(currentTab.meta, 'affixTab')) {
this.tabs.splice(tabIndex, 1, mergedTab); mergedTab.meta.affixTab = currentTab.meta.affixTab;
} }
this.tabs.splice(tabIndex, 1, mergedTab);
} }
this.updateCacheTab(); this.updateCacheTab();
}, },
@ -359,6 +360,7 @@ export const useCoreTabbarStore = defineStore('core-tabbar', {
*/ */
async toggleTabPin(tab: TabDefinition) { async toggleTabPin(tab: TabDefinition) {
const affixTab = tab?.meta?.affixTab ?? false; const affixTab = tab?.meta?.affixTab ?? false;
await (affixTab ? this.unpinTab(tab) : this.pinTab(tab)); await (affixTab ? this.unpinTab(tab) : this.pinTab(tab));
}, },