Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Avatar] 头像组件的alt属性不生效 #3042

Open
mdxiaohu opened this issue Jan 16, 2024 · 2 comments
Open

[Avatar] 头像组件的alt属性不生效 #3042

mdxiaohu opened this issue Jan 16, 2024 · 2 comments

Comments

@mdxiaohu
Copy link

mdxiaohu commented Jan 16, 2024

tdesign-vue 版本

1.8.4

重现链接

No response

重现步骤

<t-avatar class="avatar" size="small" shape="circle" :hideOnLoadFailed="true" :image="avatarComputed"
	 alt="错误显示">
</t-avatar>

avatarComputed() {
  if (!this.avatar) {
 // 给了一个不存在的图片,用来触发图片加载错误事件
  return 'avatar.jpg'
  } else {
  return this.avatar
  }
}

期望结果

在image图片加载失败的情况下,alt的值替换图片显示出来。

实际结果

在image图片加载失败的情况下,alt的值没用替换。

框架版本

Vue(2.6.14)

浏览器版本

谷歌(98.0.4758.9)

系统版本

Windows10

Node版本

15.0.1

补充说明

No response

Copy link
Contributor

👋 @mdxiaohu,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

Copy link
Contributor

github-actions bot commented Jan 16, 2024

♥️ 有劳 @gh1198843222 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @mdxiaohu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant