diff --git a/src/uploader/README.md b/src/uploader/README.md index 4cbe7feb4..d2c72c177 100644 --- a/src/uploader/README.md +++ b/src/uploader/README.md @@ -161,6 +161,7 @@ export default { | disabled | Whether to disabled the upload | _boolean_ | `false` | | deletable `v2.2.12` | Whether to show delete icon | _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_ | - | | 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_ | - | diff --git a/src/uploader/README.zh-CN.md b/src/uploader/README.zh-CN.md index 0eae6e5b3..e864fa8a0 100644 --- a/src/uploader/README.zh-CN.md +++ b/src/uploader/README.zh-CN.md @@ -183,6 +183,7 @@ export default { | disabled | 是否禁用文件上传 | _boolean_ | `false` | | deletable `v2.2.12` | 是否展示删除按钮 | _boolean_ | `true` | | show-upload `v2.5.6` | 是否展示上传区域 | _boolean_ | `true` | +| lazy-load `v2.6.2` | 是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用 | _boolean_ | `false` | | capture | 图片选取模式,可选值为`camera`(直接调起摄像头) | _string_ | - | | after-read | 文件读取完成后的回调函数 | _Function_ | - | | before-read | 文件读取前的回调函数,返回`false`可终止文件读取,
支持返回`Promise` | _Function_ | - | diff --git a/src/uploader/index.js b/src/uploader/index.js index e54ea68c0..e041568eb 100644 --- a/src/uploader/index.js +++ b/src/uploader/index.js @@ -24,6 +24,7 @@ export default createComponent({ props: { disabled: Boolean, + lazyLoad: Boolean, uploadText: String, afterRead: Function, beforeRead: Function, @@ -301,6 +302,7 @@ export default createComponent({ class={bem('preview-image')} width={this.previewSize} height={this.previewSize} + lazyLoad={this.lazyLoad} onClick={() => { this.onPreviewImage(item); }}