diff --git a/src/router/menus/modules/demo/comp.ts b/src/router/menus/modules/demo/comp.ts index 816ab9769a42ea1baecc691ffd3d27786ab412be..5169b2cba5da9b38256e89a78f06a1af5f48d53b 100644 --- a/src/router/menus/modules/demo/comp.ts +++ b/src/router/menus/modules/demo/comp.ts @@ -88,6 +88,16 @@ const menu: MenuModule = { }, ], }, + { + path: '/form', + name: '验证组件', + children: [ + { + path: '/base', + name: '拖拽校验', + }, + ], + }, ], }, }; diff --git a/src/router/menus/modules/demo/exception.ts b/src/router/menus/modules/demo/exception.ts deleted file mode 100644 index 9344ba1fd6962fccee673ee799ef0bd1a38d8510..0000000000000000000000000000000000000000 --- a/src/router/menus/modules/demo/exception.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { MenuModule } from '/@/router/types.d'; -const menu: MenuModule = { - orderNo: 500, - menu: { - name: '异常页', - path: '/exception', - children: [ - { - path: '403', - name: '403', - }, - { - path: '404', - name: '404', - }, - { - path: '500', - name: '500', - }, - { - path: 'net-work-error', - name: '网络错误', - }, - { - path: 'page-time-out', - name: '页面超时', - }, - { - path: 'not-data', - name: '无数据', - }, - ], - }, -}; -export default menu; diff --git a/src/router/menus/modules/demo/feat.ts b/src/router/menus/modules/demo/feat.ts index 1a80850c8ae21c44bca188d88474c6e4914d1e80..ca09716d9d72d27605f43a6d36f2e067627c6ea3 100644 --- a/src/router/menus/modules/demo/feat.ts +++ b/src/router/menus/modules/demo/feat.ts @@ -1,8 +1,8 @@ import type { MenuModule } from '/@/router/types.d'; const menu: MenuModule = { - orderNo: 10, + orderNo: 19, menu: { - name: '页面功能', + name: '功能', path: '/feat', children: [ { diff --git a/src/router/menus/modules/demo/page.ts b/src/router/menus/modules/demo/page.ts new file mode 100644 index 0000000000000000000000000000000000000000..ebbc1569d9b38ad1bfedd75da44c128a515c29c1 --- /dev/null +++ b/src/router/menus/modules/demo/page.ts @@ -0,0 +1,57 @@ +import type { MenuModule } from '/@/router/types.d'; +const menu: MenuModule = { + orderNo: 20, + menu: { + name: '页面', + path: '/page-demo', + tag: { + dot: true, + }, + children: [ + { + path: 'result', + name: '结果页', + tag: { + content: 'new', + }, + children: [ + { + path: 'success', + name: '成功页', + }, + { + path: 'fail', + name: '失败页', + }, + ], + }, + { + path: 'exception', + name: '异常页', + children: [ + { + path: '403', + name: '403', + }, + { + path: '404', + name: '404', + }, + { + path: '500', + name: '500', + }, + { + path: 'net-work-error', + name: '网络错误', + }, + { + path: 'not-data', + name: '无数据', + }, + ], + }, + ], + }, +}; +export default menu; diff --git a/src/router/menus/modules/demo/permission.ts b/src/router/menus/modules/demo/permission.ts index 2fc6dacca80d14a87c893f042dc6dee3952e8b98..b48d556582452887d9207b3c97357a8d3a027f31 100644 --- a/src/router/menus/modules/demo/permission.ts +++ b/src/router/menus/modules/demo/permission.ts @@ -1,6 +1,6 @@ import type { MenuModule } from '/@/router/types.d'; const menu: MenuModule = { - orderNo: 20, + orderNo: 15, menu: { name: '权限管理', path: '/permission', diff --git a/src/router/routes/modules/demo/exception.ts b/src/router/routes/modules/demo/exception.ts deleted file mode 100644 index 0f33b6cc5fab465b649426a66d14732e30b64929..0000000000000000000000000000000000000000 --- a/src/router/routes/modules/demo/exception.ts +++ /dev/null @@ -1,82 +0,0 @@ -import type { AppRouteModule } from '/@/router/types'; - -import { PAGE_LAYOUT_COMPONENT } from '/@/router/constant'; -import { ExceptionEnum } from '/@/enums/exceptionEnum'; - -const ExceptionPage = () => import('/@/views/sys/exception/Exception'); - -export default { - layout: { - path: '/exception', - name: 'ExceptionPage', - component: PAGE_LAYOUT_COMPONENT, - redirect: '/exception/404', - meta: { - icon: 'ant-design:exception-outlined', - title: '异常页', - }, - }, - - routes: [ - { - path: '/403', - name: 'PageNotAccess', - component: ExceptionPage, - props: { - status: ExceptionEnum.PAGE_NOT_ACCESS, - }, - meta: { - title: '403', - afterCloseLoading: true, - }, - }, - { - path: '/404', - name: 'PageNotFound', - component: ExceptionPage, - props: { - status: ExceptionEnum.PAGE_NOT_FOUND, - }, - meta: { - title: '404', - afterCloseLoading: true, - }, - }, - { - path: '/500', - name: 'ServiceError', - component: ExceptionPage, - props: { - status: ExceptionEnum.ERROR, - }, - meta: { - title: '500', - afterCloseLoading: true, - }, - }, - { - path: '/net-work-error', - name: 'NetWorkError', - component: ExceptionPage, - props: { - status: ExceptionEnum.NET_WORK_ERROR, - }, - meta: { - title: '网络错误', - afterCloseLoading: true, - }, - }, - { - path: '/not-data', - name: 'NotData', - component: ExceptionPage, - props: { - status: ExceptionEnum.PAGE_NOT_DATA, - }, - meta: { - title: '无数据', - afterCloseLoading: true, - }, - }, - ], -} as AppRouteModule; diff --git a/src/router/routes/modules/demo/page.ts b/src/router/routes/modules/demo/page.ts new file mode 100644 index 0000000000000000000000000000000000000000..3ba2a980fb2df747796cdaae04e5609c886d72c7 --- /dev/null +++ b/src/router/routes/modules/demo/page.ts @@ -0,0 +1,120 @@ +import type { AppRouteModule } from '/@/router/types'; + +import { PAGE_LAYOUT_COMPONENT } from '/@/router/constant'; +import { ExceptionEnum } from '/@/enums/exceptionEnum'; + +const ExceptionPage = () => import('/@/views/sys/exception/Exception'); + +export default { + path: '/page-demo', + name: 'PageDemo', + component: PAGE_LAYOUT_COMPONENT, + redirect: '/page-demo/exception', + meta: { + icon: 'mdi:page-next-outline', + title: '页面', + }, + children: [ + // =============================result start============================= + { + path: '/result', + name: 'ResultPage', + redirect: '/page-demo/result/success', + meta: { + title: '结果页', + }, + children: [ + { + path: 'success', + name: 'ResultSuccessPage', + component: () => import('/@/views/demo/page/result/success/index.vue'), + meta: { + title: '成功页', + }, + }, + { + path: 'fail', + name: 'ResultFailPage', + component: () => import('/@/views/demo/page/result/fail/index.vue'), + meta: { + title: '失败页', + }, + }, + ], + }, + // =============================result end============================= + + // =============================exception start============================= + { + path: '/exception', + name: 'ExceptionPage', + redirect: '/page-demo/exception/404', + meta: { + title: '异常页', + }, + children: [ + { + path: '403', + name: 'PageNotAccess', + component: ExceptionPage, + props: { + status: ExceptionEnum.PAGE_NOT_ACCESS, + }, + meta: { + title: '403', + afterCloseLoading: true, + }, + }, + { + path: '404', + name: 'PageNotFound', + component: ExceptionPage, + props: { + status: ExceptionEnum.PAGE_NOT_FOUND, + }, + meta: { + title: '404', + afterCloseLoading: true, + }, + }, + { + path: '500', + name: 'ServiceError', + component: ExceptionPage, + props: { + status: ExceptionEnum.ERROR, + }, + meta: { + title: '500', + afterCloseLoading: true, + }, + }, + { + path: 'net-work-error', + name: 'NetWorkError', + component: ExceptionPage, + props: { + status: ExceptionEnum.NET_WORK_ERROR, + }, + meta: { + title: '网络错误', + afterCloseLoading: true, + }, + }, + { + path: 'not-data', + name: 'NotData', + component: ExceptionPage, + props: { + status: ExceptionEnum.PAGE_NOT_DATA, + }, + meta: { + title: '无数据', + afterCloseLoading: true, + }, + }, + ], + }, + // =============================exception end============================= + ], +} as AppRouteModule; diff --git a/src/views/demo/page/result/fail/index.vue b/src/views/demo/page/result/fail/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..8973ed6969bccb86aad8dc734e7d86bfc4fc6621 --- /dev/null +++ b/src/views/demo/page/result/fail/index.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/demo/page/result/success/index.vue b/src/views/demo/page/result/success/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..23e0448affa54b4d58e26d7b588e858b499b33f1 --- /dev/null +++ b/src/views/demo/page/result/success/index.vue @@ -0,0 +1,56 @@ + + +