update tuniao-ui/components/tn-avatar/tn-avatar.vue.

增加fontColor、fontSize、fontColorClass的控制,修复字体大小及颜色设置无效的问题

Signed-off-by: wssam <573616439@qq.com>
This commit is contained in:
wssam
2024-03-11 11:14:08 +00:00
committed by Gitee
parent 0d8ff2e98d
commit 3fbf31e52f

View File

@@ -1,7 +1,7 @@
<template>
<view
class="tn-avatar-class tn-avatar"
:class="[backgroundColorClass,avatarClass]"
:class="[backgroundColorClass,fontColorClass,avatarClass]"
:style="[avatarStyle]"
@tap="click"
>
@@ -176,6 +176,14 @@
} else if (this.shadow && this.showImg) {
style.backgroundImage = `url(${this.src})`
}
if(this.fontColorStyle) {
style.color = this.fontColorStyle
}
if(this.fontSizeStyle) {
style.fontSize = this.fontSizeStyle
}
if (this.border) {
style.border = `${this.borderSize}rpx solid ${this.borderColor}`