-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
51 lines (47 loc) · 1.52 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<template>
<div id="app">
<a-config-provider
:theme="myTheme"
:locale="zhCN"
>
<!-- <ClientOnly>
<message-context-holder />
<notification-context-holder />
<modal-context-holder />
</ClientOnly> -->
<!-- <style-provider> -->
<NuxtLayout>
<NuxtLoadingIndicator />
<NuxtPage />
</NuxtLayout>
<!-- </style-provider> -->
</a-config-provider>
</div>
</template>
<script lang="ts" setup>
import { theme } from 'ant-design-vue';
// import { createCache, extractStyle, StyleProvider } from 'ant-design-vue/es/_util/cssinjs';
import { isDarkInjectionKey } from '@/tokens';
// import { message, notification, Modal } from 'ant-design-vue';
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import '@/assets/style/my-prefight.css';
const isDark = useDark();
provide(isDarkInjectionKey, isDark);
const myTheme = computed(() => ({
token: {
colorPrimary: '#4f46e5',
borderRadius: 8
},
algorithm: isDark.value ? theme.darkAlgorithm : theme.defaultAlgorithm
}));
// const app = getCurrentInstance();
// const [messageInstance, messageContextHolder] = message.useMessage();
// const [notificationInstance, notificationContextHolder] = notification.useNotification();
// const [modalInstance, modalContextHolder] = Modal.useModal();
// if(app) {
// const target = app.appContext.config.globalProperties;
// target['$message'] = messageInstance;
// target['$notification'] = notificationInstance;
// target['$modal'] = modalInstance;
// }
</script>