diff --git a/src/App.vue b/src/App.vue index 5f829ae..a36964d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,6 +2,7 @@ // import { darkTheme } from 'naive-ui'; import { zhCN, dateZhCN, GlobalThemeOverrides } from 'naive-ui'; import json from './theme.json'; +// import NativeProvider from '@/components/NativeProvider.vue'; const locale = zhCN; const dateLocale = dateZhCN; @@ -10,17 +11,15 @@ const themeOverrides: GlobalThemeOverrides = {} || json; - - - - - + + + diff --git a/src/components/NaiveProvider.vue b/src/components/NaiveProvider.vue new file mode 100644 index 0000000..4cb3681 --- /dev/null +++ b/src/components/NaiveProvider.vue @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + diff --git a/src/store/modules/index.ts b/src/store/modules/index.ts index c35e556..8bb08fd 100644 --- a/src/store/modules/index.ts +++ b/src/store/modules/index.ts @@ -1,3 +1,2 @@ -export * from './user'; export * from './app'; export * from './auth'; diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts deleted file mode 100644 index b4e307d..0000000 --- a/src/store/modules/user.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { defineStore } from 'pinia'; - -// useStore 可以是 useUser、useCart 之类的任何东西 -// 第一个参数是应用程序中 store 的唯一 id -export const useStore = defineStore('user-store', { - // other options... - state: () => { - return { - name: '张三', - }; - }, -}); diff --git a/src/types/global.d.ts b/src/types/global.d.ts new file mode 100644 index 0000000..9b24e4f --- /dev/null +++ b/src/types/global.d.ts @@ -0,0 +1,6 @@ +interface Window { + $loadingBar?: import('naive-ui').LoadingBarApiInjection; + $dialog?: import('naive-ui').DialogApiInjection; + $message?: import('naive-ui').MessageApiInjection; + $notification?: import('naive-ui').NotificationApiInjection; +} diff --git a/src/views/test/test2.vue b/src/views/test/test2.vue index 4603ad1..835de51 100644 --- a/src/views/test/test2.vue +++ b/src/views/test/test2.vue @@ -5,9 +5,9 @@ diff --git a/src/views/test/test3.vue b/src/views/test/test3.vue index 699c5d8..8e5afed 100644 --- a/src/views/test/test3.vue +++ b/src/views/test/test3.vue @@ -1,11 +1,12 @@ I prove that you have made the jump test3. - loading-bar + testMsg