From 019f80faef1ce23ae32565744b30fb792e51dfe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=95=E7=91=9E=E7=8E=9B=E7=9A=84=E7=9A=87=E5=B8=9D?= <2075125282@qq.com> Date: Tue, 7 May 2024 15:38:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(projects):=20=E6=B7=BB=E5=8A=A0=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E7=A4=BA=E4=BE=8B=EF=BC=9A=E5=89=AA=E8=B4=B4=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/langs/en-us.ts | 4 +++- src/locales/langs/zh-cn.ts | 4 +++- src/router/elegant/imports.ts | 1 + src/router/elegant/routes.ts | 23 +++++++++++++++++++++++ src/router/elegant/transform.ts | 2 ++ src/typings/elegant-router.d.ts | 4 ++++ src/views/plugin/copy/index.vue | 31 +++++++++++++++++++++++++++++++ 7 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 src/views/plugin/copy/index.vue diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index 81508a56..f67f3a64 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -177,7 +177,9 @@ const local: App.I18n.Schema = { exception: 'Exception', exception_403: '403', exception_404: '404', - exception_500: '500' + exception_500: '500', + plugin: 'Plugin', + plugin_copy: 'copy' }, page: { login: { diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index f5ba30e4..415542d3 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -177,7 +177,9 @@ const local: App.I18n.Schema = { exception: '异常页', exception_403: '403', exception_404: '404', - exception_500: '500' + exception_500: '500', + plugin: '插件示例', + plugin_copy: '剪贴板' }, page: { login: { diff --git a/src/router/elegant/imports.ts b/src/router/elegant/imports.ts index 5c9ebeef..4dc25474 100644 --- a/src/router/elegant/imports.ts +++ b/src/router/elegant/imports.ts @@ -36,5 +36,6 @@ export const views: Record Promise import("@/views/manage/user/index.vue"), "multi-menu_first_child": () => import("@/views/multi-menu/first_child/index.vue"), "multi-menu_second_child_home": () => import("@/views/multi-menu/second_child_home/index.vue"), + plugin_copy: () => import("@/views/plugin/copy/index.vue"), "user-center": () => import("@/views/user-center/index.vue"), }; diff --git a/src/router/elegant/routes.ts b/src/router/elegant/routes.ts index 822c0be5..406b48ce 100644 --- a/src/router/elegant/routes.ts +++ b/src/router/elegant/routes.ts @@ -330,6 +330,29 @@ export const generatedRoutes: GeneratedRoute[] = [ } ] }, + { + name: 'plugin', + path: '/plugin', + component: 'layout.base', + meta: { + title: '插件示例', + i18nKey: 'route.plugin', + order: 7, + icon: 'clarity:plugin-line', + }, + children: [ + { + name: 'plugin_copy', + path: '/plugin/copy', + component: 'view.plugin_copy', + meta: { + title: '剪贴板', + icon: 'mdi:clipboard-outline', + i18nKey: 'route.plugin_copy', + } + } + ] + }, { name: 'user-center', path: '/user-center', diff --git a/src/router/elegant/transform.ts b/src/router/elegant/transform.ts index 6c7c5463..cffb82b8 100644 --- a/src/router/elegant/transform.ts +++ b/src/router/elegant/transform.ts @@ -183,6 +183,8 @@ const routeMap: RouteMap = { "multi-menu_second": "/multi-menu/second", "multi-menu_second_child": "/multi-menu/second/child", "multi-menu_second_child_home": "/multi-menu/second/child/home", + "plugin": "/plugin", + "plugin_copy": "/plugin/copy", "user-center": "/user-center" }; diff --git a/src/typings/elegant-router.d.ts b/src/typings/elegant-router.d.ts index ac91d1d1..31f241f9 100644 --- a/src/typings/elegant-router.d.ts +++ b/src/typings/elegant-router.d.ts @@ -57,6 +57,8 @@ declare module "@elegant-router/types" { "multi-menu_second": "/multi-menu/second"; "multi-menu_second_child": "/multi-menu/second/child"; "multi-menu_second_child_home": "/multi-menu/second/child/home"; + "plugin": "/plugin"; + "plugin_copy": "/plugin/copy"; "user-center": "/user-center"; }; @@ -111,6 +113,7 @@ declare module "@elegant-router/types" { | "login" | "manage" | "multi-menu" + | "plugin" | "user-center" >; @@ -151,6 +154,7 @@ declare module "@elegant-router/types" { | "manage_user" | "multi-menu_first_child" | "multi-menu_second_child_home" + | "plugin_copy" | "user-center" >; diff --git a/src/views/plugin/copy/index.vue b/src/views/plugin/copy/index.vue new file mode 100644 index 00000000..2c2cbaf2 --- /dev/null +++ b/src/views/plugin/copy/index.vue @@ -0,0 +1,31 @@ + + +