2021-01-13 12:01:02 +08:00
|
|
|
<template>
|
2021-02-17 23:31:56 +08:00
|
|
|
<component
|
|
|
|
:is="configProvider"
|
2021-01-13 12:01:02 +08:00
|
|
|
class="demo"
|
|
|
|
namespace="naive-ui-doc"
|
2021-03-05 00:39:10 +08:00
|
|
|
:theme-name="themeName"
|
2021-02-02 13:44:57 +08:00
|
|
|
:theme="theme"
|
2021-01-13 12:01:02 +08:00
|
|
|
:locale="locale"
|
|
|
|
:date-locale="dateLocale"
|
2021-01-13 12:31:41 +08:00
|
|
|
:hljs="hljs"
|
2021-01-13 12:01:02 +08:00
|
|
|
>
|
2021-04-05 17:59:04 +08:00
|
|
|
<n-theme-editor :style="themeEditorStyle">
|
2021-03-30 02:25:22 +08:00
|
|
|
<n-loading-bar-provider>
|
|
|
|
<n-message-provider>
|
|
|
|
<n-notification-provider>
|
|
|
|
<n-dialog-provider>
|
|
|
|
<Site />
|
|
|
|
</n-dialog-provider>
|
|
|
|
</n-notification-provider>
|
|
|
|
</n-message-provider>
|
|
|
|
</n-loading-bar-provider>
|
2021-04-06 18:06:04 +08:00
|
|
|
<n-global-style />
|
2021-03-30 02:25:22 +08:00
|
|
|
</n-theme-editor>
|
2021-02-17 23:31:56 +08:00
|
|
|
</component>
|
2021-01-13 12:01:02 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2021-04-06 00:40:02 +08:00
|
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
|
|
import { initRouter, siteSetup } from './store'
|
2021-02-22 17:53:01 +08:00
|
|
|
import Site from './Site.vue'
|
2021-01-13 12:01:02 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'SiteProvider',
|
2021-02-22 17:53:01 +08:00
|
|
|
components: {
|
|
|
|
Site
|
|
|
|
},
|
2021-01-13 12:01:02 +08:00
|
|
|
setup () {
|
2021-04-06 00:40:02 +08:00
|
|
|
initRouter(useRouter(), useRoute())
|
2021-01-13 12:01:02 +08:00
|
|
|
return siteSetup()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|