File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
views/_essential/authentication
packages/@core/shared/design/src/scss/common Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { computed } from 'vue';
4
4
import { GlobalProvider } from ' @vben/universal-ui' ;
5
5
import { preferences , usePreferences } from ' @vben-core/preferences' ;
6
6
7
- import { ConfigProvider , theme } from ' ant-design-vue' ;
7
+ import { App , ConfigProvider , theme } from ' ant-design-vue' ;
8
8
import zhCN from ' ant-design-vue/es/locale/zh_CN' ;
9
9
import dayjs from ' dayjs' ;
10
10
@@ -17,16 +17,17 @@ dayjs.locale(zhCN.locale);
17
17
const { isDark } = usePreferences ();
18
18
19
19
const tokenTheme = computed (() => {
20
- const algorithms = isDark .value
20
+ const algorithm = isDark .value
21
21
? [theme .darkAlgorithm ]
22
22
: [theme .defaultAlgorithm ];
23
23
24
24
// antd 紧凑模式算法
25
25
if (preferences .app .compact ) {
26
- algorithms .push (theme .compactAlgorithm );
26
+ algorithm .push (theme .compactAlgorithm );
27
27
}
28
+
28
29
return {
29
- algorithms ,
30
+ algorithm ,
30
31
token: { colorPrimary: preferences .theme .colorPrimary },
31
32
};
32
33
});
@@ -35,7 +36,9 @@ const tokenTheme = computed(() => {
35
36
<template >
36
37
<GlobalProvider >
37
38
<ConfigProvider :locale =" zhCN" :theme =" tokenTheme" >
38
- <RouterView />
39
+ <App >
40
+ <RouterView />
41
+ </App >
39
42
</ConfigProvider >
40
43
</GlobalProvider >
41
44
</template >
Original file line number Diff line number Diff line change @@ -9,14 +9,15 @@ import { AuthenticationLogin } from '@vben/universal-ui';
9
9
import { useRequest } from ' @vben-core/request' ;
10
10
import { useAccessStore } from ' @vben-core/stores' ;
11
11
12
- import { notification } from ' ant-design-vue' ;
12
+ import { App } from ' ant-design-vue' ;
13
13
14
14
import { getUserInfo , userLogin } from ' #/apis' ;
15
15
16
16
defineOptions ({ name: ' Login' });
17
17
18
18
const router = useRouter ();
19
19
const accessStore = useAccessStore ();
20
+ const { notification } = App .useApp ();
20
21
21
22
const { loading, runAsync : runUserLogin } = useRequest (userLogin , {
22
23
manual: true ,
Original file line number Diff line number Diff line change 7
7
overscroll-behavior : none ;
8
8
}
9
9
10
+ .ant-app {
11
+ color : inherit ;
12
+ }
13
+
10
14
* ,
11
15
::after ,
12
16
::before {
You can’t perform that action at this time.
0 commit comments