feat:添加头像
This commit is contained in:
30
Yi.BBS.Vue3/src/components/AvatarInfo.vue
Normal file
30
Yi.BBS.Vue3/src/components/AvatarInfo.vue
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<template >
|
||||||
|
|
||||||
|
<div class="avatar">
|
||||||
|
<el-avatar :size="props.size" />
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div> 大白子</div>
|
||||||
|
<div class="remarks"> 2022-03-05 23:33:20</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
const props = defineProps(['size'])
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.avatar
|
||||||
|
{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.el-avatar
|
||||||
|
{
|
||||||
|
margin-right: 1.2rem;
|
||||||
|
}
|
||||||
|
.remarks
|
||||||
|
{
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
color: #8C8C8C;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -3,8 +3,9 @@
|
|||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
|
|
||||||
<el-row class="left-div">
|
<el-row class="left-div">
|
||||||
<el-col :span="24">
|
<el-col :span="24" >
|
||||||
作者信息
|
<AvatarInfo :size="50"></AvatarInfo>
|
||||||
|
|
||||||
<el-divider />
|
<el-divider />
|
||||||
<h2>面试题挑战</h2>
|
<h2>面试题挑战</h2>
|
||||||
文章详情
|
文章详情
|
||||||
@@ -51,6 +52,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { h, ref } from 'vue'
|
import { h, ref } from 'vue'
|
||||||
|
import AvatarInfo from '@/components/AvatarInfo.vue'
|
||||||
const spacer = h(ElDivider, { direction: 'vertical' })
|
const spacer = h(ElDivider, { direction: 'vertical' })
|
||||||
</script>
|
</script>
|
||||||
<style scoped >
|
<style scoped >
|
||||||
|
|||||||
Reference in New Issue
Block a user