[Bug Report] el-image lazy的图片懒加载 首屏加载异常:当使用了el-image的父组件使用v-show,值为false,即父组件一开始没有出现在屏幕可视区域时,改变v-show的值,让父组件显示,此时的el-image无法正常显示,显示的时占位图片
- Dominant language
- Vue
- Stars
- 54k
- Forks
- 14.4k
- PR merge metrics
- No merged PRs in 30d
Description
### Element UI version
2.15.13
### OS/Browsers version
版本 113.0.5672.63(正式版本) (64 位)
### Vue version
2.7.14
### Reproduction Link
https://codepen.io/dlmd/pen/NWOMMMa
### Steps to reproduce
抱歉,暂时没有重现链接。
1.当使用了el-image的父组件使用v-show,值为false,即父组件一开始没有出现在屏幕可视区域
2.后续改变v-show的值,让父组件显示,此时的el-image无法正常显示,显示的是默认的占位图片
3.需要鼠标滚轮滚动一下,才会加载首屏的图片内容
### What is Expected?
期待el-image组件内部可以提供一个方法,让用户手动调取这个方法可以执行原本el-image中mounted中的代码逻辑
### What is actually happening?
el-image lazy的图片懒加载 首屏加载异常
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the CodePen reproduction and reading the el-image lazy-loading behavior described in the issue. Verify the case where a parent begins hidden with v-show and is then shown; done means the image loads without requiring a mouse-wheel scroll, with any proposed manual trigger matching the requested behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100