diff --git a/src/image/README.md b/src/image/README.md index b175729ab..db3b6c1cc 100644 --- a/src/image/README.md +++ b/src/image/README.md @@ -78,6 +78,7 @@ Vue.use(Lazyload); | lazy-load | Whether to enable lazy load,should register [Lazyload](#/en-US/lazyload) component | *boolean* | `false` | - | | show-error | Whether to show error placeholder | *boolean* | `true` | 2.0.9 | | show-loading | Whether to show loading placeholder | *boolean* | `true` | 2.0.9 | +| error-icon | Error icon | *string* | `warning-o` | 2.4.2 | | loading-icon | Loading icon | *string* | `photo-o` | 2.4.2 | ### fit optional value diff --git a/src/image/README.zh-CN.md b/src/image/README.zh-CN.md index 7c45f6cdf..8c888c9d5 100644 --- a/src/image/README.zh-CN.md +++ b/src/image/README.zh-CN.md @@ -104,6 +104,7 @@ Vue.use(Image); | lazy-load | 是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用 | *boolean* | `false` | - | | show-error | 是否展示图片加载失败提示 | *boolean* | `true` | 2.0.9 | | show-loading | 是否展示图片加载中提示 | *boolean* | `true` | 2.0.9 | +| error-icon | 失败时提示的图标名称或图片链接,可选值见 [Icon 组件](#/zh-CN/icon) | *string* | `warning-o` | 2.4.2 | | loading-icon | 加载时提示的图标名称或图片链接,可选值见 [Icon 组件](#/zh-CN/icon) | *string* | `photo-o` | 2.4.2 | ### 图片填充模式 diff --git a/src/image/index.js b/src/image/index.js index 90dca3bd5..10adb82d5 100644 --- a/src/image/index.js +++ b/src/image/index.js @@ -21,6 +21,10 @@ export default createComponent({ type: Boolean, default: true }, + errorIcon: { + type: String, + default: 'warning-o' + }, loadingIcon: { type: String, default: 'photo-o' @@ -123,7 +127,7 @@ export default createComponent({ return (