feat: Support multiple application launch scripts

This commit is contained in:
vben
2024-07-31 00:29:15 +08:00
parent fdee2d2239
commit a26630b6e0
18 changed files with 204 additions and 24 deletions

View File

@@ -18,7 +18,7 @@ const defaultPreferences: Preferences = {
layout: 'sidebar-nav',
locale: 'zh-CN',
loginExpiredMode: 'modal',
name: 'Vben Admin Naive',
name: 'Vben Admin',
watermark: false,
},
breadcrumb: {

View File

@@ -8,10 +8,10 @@ interface BuiltinThemePreset {
}
const BUILT_IN_THEME_PRESETS: BuiltinThemePreset[] = [
// {
// color: 'hsl(231 98% 65%)',
// type: 'default',
// },
{
color: 'hsl(231 98% 65%)',
type: 'default',
},
{
color: 'hsl(245 82% 67%)',
type: 'violet',

View File

@@ -5,7 +5,7 @@ import {
generatorColorVariables,
} from '@vben-core/shared';
import { BUILT_IN_THEME_PRESETS, type BuiltinThemePreset } from './constants';
import { BUILT_IN_THEME_PRESETS } from './constants';
/**
* 更新主题的 CSS 变量以及其他 CSS 变量
@@ -37,13 +37,9 @@ function updateCSSVariables(preferences: Preferences) {
}
// 获取当前的内置主题
const currentBuiltType = [
{
color: preferences.theme.colorPrimary,
type: 'default',
} as BuiltinThemePreset,
...BUILT_IN_THEME_PRESETS,
].find((item) => item.type === builtinType);
const currentBuiltType = [...BUILT_IN_THEME_PRESETS].find(
(item) => item.type === builtinType,
);
let builtinTypeColorPrimary: string | undefined = '';

View File

@@ -27,10 +27,6 @@ const inputValue = computed(() => {
const builtinThemePresets = computed(() => {
return [
{
color: 'hsl(231 98% 65%)',
type: 'default',
},
// {
// color: 'hsl(231 98% 65%)',
// type: 'default',