From ad11c40a4b0642a97e48573f704af7eae68160bf Mon Sep 17 00:00:00 2001 From: YePeng <1213563369@qq.com> Date: Wed, 1 Nov 2023 14:08:55 +0800 Subject: [PATCH] feat: add NaiveUIComponent page --- components.d.ts | 3 + src/locales/cn.json | 3 +- src/locales/en.json | 3 +- src/locales/kr.json | 3 +- src/router/modules/constant-routes.ts | 9 ++ src/views/common/NaiveUIComponent.vue | 172 ++++++++++++++++++++++++++ 6 files changed, 190 insertions(+), 3 deletions(-) create mode 100644 src/views/common/NaiveUIComponent.vue diff --git a/components.d.ts b/components.d.ts index 1353d8c..cd51f32 100644 --- a/components.d.ts +++ b/components.d.ts @@ -66,6 +66,7 @@ declare module '@vue/runtime-core' { NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] NInput: typeof import('naive-ui')['NInput'] + NInputGroup: typeof import('naive-ui')['NInputGroup'] NInputNumber: typeof import('naive-ui')['NInputNumber'] NLayout: typeof import('naive-ui')['NLayout'] NLayoutContent: typeof import('naive-ui')['NLayoutContent'] @@ -75,9 +76,11 @@ declare module '@vue/runtime-core' { NMenu: typeof import('naive-ui')['NMenu'] NMessageProvider: typeof import('naive-ui')['NMessageProvider'] NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] + NPopover: typeof import('naive-ui')['NPopover'] NSelect: typeof import('naive-ui')['NSelect'] NSpin: typeof import('naive-ui')['NSpin'] NSwitch: typeof import('naive-ui')['NSwitch'] + NTag: typeof import('naive-ui')['NTag'] RenderIconify: typeof import('./src/components/common/RenderIconify.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] diff --git a/src/locales/cn.json b/src/locales/cn.json index c09a127..6b75345 100644 --- a/src/locales/cn.json +++ b/src/locales/cn.json @@ -24,7 +24,8 @@ "commonGeneralAdministrator": "普通管理员", "commonButtonPermissionManagement": "按钮权限管理", "commonLogicFlow": "流程图", - "commonWatermark": "水印" + "commonWatermark": "水印", + "commonNaiveUIComponent": "常见组件" }, "setting": { "systemSetting": "系统设置", diff --git a/src/locales/en.json b/src/locales/en.json index f3b22fa..ec7d0b7 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -24,7 +24,8 @@ "commonGeneralAdministrator": "General Administrator", "commonButtonPermissionManagement": "Button Permission Management", "commonLogicFlow": "LogicFlow", - "commonWatermark": "Watermark" + "commonWatermark": "Watermark", + "commonNaiveUIComponent": "Commo Components" }, "setting": { "systemSetting": "System Setting", diff --git a/src/locales/kr.json b/src/locales/kr.json index 9ecfbd6..9046664 100644 --- a/src/locales/kr.json +++ b/src/locales/kr.json @@ -24,7 +24,8 @@ "commonGeneralAdministrator": "일반 관리자", "commonButtonPermissionManagement": "버튼 권한 관리", "commonLogicFlow": "논리 흐름", - "commonWatermark": "워터마크" + "commonWatermark": "워터마크", + "commonNaiveUIComponent": "공통 구성 요소" }, "setting": { "systemSetting": "시스템 설정", diff --git a/src/router/modules/constant-routes.ts b/src/router/modules/constant-routes.ts index d7e7908..a97e85e 100644 --- a/src/router/modules/constant-routes.ts +++ b/src/router/modules/constant-routes.ts @@ -72,6 +72,15 @@ export const CONSTANT_ROUTES: VAdmireRoute[] = [ icon: 'la:500px', }, }, + { + path: 'naive_component', + name: 'Common_NaiveUIComponent', + component: '~/views/common/NaiveUIComponent.vue', + meta: { + text: '$t("route.commonNaiveUIComponent")', + icon: 'radix-icons:component-1', + }, + }, ], }, { diff --git a/src/views/common/NaiveUIComponent.vue b/src/views/common/NaiveUIComponent.vue new file mode 100644 index 0000000..ae367e8 --- /dev/null +++ b/src/views/common/NaiveUIComponent.vue @@ -0,0 +1,172 @@ + + +