-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Description
- I have searched the issues of this repository and believe that this is not a duplicate.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Version
4.2.6
Environment
System: OS: macOS 15.0 CPU: (8) arm64 Apple M1 Pro Binaries: Node: 18.20.3 - ~/.volta/tools/image/node/18.20.3/bin/node Yarn: 1.22.17 - ~/.volta/tools/image/yarn/1.22.17/bin/yarn npm: 10.7.0 - ~/.volta/tools/image/node/18.20.3/bin/npm Browsers: Chrome: 136.0.7103.114 Edge: 135.0.3179.85 Safari: 18.0 npmGlobalPackages: @vue/cli: Not Found
Reproduction link
Steps to reproduce
- 使用a-image加载图片
- 使用placeholder属性设置为true
- 加载一个png的透明图片
图片显示后会出现plaholder的背景图
What is expected?
png 的透明图正常加载但是不会显示plaholder
What is actually happening?
必现
<template>
<a-image
:width="200"
:placeholder="true"
src="https://i.postimg.cc/zDWYps2B/1747876838661-ukc8qk7w20250522-092008.png"
/>
</template>
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
wangfpp commentedon May 22, 2025
selicens commentedon May 22, 2025
这个也不是bug,
placeholder
加载占位, 为 true 时使用默认占位,本身就不应该一直为true,获取到图片URL后应该将其置为false,如果需要处理图片加载失败的占位应使用fallback
APIwangfpp commentedon May 22, 2025
@selicens 官方文档描述是
加载占位, 为 true 时使用默认占位 |
我理解的是图片加载时的占位 类似loading 加载完成就应该隐藏loadingselicens commentedon May 22, 2025
自行处理吧
wangfpp commentedon May 23, 2025
@selicens 可以自行处理 我想了解下这个组件
placeholder
设计之初的用途是啥 是加载中的占位还是啥?另外能否提供
img.onLoad
的事件暴露出来 现在只有error
事件fix(Image): Update loading state handling and add placeholder display…
yuantongkang commentedon May 26, 2025
你这个逻辑不对,表单组件也有 placeholder 字段,一旦值不为 undefined,placeholder 也是不渲染的