mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 18:06:47 +08:00
评论样式
This commit is contained in:
@@ -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%;
|
||||
|
||||
Reference in New Issue
Block a user