mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-12 21:53:48 +08:00
v3.1.0 1、【新增】9种登录背景图和样式; 2、【新增】全局字体大小切换; 3、【新增】主题颜色切换; 4、【新增】移除cookie保存token,改为使用localStorage; 5、【优化】升级 ant design vue 到最新版本;
This commit is contained in:
@@ -9,7 +9,29 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<a-config-provider :locale="antdLocale">
|
||||
<a-config-provider
|
||||
:locale="antdLocale"
|
||||
:theme="{
|
||||
algorithm: compactFlag ? theme.compactAlgorithm : theme.defaultAlgorithm,
|
||||
token: {
|
||||
colorPrimary: themeColors[colorIndex].primaryColor,
|
||||
colorLink: themeColors[colorIndex].primaryColor,
|
||||
colorLinkActive: themeColors[colorIndex].activeColor,
|
||||
colorLinkHover: themeColors[colorIndex].hoverColor,
|
||||
colorIcon: themeColors[colorIndex].primaryColor,
|
||||
},
|
||||
components: {
|
||||
Button: {
|
||||
colorLink: themeColors[colorIndex].primaryColor,
|
||||
colorLinkActive: themeColors[colorIndex].activeColor,
|
||||
colorLinkHover: themeColors[colorIndex].hoverColor,
|
||||
},
|
||||
Icon: {
|
||||
colorIcon: themeColors[colorIndex].primaryColor,
|
||||
},
|
||||
},
|
||||
}"
|
||||
>
|
||||
<!---全局loading--->
|
||||
<a-spin :spinning="spinning" tip="稍等片刻,我在拼命加载中..." size="large">
|
||||
<!--- 路由 -->
|
||||
@@ -23,12 +45,21 @@
|
||||
import { computed } from 'vue';
|
||||
import { messages } from '/@/i18n';
|
||||
import { useAppConfigStore } from '/@/store/modules/system/app-config';
|
||||
import { useSpinStore } from './store/modules/system/spin';
|
||||
import { useSpinStore } from '/@/store/modules/system/spin';
|
||||
import { theme } from 'ant-design-vue';
|
||||
import { themeColors } from '/@/theme/color.js';
|
||||
|
||||
const antdLocale = computed(() => messages[useAppConfigStore().language].antdLocale);
|
||||
const dayjsLocale = computed(() => messages[useAppConfigStore().language].dayjsLocale);
|
||||
dayjs.locale(dayjsLocale);
|
||||
|
||||
// 全局loading
|
||||
let spinStore = useSpinStore();
|
||||
const spinning = computed(() => spinStore.loading);
|
||||
// 是否紧凑
|
||||
const compactFlag = computed(() => useAppConfigStore().compactFlag);
|
||||
// 主题颜色
|
||||
const colorIndex = computed(() => {
|
||||
return useAppConfigStore().colorIndex;
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user