事件添加

This commit is contained in:
zhaofang
2022-11-15 17:09:30 +08:00
parent 145b2988f7
commit 0001f411fe
8 changed files with 251 additions and 24 deletions

View File

@@ -1,12 +1,12 @@
<template>
<view class="item-author" style="display: flex;">
<view>
<u-avatar shape="circle" v-if="data.avatar && data.avatar!=''" :size="20" :src="data.avatar"></u-avatar>
<view v-else :size="20" :sex="data.sex" random-bg-color >
<u-avatar shape="circle" v-if="data.avatar && data.avatar!=''" :size="size" :src="data.avatar"></u-avatar>
<view v-else :sex="data.sex" random-bg-color >
<view v-if="data.sex == null" class="peo"></view>
<view v-else>
<view class="peo" v-if="data.sex === 1 "><image src="../../static/images/man.png" alt=""></view>
<view class="peo" v-else><image src="../../static/images/woman.png" alt=""></view>
<view :style="{width:width,height:height}" class="peo" v-if="data.sex === 1 "><image src="../../static/images/man.png" alt=""></view>
<view :style="{width:width,height:height}" class="peo" v-else><image src="../../static/images/woman.png" alt=""></view>
</view>
</view>
<!-- <u-avatar v-else :size="25" random-bg-color :text="data.name" shape="square"></u-avatar> -->
@@ -36,7 +36,19 @@
showCode:{
type:Boolean,
default:true
}
},
size:{
type:Number,
default:24
},
width:{
type:String,
default:'24px'
},
height:{
type:String,
default:'24px'
},
},
data(){
return {
@@ -65,8 +77,10 @@
<style lang="scss" scoped >
.peo{
width: 25px;
height: 25px;
width: 100%;
height: 100%;
// width: 25px;
// height: 25px;
image{
width: 100%;
height: 100%;