diff --git a/src/image/README.md b/src/image/README.md index 67ccd0444..7206cfddb 100644 --- a/src/image/README.md +++ b/src/image/README.md @@ -74,6 +74,7 @@ Vue.use(Lazyload); | height | Height | `string | number` | - | - | | round | Whether to be round | `boolean` | `false` | - | | 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` | | loading-placeholder | Whether to show loading placeholder | `boolean` | `true` | ### fit optional value diff --git a/src/image/README.zh-CN.md b/src/image/README.zh-CN.md index e90a569c9..ad26551fd 100644 --- a/src/image/README.zh-CN.md +++ b/src/image/README.zh-CN.md @@ -100,7 +100,8 @@ Vue.use(Image); | height | 高度,默认单位为 px | `string | number` | - | - | | round | 是否显示为圆形 | `boolean` | `false` | - | | lazy-load | 是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用 | `boolean` | `false` | - | -| loading-placeholder | 是否展示图片加载中提示 | `boolean` | `true` | `2.0.9` | +| show-error | 是否展示图片加载失败提示 | `boolean` | `true` | 2.0.9 | +| loading-placeholder | 是否展示图片加载中提示 | `boolean` | `true` | 2.0.9 | ### 图片填充模式 diff --git a/src/image/index.js b/src/image/index.js index 72cb02b72..1ef7ab96d 100644 --- a/src/image/index.js +++ b/src/image/index.js @@ -12,6 +12,10 @@ export default createComponent({ width: [Number, String], height: [Number, String], lazyLoad: Boolean, + showError: { + type: Boolean, + default: true + }, loadingPlaceholder: { type: Boolean, default: true @@ -103,7 +107,7 @@ export default createComponent({ ); } - if (this.error) { + if (this.error && this.showError) { return (