diff --git a/src/AppProvider.vue b/src/AppProvider.vue
index e7c525eb..8d94cb06 100644
--- a/src/AppProvider.vue
+++ b/src/AppProvider.vue
@@ -18,9 +18,16 @@
import { NConfigProvider, NElement, zhCN, dateZhCN } from 'naive-ui';
import { NaiveProvider } from '@/components';
import { useThemeStore } from '@/store';
-import { useDarkMode } from '@/composables';
+import { useDarkMode, useGlobalEvent } from '@/composables';
const theme = useThemeStore();
const { naiveTheme } = useDarkMode();
+const { initGlobalEventListener } = useGlobalEvent();
+
+function init() {
+ initGlobalEventListener();
+}
+
+init();
diff --git a/src/components/common/LoadingEmptyWrapper/index.vue b/src/components/common/LoadingEmptyWrapper/index.vue
index 7e83763f..90a77f9e 100644
--- a/src/components/common/LoadingEmptyWrapper/index.vue
+++ b/src/components/common/LoadingEmptyWrapper/index.vue
@@ -6,19 +6,19 @@
-
-
-
{{ networkErrorDesc }}
+
+
{{ networkErrorDesc }}
diff --git a/src/composables/events/global.ts b/src/composables/events/global.ts
index 317b475a..5dcdfa0b 100644
--- a/src/composables/events/global.ts
+++ b/src/composables/events/global.ts
@@ -2,11 +2,11 @@ import { useAuthChangeEvent } from './auth';
export function useGlobalEvent() {
/** 初始化全局监听事件 */
- function initGlobalListener() {
+ function initGlobalEventListener() {
useAuthChangeEvent();
}
return {
- initGlobalListener
+ initGlobalEventListener
};
}
diff --git a/src/interface/common/route.ts b/src/interface/common/route.ts
index 99305819..019d382f 100644
--- a/src/interface/common/route.ts
+++ b/src/interface/common/route.ts
@@ -31,6 +31,7 @@ export type RouteKey =
| 'component'
| 'component_button'
| 'component_card'
+ | 'component_table'
| 'multi-menu'
| 'multi-menu_first'
| 'multi-menu_first_second'
diff --git a/src/router/constant/index.ts b/src/router/constant/index.ts
index 96f7050e..c6a4e68f 100644
--- a/src/router/constant/index.ts
+++ b/src/router/constant/index.ts
@@ -211,6 +211,14 @@ const routeConstMap = new Map([
title: '卡片'
}
],
+ [
+ 'component_table',
+ {
+ name: 'component_table',
+ path: '/component/table',
+ title: '表格'
+ }
+ ],
[
'multi-menu',
{
diff --git a/src/router/modules/component.ts b/src/router/modules/component.ts
index 315f3a01..0852547a 100644
--- a/src/router/modules/component.ts
+++ b/src/router/modules/component.ts
@@ -1,6 +1,6 @@
import type { RouteRecordRaw } from 'vue-router';
import { BasicLayout } from '@/layouts';
-import { ComponentButton, ComponentCard } from '@/views';
+import { ComponentButton, ComponentCard, ComponentTable } from '@/views';
import { routeName, routePath, routeTitle } from '../constant';
const component: RouteRecordRaw = {
@@ -33,6 +33,16 @@ const component: RouteRecordRaw = {
requiresAuth: true,
keepAlive: true
}
+ },
+ {
+ name: routeName('component_table'),
+ path: routePath('component_table'),
+ component: ComponentTable,
+ meta: {
+ title: routeTitle('component_table'),
+ requiresAuth: true,
+ keepAlive: true
+ }
}
]
};
diff --git a/src/views/component/index.ts b/src/views/component/index.ts
index ae059c07..8fe2c5ec 100644
--- a/src/views/component/index.ts
+++ b/src/views/component/index.ts
@@ -1,4 +1,5 @@
import ComponentButton from './button/index.vue';
import ComponentCard from './card/index.vue';
+import ComponentTable from './table/index.vue';
-export { ComponentButton, ComponentCard };
+export { ComponentButton, ComponentCard, ComponentTable };
diff --git a/src/views/component/table/index.vue b/src/views/component/table/index.vue
new file mode 100644
index 00000000..8563ec79
--- /dev/null
+++ b/src/views/component/table/index.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+ 有数据
+ 空数据
+
+
+
+
+
+
+
+
+
+
+