diff --git a/src/AppNaiveUIProvider.vue b/src/AppNaiveUIProvider.vue
index 7d46348..f234b1d 100644
--- a/src/AppNaiveUIProvider.vue
+++ b/src/AppNaiveUIProvider.vue
@@ -13,6 +13,7 @@ const themeOverrides: GlobalThemeOverrides = {
const ContextHolder: FunctionalComponent = () => {
window.$nLoadingBar = useLoadingBar();
+ window.$nModal = useModal();
window.$nDialog = useDialog();
window.$nMessage = useMessage();
window.$nNotification = useNotification();
@@ -24,6 +25,7 @@ const ContextHolder: FunctionalComponent = () => {
declare global {
export interface Window {
$nLoadingBar?: import('naive-ui').LoadingBarProviderInst;
+ $nModal?: import('naive-ui').ModalProviderInst;
$nDialog?: import('naive-ui').DialogProviderInst;
$nMessage?: import('naive-ui').MessageProviderInst;
$nNotification?: import('naive-ui').NotificationProviderInst;
@@ -41,15 +43,17 @@ declare global {
:theme="appStore.isDark ? darkTheme : null"
abstract
>
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/demos/naive-ui-demo.page.vue b/src/pages/demos/naive-ui-demo.page.vue
index 18a77c3..33ddbdd 100644
--- a/src/pages/demos/naive-ui-demo.page.vue
+++ b/src/pages/demos/naive-ui-demo.page.vue
@@ -1,11 +1,12 @@
@@ -70,6 +88,12 @@ const openDialog = (type: (typeof dialogTypes)[number]) => {
+
+
+
+ 打开 Modal
+
+