Files
admin-vben5/apps/web-antd/src/preferences.ts

75 lines
2.0 KiB
TypeScript
Raw Normal View History

2025-06-18 11:03:42 +08:00
import { defineOverridesPreferences } from '@vben/preferences';
2025-07-24 11:21:50 +08:00
import logo from '../src/assets/logo.png'
import logoDark from '../src/assets/logoDark.png'
import logoLight from '../src/assets/logoLight.png'
import { preferences, usePreferences } from '@vben/preferences';
const { isDark } = usePreferences();
2025-06-18 11:03:42 +08:00
/**
* @description
* 使
* !!!
*/
export const overridesPreferences = defineOverridesPreferences({
// overrides
app: {
/**
*
*/
accessMode: 'backend',
/**
* refresh token
*/
enableRefreshToken: false,
/**
* url链接或vite导入的图片链接
*/
// defaultAvatar: '',
name: import.meta.env.VITE_APP_TITLE,
/**
* modal模式
* 1.
* 2.
*/
// loginExpiredMode: 'modal',
},
footer: {
/**
* footer
*/
enable: false,
},
tabbar: {
/**
* tab
*/
persist: false,
// styleType: 'card',
},
theme: {
/**
* sidebar
*/
semiDarkSidebar: false,
/**
* 1.6px = 0.1radius
* 6px antd保持一致
*/
radius: '0.375',
},
/**
* !!!
* logo
* source可选值
* 1. public目录下的图片 / /logo.png
* 2.
* 3. vite导入的图片 import xxx from 'xxx.png'
*
* !!!
*/
2025-07-24 11:21:50 +08:00
logo: {
enable: true,
source: isDark ? logoDark : logoLight,
2025-07-24 11:21:50 +08:00
},
2025-06-18 11:03:42 +08:00
});