@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.
- package/components/image/image.vue +11 -9
- package/package.json +1 -1
|
@@ -15,13 +15,15 @@
|
|
|
15
15
|
@error="handleImageError"
|
|
16
16
|
:style="imageStyle"
|
|
17
17
|
/>
|
|
18
|
-
<ui-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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%;
|