Skip to content

Commit

Permalink
wip: 头像列表开发中
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Feb 28, 2024
1 parent 4146716 commit 7f6464a
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 2 deletions.
9 changes: 9 additions & 0 deletions mock/role/index.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,14 @@ const adminList = [
meta: {
title: 'router.videoPlayer'
}
},
{
path: 'avatars',
component: 'views/Components/Avatars',
name: 'Avatars',
meta: {
title: 'router.avatars'
}
}
]
},
Expand Down Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions src/components/Avatars/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Avatars from './src/Avatars.vue'

export { Avatars }
15 changes: 15 additions & 0 deletions src/components/Avatars/src/Avatars.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script setup lang="ts">
import { ComponentSize } from 'element-plus'
import { PropType } from 'vue'
defineProps({
size: {
type: String as PropType<ComponentSize>,
default: ''
}
})
</script>

<template>
<div> 头像 </div>
</template>
7 changes: 6 additions & 1 deletion src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
}
}
6 changes: 5 additions & 1 deletion src/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ export default {
tableVideoPreview: '表格视频预览',
cardTable: '卡片表格',
personalCenter: '个人中心',
personal: '个人'
personal: '个人',
avatars: '头像列表'
},
permission: {
hasPermission: '请设置操作权限值'
Expand Down Expand Up @@ -552,5 +553,8 @@ export default {
inputPasswordDemo: {
title: '密码输入框',
inputPasswordDes: '基于 ElementPlus 的 Input 组件二次封装'
},
avatarsDemo: {
title: '头像列表组件,基于element-plus的Avatar组件二次封装'
}
}
8 changes: 8 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
}
]
},
Expand Down
13 changes: 13 additions & 0 deletions src/views/Components/Avatars.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script setup lang="ts">
import { ContentWrap } from '@/components/ContentWrap'
import { useI18n } from '@/hooks/web/useI18n'
import { Avatars } from '@/components/Avatars'
const { t } = useI18n()
</script>

<template>
<ContentWrap :title="t('router.avatars')" :message="t('avatarsDemo.title')">
<Avatars />
</ContentWrap>
</template>

0 comments on commit 7f6464a

Please sign in to comment.