@aochuang/common 1.0.136 → 1.0.137

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,13 +15,15 @@
15
15
  @error="handleImageError"
16
16
  :style="imageStyle"
17
17
  />
18
- <ui-icon
19
- v-if="status === 'error'"
20
- name="image-error-line"
21
- class="ui-image__error"
22
- :size="iconSize"
23
- color="#aaa"
24
- ></ui-icon>
18
+ <div v-if="status === 'error'" class="ui-image__error" :class="{'has-slot': $slots.error}">
19
+ <slot name="error">
20
+ <ui-icon
21
+ name="image-error-line"
22
+ :size="iconSize"
23
+ color="#aaa"
24
+ ></ui-icon>
25
+ </slot>
26
+ </div>
25
27
  <div class="ui-image__preview" v-if="previewable && status === 'success'" @click="handlePreviewClick">
26
28
  <ui-icon name="sousuo" :size="30" color="#fff"></ui-icon>
27
29
  </div>
@@ -215,7 +217,7 @@ export default {
215
217
  if (!this.source) {
216
218
  return
217
219
  }
218
- const clickFn = getImageClickFn()
220
+ const clickFn = getImageClickFn()
219
221
  if (clickFn) {
220
222
  clickFn({
221
223
  alt: this.alt,
@@ -318,7 +320,7 @@ export default {
318
320
  img {
319
321
  display: none!important;
320
322
  }
321
- .ui-image__error{
323
+ .ui-image__error:not(.has-slot){
322
324
  position: absolute;
323
325
  left: 50%;
324
326
  top: 50%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aochuang/common",
3
- "version": "1.0.136",
3
+ "version": "1.0.137",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "publishConfig": {