From 7f6464abc41d5ccb58b2dc28f883c310ceb6d36e Mon Sep 17 00:00:00 2001 From: kailong321200875 <321200875@qq.com> Date: Wed, 28 Feb 2024 15:06:37 +0800 Subject: [PATCH] =?UTF-8?q?wip:=20=E5=A4=B4=E5=83=8F=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mock/role/index.mock.ts | 9 +++++++++ src/components/Avatars/index.ts | 3 +++ src/components/Avatars/src/Avatars.vue | 15 +++++++++++++++ src/locales/en.ts | 7 ++++++- src/locales/zh-CN.ts | 6 +++++- src/router/index.ts | 8 ++++++++ src/views/Components/Avatars.vue | 13 +++++++++++++ 7 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 src/components/Avatars/index.ts create mode 100644 src/components/Avatars/src/Avatars.vue create mode 100644 src/views/Components/Avatars.vue diff --git a/mock/role/index.mock.ts b/mock/role/index.mock.ts index 0a14b60..89f99dd 100644 --- a/mock/role/index.mock.ts +++ b/mock/role/index.mock.ts @@ -324,6 +324,14 @@ const adminList = [ meta: { title: 'router.videoPlayer' } + }, + { + path: 'avatars', + component: 'views/Components/Avatars', + name: 'Avatars', + meta: { + title: 'router.avatars' + } } ] }, @@ -686,6 +694,7 @@ const testList: string[] = [ '/components/waterfall', '/components/image-cropping', '/components/video-player', + '/components/avatars', 'function', '/function/multiple-tabs', '/function/multiple-tabs-demo/:id', diff --git a/src/components/Avatars/index.ts b/src/components/Avatars/index.ts new file mode 100644 index 0000000..35d2129 --- /dev/null +++ b/src/components/Avatars/index.ts @@ -0,0 +1,3 @@ +import Avatars from './src/Avatars.vue' + +export { Avatars } diff --git a/src/components/Avatars/src/Avatars.vue b/src/components/Avatars/src/Avatars.vue new file mode 100644 index 0000000..c159068 --- /dev/null +++ b/src/components/Avatars/src/Avatars.vue @@ -0,0 +1,15 @@ + + + diff --git a/src/locales/en.ts b/src/locales/en.ts index 2598374..2dcf098 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -186,7 +186,8 @@ export default { tableVideoPreview: 'Table video preview', cardTable: 'Card table', personalCenter: 'Personal center', - personal: 'Personal' + personal: 'Personal', + avatars: 'Avatars' }, permission: { hasPermission: 'Please set the operation permission value' @@ -562,5 +563,9 @@ export default { inputPasswordDemo: { title: 'InputPassword', inputPasswordDes: 'Secondary packaging of Input components based on ElementPlus' + }, + avatarsDemo: { + title: + 'Avatar component for avatar list, secondary packaging based on element plus Avatar component' } } diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index ebf9dfe..a78185d 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -182,7 +182,8 @@ export default { tableVideoPreview: '表格视频预览', cardTable: '卡片表格', personalCenter: '个人中心', - personal: '个人' + personal: '个人', + avatars: '头像列表' }, permission: { hasPermission: '请设置操作权限值' @@ -552,5 +553,8 @@ export default { inputPasswordDemo: { title: '密码输入框', inputPasswordDes: '基于 ElementPlus 的 Input 组件二次封装' + }, + avatarsDemo: { + title: '头像列表组件,基于element-plus的Avatar组件二次封装' } } diff --git a/src/router/index.ts b/src/router/index.ts index 0efe943..6440cd0 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -390,6 +390,14 @@ export const asyncRouterMap: AppRouteRecordRaw[] = [ meta: { title: t('router.videoPlayer') } + }, + { + path: 'avatars', + component: () => import('@/views/Components/Avatars.vue'), + name: 'Avatars', + meta: { + title: t('router.avatars') + } } ] }, diff --git a/src/views/Components/Avatars.vue b/src/views/Components/Avatars.vue new file mode 100644 index 0000000..eefe0dd --- /dev/null +++ b/src/views/Components/Avatars.vue @@ -0,0 +1,13 @@ + + +