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 中slots,placeholder不生效问题 #3315

Closed
helloAping opened this issue Jul 20, 2022 · 6 comments
Closed

关于新版的Avatar 中slots,placeholder不生效问题 #3315

helloAping opened this issue Jul 20, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@helloAping
Copy link

helloAping commented Jul 20, 2022

TuSimple/naive-ui version (版本)

2.31.0

Vue version (Vue 版本)

3.2.37

Browser and its version (浏览器及其版本)

EDGE(103.0.1264.62 (正式版本) (64 位))

System and its version (系统及其版本)

Windows10 2004

Node version (Node 版本)

Reappearance link (重现链接)

https://www.naiveui.com/zh-CN/light/components/avatar#Avatar-Slots

Reappearance steps (重现步骤)

使用n-avatar 使用其#placeholder时图片无法加载时不能生效
https://s1.328888.xyz/2022/07/20/lpqZh.png (显示)
https://s1.328888.xyz/2022/07/20/lppUg.png (代码)
加入了lazy之后
https://s1.328888.xyz/2022/07/20/lpiKo.png (代码)
https://s1.328888.xyz/2022/07/20/lpWQF.png (显示)

Expected results (期望的结果)

能够正常的图片加载失败时显示文字

Actual results (实际的结果)

加入了lazy则图片,文字同时渲染,不加则只显示图片不显示文字,F12中并未渲染

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Jul 20, 2022
@helloAping
Copy link
Author

在 Edge,Firfox浏览器中都会有这种情况,加上了lazy后回添加上一个
<img style="">文字 标签跟上名字,然后浏览器会加上一个空图片图标,而不加上lazy就只会显示<img>文字不渲染
ps:使用源码没问题,npm下载就会出现问题

@07akioni 07akioni added the bug Something isn't working label Jul 21, 2022
@xushulang
Copy link
Contributor

2.32.2依然存在avatar懒加载不生效的问题,开了lazy相关配置,但还是一次性全部加载出来了

@07akioni
Copy link
Collaborator

器中都会有这种情况,加上了lazy后回添加上一个
<img style="">文字 标签跟上名字,然后浏览器会加上一个空图片图标,而不加上lazy就只会显示<img>文字不渲染
ps:使用源码没问题,

浏览器是什么,有相关代码吗?

@07akioni 07akioni removed the untriaged need to sort label Aug 25, 2022
@carlosyan1807
Copy link

image

image

@07akioni
Copy link
Collaborator

image image

是 Chrome + 最新版吗?

@carlosyan1807
Copy link

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants