评论样式

This commit is contained in:
zhaofang
2022-11-14 16:03:45 +08:00
parent 2c6d13e0f9
commit e4a1862d6f
8 changed files with 92 additions and 64 deletions

View File

@@ -1,10 +1,10 @@
<template>
<view class="item-author">
<view>
<u-avatar v-if="avatar && avatar!=''" shape="circle" :size="40" :src="fileBaseUrl + avatar" ></u-avatar>
<u-avatar v-if="avatar && avatar!=''" shape="circle" :size="size" :src="fileBaseUrl + avatar" ></u-avatar>
<view v-else>
<view v-if="sex == null" class="peo"></view>
<view v-else>
<view v-if="sex == null" class="peo" :style="{width:width,height:height}"></view>
<view v-else :style="{width:width,height:height}">
<view class="peo" v-if="sex === 1 "><image src="../../static/images/man.png" alt=""></view>
<view class="peo" v-else><image src="../../static/images/woman.png" alt=""></view>
</view>
@@ -39,7 +39,19 @@
sex:{
type:Number,
default:null
}
},
size:{
type:Number,
default:40
},
width:{
type:String,
default:'40px'
},
height:{
type:String,
default:'40px'
},
},
data(){
return {
@@ -74,8 +86,8 @@
<style lang="scss" scoped>
.peo{
width: 40px;
height: 40px;
width: 100%;
height: 100%;
image{
width: 100%;
height: 100%;