mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 02:16:12 +08:00
feat(Uploader): add lazy-load prop (#6083)
This commit is contained in:
parent
8f3baa3449
commit
859df7bde7
@ -161,6 +161,7 @@ export default {
|
|||||||
| disabled | Whether to disabled the upload | _boolean_ | `false` |
|
| disabled | Whether to disabled the upload | _boolean_ | `false` |
|
||||||
| deletable `v2.2.12` | Whether to show delete icon | _boolean_ | `true` |
|
| deletable `v2.2.12` | Whether to show delete icon | _boolean_ | `true` |
|
||||||
| show-upload `v2.5.6` | Whether to show upload area | _boolean_ | `true` |
|
| show-upload `v2.5.6` | Whether to show upload area | _boolean_ | `true` |
|
||||||
|
| lazy-load `v2.6.2` | Whether to enable lazy load,should register [Lazyload](#/en-US/lazyload) component | _boolean_ | `false` |
|
||||||
| capture | Capture,can be set to `camera` | _string_ | - |
|
| capture | Capture,can be set to `camera` | _string_ | - |
|
||||||
| after-read | Hook after reading the file | _Function_ | - |
|
| after-read | Hook after reading the file | _Function_ | - |
|
||||||
| before-read | Hook before reading the file, return false to stop reading the file, can return Promise | _Function_ | - |
|
| before-read | Hook before reading the file, return false to stop reading the file, can return Promise | _Function_ | - |
|
||||||
|
@ -183,6 +183,7 @@ export default {
|
|||||||
| disabled | 是否禁用文件上传 | _boolean_ | `false` |
|
| disabled | 是否禁用文件上传 | _boolean_ | `false` |
|
||||||
| deletable `v2.2.12` | 是否展示删除按钮 | _boolean_ | `true` |
|
| deletable `v2.2.12` | 是否展示删除按钮 | _boolean_ | `true` |
|
||||||
| show-upload `v2.5.6` | 是否展示上传区域 | _boolean_ | `true` |
|
| show-upload `v2.5.6` | 是否展示上传区域 | _boolean_ | `true` |
|
||||||
|
| lazy-load `v2.6.2` | 是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用 | _boolean_ | `false` |
|
||||||
| capture | 图片选取模式,可选值为`camera`(直接调起摄像头) | _string_ | - |
|
| capture | 图片选取模式,可选值为`camera`(直接调起摄像头) | _string_ | - |
|
||||||
| after-read | 文件读取完成后的回调函数 | _Function_ | - |
|
| after-read | 文件读取完成后的回调函数 | _Function_ | - |
|
||||||
| before-read | 文件读取前的回调函数,返回`false`可终止文件读取,<br>支持返回`Promise` | _Function_ | - |
|
| before-read | 文件读取前的回调函数,返回`false`可终止文件读取,<br>支持返回`Promise` | _Function_ | - |
|
||||||
|
@ -24,6 +24,7 @@ export default createComponent({
|
|||||||
|
|
||||||
props: {
|
props: {
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
|
lazyLoad: Boolean,
|
||||||
uploadText: String,
|
uploadText: String,
|
||||||
afterRead: Function,
|
afterRead: Function,
|
||||||
beforeRead: Function,
|
beforeRead: Function,
|
||||||
@ -301,6 +302,7 @@ export default createComponent({
|
|||||||
class={bem('preview-image')}
|
class={bem('preview-image')}
|
||||||
width={this.previewSize}
|
width={this.previewSize}
|
||||||
height={this.previewSize}
|
height={this.previewSize}
|
||||||
|
lazyLoad={this.lazyLoad}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.onPreviewImage(item);
|
this.onPreviewImage(item);
|
||||||
}}
|
}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user