naive-ui/demo/SiteRoot.vue
jahnli e7f5534394
feat(modal-provider): add modal provider (#5547)
* feat: add modal provider

* fix: remove api

* feat: add demo
2024-01-29 22:12:38 +08:00

47 lines
1.1 KiB
Vue

<template>
<component
:is="configProvider"
class="demo"
namespace="naive-ui-doc"
preflight-style-disabled
:theme-name="themeName"
:theme="theme"
:locale="locale"
:date-locale="dateLocale"
:hljs="hljs"
>
<n-theme-editor :style="themeEditorStyle">
<n-loading-bar-provider>
<n-message-provider>
<n-notification-provider>
<n-modal-provider>
<n-dialog-provider>
<Site />
</n-dialog-provider>
</n-modal-provider>
</n-notification-provider>
</n-message-provider>
</n-loading-bar-provider>
<n-global-style />
</n-theme-editor>
</component>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { initRouter, siteSetup } from './store'
import Site from './Site.vue'
export default defineComponent({
name: 'SiteProvider',
components: {
Site
},
setup () {
initRouter(useRouter(), useRoute())
return siteSetup()
}
})
</script>