zsk 3 months ago
commit b13deca5ed

@ -2,7 +2,10 @@
<span
class="appellation"
:style="{ color: color, fontSize: fontSize + 'px' }"
>{{ appellation }}</span
>
{{ appellation }}
<span v-if="subtitle" style="color: orange;">{{ subtitle }}</span>
</span
>
</template>
@ -36,16 +39,25 @@ const { account, teamId, ignoreAlias, nickFromMsg } = withDefaults(
fontSize: 16,
}
)
const subtitle = ref('');
const uninstallAppellationWatch = autorun(() => {
appellation.value = deepClone(
uni.$UIKitStore.uiStore.getAppellation({
account,
teamId,
ignoreAlias,
nickFromMsg,
async function getUserInfo() {
try {
const res = await uni.$UIKitStore.userStore.getUserActive('10023')
return res
} catch (error) {
console.error('getUserInfo error:', error)
}
}
getUserInfo().then(res => {
console.log('getUserInfo 热死', res)
if(res.serverExtension){
subtitle.value = '@' + JSON.parse(res.serverExtension).fullName;
}else{
subtitle.value = '';
}
appellation.value = res.name;
})
)
})
onUnmounted(() => {
uninstallAppellationWatch()

@ -93,7 +93,7 @@
: ''
" :goto-user-card="true" />
<div class="msg-content">
<div class="msg-name" v-if="!props.msg.isSelf">
<div class="msg-name 1" v-if="!props.msg.isSelf">
{{ appellation }}
</div>
<div :class="props.msg.isSelf ? 'self-msg-recall' : 'msg-recall'">
@ -114,8 +114,8 @@
: ''
" :goto-user-card="true" />
<div class="msg-content">
<div class="msg-name" v-if="!props.msg.isSelf">
{{ appellation }}
<div class="msg-name 2" v-if="!props.msg.isSelf">
{{ appellation }}{{ props }}
</div>
<MessageBubble :msg="props.msg" :tooltip-visible="true" :bg-visible="true">
<ReplyMessage v-if="!!replyMsg" :replyMsg="replyMsg"></ReplyMessage>
@ -135,7 +135,7 @@
: ''
" :goto-user-card="true" />
<div class="msg-content">
<div class="msg-name" v-if="!props.msg.isSelf">
<div class="msg-name 3" v-if="!props.msg.isSelf">
{{ appellation }}
</div>
<MessageBubble :msg="props.msg" :tooltip-visible="true" :bg-visible="true" style="cursor: pointer">
@ -161,7 +161,7 @@
: ''
" :goto-user-card="true" />
<div class="msg-content">
<div class="msg-name" v-if="!props.msg.isSelf">
<div class="msg-name 4" v-if="!props.msg.isSelf">
{{ appellation }}
</div>
<MessageBubble :msg="props.msg" :tooltip-visible="true" :bg-visible="true" style="cursor: pointer">
@ -187,7 +187,7 @@
: ''
" :goto-user-card="true" />
<div class="msg-content">
<div class="msg-name" v-if="!props.msg.isSelf">
<div class="msg-name 5" v-if="!props.msg.isSelf">
{{ appellation }}
</div>
<MessageBubble :msg="props.msg" :tooltip-visible="true" :bg-visible="true">
@ -206,7 +206,7 @@
: ''
" :goto-user-card="true" />
<div class="msg-content">
<div class="msg-name" v-if="!props.msg.isSelf">
<div class="msg-name 6" v-if="!props.msg.isSelf">
{{ appellation }}
</div>
<MessageBubble :msg="props.msg" :tooltip-visible="true" :bg-visible="false">
@ -228,7 +228,7 @@
: ''
" :goto-user-card="true" />
<div class="msg-content">
<div class="msg-name" v-if="!props.msg.isSelf">
<div class="msg-name 7" v-if="!props.msg.isSelf">
{{ appellation }}
</div>
<MessageBubble :msg="props.msg" :tooltip-visible="true" :bg-visible="true" style="cursor: pointer">
@ -355,7 +355,7 @@
: ''
" :goto-user-card="true" />
<div class="msg-content">
<div class="msg-name" v-if="!props.msg.isSelf">
<div class="msg-name 8" v-if="!props.msg.isSelf">
{{ appellation }}
</div>
<MessageBubble :msg="props.msg" :tooltip-visible="true" :bg-visible="true">

Loading…
Cancel
Save