You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
472 B
Vue
26 lines
472 B
Vue
<script setup lang="ts">
|
|
import { defineComponent, h } from 'vue'
|
|
import { NMessageProvider, useMessage } from 'naive-ui'
|
|
|
|
function registerNaiveTools() {
|
|
window.$message = useMessage()
|
|
}
|
|
|
|
const NaiveProviderContent = defineComponent({
|
|
name: 'NaiveProviderContent',
|
|
setup() {
|
|
registerNaiveTools()
|
|
},
|
|
render() {
|
|
return h('div')
|
|
},
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<NMessageProvider>
|
|
<slot />
|
|
<NaiveProviderContent />
|
|
</NMessageProvider>
|
|
</template>
|