feat(demos): 添加 Naive UI 组件演示页面
This commit is contained in:
20
src/App.vue
20
src/App.vue
@@ -1,26 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import type { GlobalThemeOverrides } from 'naive-ui';
|
||||
import { darkTheme } from 'naive-ui';
|
||||
import { RouterView } from 'vue-router';
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
||||
// https://www.naiveui.com/zh-CN/light/docs/customize-theme
|
||||
const themeOverrides: GlobalThemeOverrides = {
|
||||
common: {},
|
||||
};
|
||||
import AppNaiveUIProvider from './AppNaiveUIProvider.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DynamicDialog />
|
||||
<ConfirmDialog />
|
||||
<Toast />
|
||||
<n-config-provider
|
||||
:theme-overrides
|
||||
preflight-style-disabled
|
||||
:theme="appStore.isDark ? darkTheme : null"
|
||||
abstract
|
||||
>
|
||||
|
||||
<AppNaiveUIProvider>
|
||||
<RouterView />
|
||||
</n-config-provider>
|
||||
</AppNaiveUIProvider>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user