fear: 集成Naive UI Notification组件
This commit is contained in:
parent
85f9c91d6e
commit
ffc042167a
10
src/components/AppProvider/NotificationContent.vue
Normal file
10
src/components/AppProvider/NotificationContent.vue
Normal file
@ -0,0 +1,10 @@
|
||||
<template></template>
|
||||
|
||||
<script setup>
|
||||
import { useNotification } from 'naive-ui'
|
||||
window['$notification'] = useNotification()
|
||||
Object.defineProperty(window, '$notification', {
|
||||
configurable: false,
|
||||
writable: false,
|
||||
})
|
||||
</script>
|
@ -6,7 +6,10 @@
|
||||
<DialogContent />
|
||||
<n-message-provider>
|
||||
<MessageContent />
|
||||
<slot></slot>
|
||||
<n-notification-provider>
|
||||
<NotificationContent />
|
||||
<slot></slot>
|
||||
</n-notification-provider>
|
||||
</n-message-provider>
|
||||
</n-dialog-provider>
|
||||
</n-loading-bar-provider>
|
||||
@ -18,6 +21,7 @@ import MessageContent from './MessageContent.vue'
|
||||
import DialogContent from './DialogContent.vue'
|
||||
import LoadingBar from './LoadingBar.vue'
|
||||
import { useThemeStore } from '@/store/modules/theme'
|
||||
import NotificationContent from './NotificationContent.vue'
|
||||
|
||||
const useTheme = useThemeStore()
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user