hae
Version:
Mobile web UI based on Vux
59 lines (58 loc) • 2.28 kB
YAML
category:
en: Data Display
zh-CN: 数据展示
icon: ''
props:
default-src:
en: default image src
zh-CN: 默认显示的图片地址
src:
en: real image src
zh-CN: 最终加载的图片地址
webp-src:
en: real image src in webp format, if current browser supports webp, this image will be loaded
zh-CN: webp 格式的图片地址,如果当前浏览器支持webp,则加载该地址
error-class:
en: a class name will be added to the img element if loading failed
zh-CN: 加载失败时添加到 img 元素上的类名
success-class:
en: a class name will be added to the img element if loading successfully
zh-CN: 加载成功时添加到 img 元素上的类名
offset:
type: Number
default: 100
en: how early you want the elements to be loaded before they’re visible
zh-CN: 距离多远时开始加载
container:
default: window
en: If you want to lazy load elements inside a scrolling container change the default value to the selector of the container
zh-CN: 当图片是在一个容器里滚动时(比如demo站点100%高度的布局),你需要指定容器的选择器
delay:
type: Number
default: 0
en: delay execute lazyload function because sometimes transition between routes will cause problems
zh-CN: 延迟执行,在存在路由过渡时立即执行可能会导致进入页面后并不会正确加载图片。该属性在 2.5.4 后已经不推荐使用,推荐使用 BusPlugin 来通知组件页面已经载入完成。
separator:
en: the separator of image src
zh-CN: 支持设置src的分隔符
changes:
v2.9.2:
en:
- '[enhance] Support prop:separator #2744'
zh-CN:
- '[enhance] 支持设置separator属性 #2744'
v2.6.0:
en:
- '[fix] re-initialize when src is changed #1901'
zh-CN:
- '[fix] 当 src 变化时重新初始化 #1901'
v2.5.4:
en:
- '[feature] re-init after router-view transition is finished'
zh-CN:
- '[feature] 在 router-view 动画结束后自动重新监听加载'
v2.1.1-rc.2:
en:
- '[feature] Support prop:delay'
zh-CN:
- '[feature] 支持延迟执行属性 delay'