mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 新增主题配置
This commit is contained in:
17
src/components/common/NaiveApp/NaiveContent.vue
Normal file
17
src/components/common/NaiveApp/NaiveContent.vue
Normal file
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useLoadingBar, useDialog, useMessage, useNotification } from 'naive-ui';
|
||||
|
||||
function registerNaiveTool() {
|
||||
window.$loadingBar = useLoadingBar();
|
||||
window.$dialog = useDialog();
|
||||
window.$message = useMessage();
|
||||
window.$notification = useNotification();
|
||||
}
|
||||
|
||||
registerNaiveTool();
|
||||
</script>
|
||||
<style scoped></style>
|
18
src/components/common/NaiveApp/index.vue
Normal file
18
src/components/common/NaiveApp/index.vue
Normal file
@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<n-loading-bar-provider>
|
||||
<n-dialog-provider>
|
||||
<n-notification-provider>
|
||||
<n-message-provider>
|
||||
<slot></slot>
|
||||
<naive-content />
|
||||
</n-message-provider>
|
||||
</n-notification-provider>
|
||||
</n-dialog-provider>
|
||||
</n-loading-bar-provider>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { NLoadingBarProvider, NDialogProvider, NNotificationProvider, NMessageProvider } from 'naive-ui';
|
||||
import NaiveContent from './NaiveContent.vue';
|
||||
</script>
|
||||
<style scoped></style>
|
3
src/components/common/index.ts
Normal file
3
src/components/common/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import NaiveApp from './NaiveApp/index.vue';
|
||||
|
||||
export { NaiveApp };
|
Reference in New Issue
Block a user