图片组件跟患者列表

This commit is contained in:
XiuYun CHEN
2025-07-21 16:23:36 +08:00
parent 1cdb5a3311
commit 75277f5bb5
12 changed files with 275 additions and 144 deletions
+3 -2
View File
@@ -29,7 +29,8 @@ export struct CommonAvatar {
if (this.item != null) {
if (this.item.avatarUrl == null || this.item.avatarUrl.toString().length <= 0) {
Image(BasicConstant.urlHtml+authStore.getUser().photo)
// Image(BasicConstant.urlHtml+authStore.getUser().photo)
Image($r('app.media.icon_touxiang_persion_new'))
.onError(() => {
if(this.item!=null)
{
@@ -88,7 +89,7 @@ export struct CommonAvatar {
export function buildAvatar(item: AvatarItem, width: Length, height: Length,
borderRadius?: Length | null) {
Stack() {
if (item.avatarUrl == null || item.avatarUrl.toString().length <= 0) {
if (item.avatarUrl == null || item.avatarUrl.toString().length <= 0||item.avatarUrl=='') {
Column() {
}.width('100%').height('100%').backgroundColor(item.color)