From 37baac32ae4f7b558474fb8928181090853f0e18 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 447fe102..70d50632 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -164,7 +164,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 61400eb4..83353d86 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -164,7 +164,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 fab45ccd..d4b2480c 100644 --- a/src/router/elegant/imports.ts +++ b/src/router/elegant/imports.ts @@ -35,5 +35,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 c8a514d8..271573c6 100644 --- a/src/router/elegant/routes.ts +++ b/src/router/elegant/routes.ts @@ -317,6 +317,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 51acc179..075c6c3e 100644 --- a/src/router/elegant/transform.ts +++ b/src/router/elegant/transform.ts @@ -174,6 +174,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 f795567f..033aa006 100644 --- a/src/typings/elegant-router.d.ts +++ b/src/typings/elegant-router.d.ts @@ -48,6 +48,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"; }; @@ -93,6 +95,7 @@ declare module "@elegant-router/types" { | "login" | "manage" | "multi-menu" + | "plugin" | "user-center" >; @@ -131,6 +134,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 @@ + + +