|
|
|
@ -1,9 +1,9 @@ |
|
|
|
<template> |
|
|
|
<div class="head-image" @click="showUserInfo($event)" :style="{cursor : isShowUserInfo ? 'pointer': null}"> |
|
|
|
<img class="avatar-image" v-show="url" :src="url" |
|
|
|
:style="avatarImageStyle" loading="lazy" /> |
|
|
|
<img class="avatar-image" v-show="url" :src="url" :style="avatarImageStyle" loading="lazy" /> |
|
|
|
<div class="avatar-text" v-show="!url" :style="avatarTextStyle"> |
|
|
|
{{name?.substring(0,2).toUpperCase()}}</div> |
|
|
|
{{name?.substring(0,2).toUpperCase()}} |
|
|
|
</div> |
|
|
|
<div v-show="online" class="online" title="用户当前在线"></div> |
|
|
|
<slot></slot> |
|
|
|
</div> |
|
|
|
@ -15,7 +15,8 @@ |
|
|
|
data() { |
|
|
|
return { |
|
|
|
colors: ["#5daa31", "#c7515a", "#e03697", "#85029b", |
|
|
|
"#c9b455", "#326eb6"] |
|
|
|
"#c9b455", "#326eb6" |
|
|
|
] |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
|