hy-app 0.3.1 → 0.3.2
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/README.md +6 -3
- package/common/shakeService.ts +31 -29
- package/components/avatar.zip +0 -0
- package/components/hy-action-sheet/hy-action-sheet.vue +71 -46
- package/components/hy-address-picker/hy-address-picker.vue +94 -83
- package/components/hy-avatar/hy-avatar.vue +84 -85
- package/components/hy-badge/hy-badge.vue +47 -46
- package/components/hy-button/hy-button.vue +117 -93
- package/components/hy-calendar/hy-calendar.vue +168 -160
- package/components/hy-card/hy-card.vue +50 -43
- package/components/hy-card/typing.d.ts +33 -32
- package/components/hy-cell/hy-cell.vue +73 -51
- package/components/hy-check-button/hy-check-button.vue +54 -47
- package/components/hy-checkbox/hy-checkbox.vue +97 -105
- package/components/hy-code-input/hy-code-input.vue +80 -89
- package/components/hy-config-provider/hy-config-provider.vue +19 -20
- package/components/hy-count-down/hy-count-down.vue +66 -67
- package/components/hy-count-to/hy-count-to.vue +105 -99
- package/components/hy-count-to/typing.d.ts +13 -12
- package/components/hy-datetime-picker/hy-datetime-picker.vue +261 -253
- package/components/hy-datetime-picker/typing.d.ts +42 -40
- package/components/hy-divider/hy-divider.vue +68 -73
- package/components/hy-dropdown/hy-dropdown.vue +20 -19
- package/components/hy-dropdown-item/hy-dropdown-item.vue +66 -61
- package/components/hy-dropdown-item/typing.d.ts +9 -9
- package/components/hy-empty/hy-empty.vue +42 -42
- package/components/hy-flex/hy-flex.vue +52 -26
- package/components/hy-float-button/hy-float-button.vue +218 -210
- package/components/hy-folding-panel/hy-folding-panel.vue +32 -33
- package/components/hy-form/hy-form.vue +264 -259
- package/components/hy-grid/hy-grid.vue +44 -43
- package/components/hy-icon/hy-icon.vue +61 -67
- package/components/hy-image/hy-image.vue +112 -88
- package/components/hy-image/typing.d.ts +27 -23
- package/components/hy-input/hy-input.vue +157 -127
- package/components/hy-input/typing.d.ts +53 -47
- package/components/hy-line/hy-line.vue +26 -26
- package/components/hy-line-progress/hy-line-progress.vue +42 -35
- package/components/hy-list/hy-list.vue +76 -85
- package/components/hy-loading/hy-loading.vue +26 -23
- package/components/hy-menu/hy-menu.vue +48 -43
- package/components/hy-menu/typing.d.ts +18 -17
- package/components/hy-modal/hy-modal.vue +39 -35
- package/components/hy-navbar/hy-navbar.vue +25 -25
- package/components/hy-navbar/typing.d.ts +24 -22
- package/components/hy-notice-bar/hy-notice-bar.vue +26 -27
- package/components/hy-notify/hy-notify.vue +53 -53
- package/components/hy-number-step/hy-number-step.vue +134 -146
- package/components/hy-number-step/typing.d.ts +35 -35
- package/components/hy-overlay/hy-overlay.vue +23 -21
- package/components/hy-pagination/hy-pagination.vue +41 -36
- package/components/hy-picker/hy-picker.vue +184 -154
- package/components/hy-picker/typing.d.ts +39 -39
- package/components/hy-popover/hy-popover.vue +97 -77
- package/components/hy-popup/hy-popup.vue +107 -98
- package/components/hy-price/hy-price.vue +38 -34
- package/components/hy-qrcode/hy-qrcode.vue +50 -51
- package/components/hy-radio/hy-radio.vue +101 -113
- package/components/hy-rate/hy-rate.vue +107 -88
- package/components/hy-read-more/hy-read-more.vue +64 -49
- package/components/hy-scroll-list/hy-scroll-list.vue +45 -48
- package/components/hy-search/hy-search.vue +73 -66
- package/components/hy-search/typing.d.ts +36 -35
- package/components/hy-signature/hy-signature.vue +282 -240
- package/components/hy-slider/hy-slider.vue +195 -153
- package/components/hy-slider/typing.d.ts +21 -21
- package/components/hy-steps/hy-steps.vue +118 -90
- package/components/hy-steps/index.scss +31 -21
- package/components/hy-submit-bar/hy-submit-bar.vue +61 -70
- package/components/hy-subsection/hy-subsection.vue +99 -102
- package/components/hy-subsection/typing.d.ts +19 -19
- package/components/hy-swipe-action/hy-swipe-action.vue +131 -118
- package/components/hy-swiper/hy-swiper.vue +85 -71
- package/components/hy-switch/hy-switch.vue +67 -72
- package/components/hy-switch/typing.d.ts +21 -19
- package/components/hy-tabs/hy-tabs.vue +168 -113
- package/components/hy-tag/hy-tag.vue +90 -86
- package/components/hy-tag/typing.d.ts +26 -21
- package/components/hy-text/hy-text.vue +119 -111
- package/components/hy-textarea/hy-textarea.vue +100 -93
- package/components/hy-textarea/typing.d.ts +36 -31
- package/components/hy-toast/hy-toast.vue +77 -67
- package/components/hy-tooltip/hy-tooltip.vue +109 -91
- package/components/hy-transition/hy-transition.vue +62 -66
- package/components/hy-upload/hy-upload.vue +294 -152
- package/components/hy-upload/typing.d.ts +41 -36
- package/components/hy-warn/hy-warn.vue +34 -27
- package/components/hy-waterfall/hy-waterfall.vue +83 -74
- package/components/hy-watermark/hy-watermark.vue +134 -115
- package/composables/usePopover.ts +236 -221
- package/composables/useQueue.ts +53 -52
- package/package.json +2 -2
- package/store/index.ts +9 -1
- package/typing/index.ts +0 -1
- package/typing/modules/common.d.ts +0 -2
- package/web-types.json +1 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<HyTransition
|
|
2
|
+
<HyTransition
|
|
3
|
+
mode="fade"
|
|
4
|
+
:show="show"
|
|
5
|
+
:style="transStyle"
|
|
6
|
+
:duration="fade ? 1000 : 0"
|
|
7
|
+
>
|
|
3
8
|
<view
|
|
4
9
|
:class="['hy-image', 'box-border', customClass]"
|
|
5
10
|
@tap="clickHandler"
|
|
@@ -51,50 +56,61 @@
|
|
|
51
56
|
|
|
52
57
|
<script lang="ts">
|
|
53
58
|
export default {
|
|
54
|
-
name:
|
|
59
|
+
name: "hy-image",
|
|
55
60
|
options: {
|
|
56
61
|
addGlobalClass: true,
|
|
57
62
|
virtualHost: true,
|
|
58
|
-
styleIsolation:
|
|
63
|
+
styleIsolation: "shared",
|
|
59
64
|
},
|
|
60
|
-
}
|
|
65
|
+
};
|
|
61
66
|
</script>
|
|
62
67
|
|
|
63
68
|
<script setup lang="ts">
|
|
64
|
-
import { computed, onMounted, ref,
|
|
65
|
-
import type { PropType, CSSProperties } from
|
|
66
|
-
import type { IImageEmits } from
|
|
67
|
-
import { addUnit, getPx } from
|
|
68
|
-
import { IconConfig } from
|
|
69
|
+
import { computed, onMounted, ref, watch } from "vue";
|
|
70
|
+
import type { PropType, CSSProperties } from "vue";
|
|
71
|
+
import type { IImageEmits } from "./typing";
|
|
72
|
+
import { addUnit, getPx } from "../../utils";
|
|
73
|
+
import { IconConfig } from "../../config";
|
|
69
74
|
// 组件
|
|
70
|
-
import HyIcon from
|
|
71
|
-
import HyTransition from
|
|
72
|
-
import HyLoading from
|
|
75
|
+
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
76
|
+
import HyTransition from "../hy-transition/hy-transition.vue";
|
|
77
|
+
import HyLoading from "../hy-loading/hy-loading.vue";
|
|
78
|
+
import type {
|
|
79
|
+
ImageOnErrorEvent,
|
|
80
|
+
ImageOnLoadEvent,
|
|
81
|
+
} from "@uni-helper/uni-types";
|
|
73
82
|
|
|
74
83
|
/**
|
|
75
84
|
* uni-app的image组件的加强版,在继承了原有功能外,还支持淡入动画、加载中、加载失败提示、圆角值和形状等。
|
|
76
85
|
* @displayName hy-image
|
|
77
86
|
*/
|
|
78
|
-
defineOptions({})
|
|
87
|
+
defineOptions({});
|
|
79
88
|
|
|
80
89
|
// const props = withDefaults(defineProps<IProps>(), defaultProps)
|
|
81
90
|
const props = defineProps({
|
|
82
91
|
/** 图片地址 */
|
|
83
|
-
src:
|
|
84
|
-
|
|
92
|
+
src: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: "",
|
|
95
|
+
required: true,
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* 裁剪模式,见官网说明
|
|
99
|
+
* @values scaleToFill,aspectFit,aspectFill,widthFix,heightFix,top,bottom,center,left,right,top left,top right,bottom left,bottom right
|
|
100
|
+
* */
|
|
85
101
|
mode: {
|
|
86
102
|
type: String,
|
|
87
|
-
default:
|
|
103
|
+
default: "aspectFill",
|
|
88
104
|
},
|
|
89
105
|
/** 宽度,单位任意,如果为数值,则为px单位 */
|
|
90
106
|
width: {
|
|
91
107
|
type: [String, Number],
|
|
92
|
-
default:
|
|
108
|
+
default: "",
|
|
93
109
|
},
|
|
94
110
|
/** 高度,单位任意,如果为数值,则为px单位 */
|
|
95
111
|
height: {
|
|
96
112
|
type: [String, Number],
|
|
97
|
-
default:
|
|
113
|
+
default: "",
|
|
98
114
|
},
|
|
99
115
|
/**
|
|
100
116
|
* 图片形状
|
|
@@ -102,7 +118,7 @@ const props = defineProps({
|
|
|
102
118
|
* */
|
|
103
119
|
shape: {
|
|
104
120
|
type: String,
|
|
105
|
-
default:
|
|
121
|
+
default: "square",
|
|
106
122
|
},
|
|
107
123
|
/** 圆角值,单位任意,如果为数值,则为px单位 */
|
|
108
124
|
radius: {
|
|
@@ -172,126 +188,134 @@ const props = defineProps({
|
|
|
172
188
|
},
|
|
173
189
|
/** 自定义外部类名 */
|
|
174
190
|
customClass: String,
|
|
175
|
-
})
|
|
176
|
-
const
|
|
177
|
-
customStyle,
|
|
178
|
-
duration,
|
|
179
|
-
src,
|
|
180
|
-
width,
|
|
181
|
-
height,
|
|
182
|
-
mode,
|
|
183
|
-
shape,
|
|
184
|
-
radius,
|
|
185
|
-
bgColor,
|
|
186
|
-
previewImage,
|
|
187
|
-
indistinct,
|
|
188
|
-
} = toRefs(props)
|
|
189
|
-
const emit = defineEmits<IImageEmits>()
|
|
191
|
+
});
|
|
192
|
+
const emit = defineEmits<IImageEmits>();
|
|
190
193
|
|
|
191
194
|
// 图片是否加载错误,如果是,则显示错误占位图
|
|
192
|
-
const isError = ref(false)
|
|
195
|
+
const isError = ref(false);
|
|
193
196
|
// 初始化组件时,默认为加载中状态
|
|
194
|
-
const loading = ref(true)
|
|
197
|
+
const loading = ref(true);
|
|
195
198
|
// 不透明度,为了实现淡入淡出的效果
|
|
196
|
-
const opacity = ref(1)
|
|
199
|
+
const opacity = ref(1);
|
|
197
200
|
// 过渡时间,因为props的值无法修改,故需要一个中间值
|
|
198
|
-
const durationTime = ref(duration
|
|
201
|
+
const durationTime = ref(props.duration);
|
|
199
202
|
// 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景
|
|
200
|
-
const backgroundStyle = ref({})
|
|
203
|
+
const backgroundStyle = ref({});
|
|
201
204
|
// 用于fade模式的控制组件显示与否
|
|
202
|
-
const show = ref(false)
|
|
205
|
+
const show = ref(false);
|
|
203
206
|
|
|
204
207
|
watch(
|
|
205
|
-
() => src
|
|
208
|
+
() => props.src,
|
|
206
209
|
(newValue) => {
|
|
207
210
|
if (!newValue) {
|
|
208
211
|
// 如果传入null或者'',或者false,或者undefined,标记为错误状态
|
|
209
|
-
isError.value = true
|
|
210
|
-
loading.value = false
|
|
212
|
+
isError.value = true;
|
|
213
|
+
loading.value = false;
|
|
211
214
|
} else {
|
|
212
|
-
isError.value = false
|
|
213
|
-
loading.value = true
|
|
215
|
+
isError.value = false;
|
|
216
|
+
loading.value = true;
|
|
214
217
|
}
|
|
215
218
|
},
|
|
216
219
|
{ immediate: true },
|
|
217
|
-
)
|
|
220
|
+
);
|
|
218
221
|
|
|
219
222
|
const transStyle = computed<CSSProperties>(() => {
|
|
220
|
-
const style: CSSProperties = {}
|
|
221
|
-
if (
|
|
222
|
-
|
|
223
|
+
const style: CSSProperties = {};
|
|
224
|
+
if (
|
|
225
|
+
loading.value ||
|
|
226
|
+
isError.value ||
|
|
227
|
+
props.width == "100%" ||
|
|
228
|
+
props.mode != "heightFix"
|
|
229
|
+
) {
|
|
230
|
+
style.width = addUnit(props.width);
|
|
223
231
|
} else {
|
|
224
|
-
style.width =
|
|
232
|
+
style.width = "fit-content";
|
|
225
233
|
}
|
|
226
|
-
if (
|
|
227
|
-
|
|
234
|
+
if (
|
|
235
|
+
loading.value ||
|
|
236
|
+
isError.value ||
|
|
237
|
+
props.height == "100%" ||
|
|
238
|
+
props.mode != "widthFix"
|
|
239
|
+
) {
|
|
240
|
+
style.height = addUnit(props.height);
|
|
228
241
|
} else {
|
|
229
|
-
style.height =
|
|
242
|
+
style.height = "fit-content";
|
|
230
243
|
}
|
|
231
|
-
return style
|
|
232
|
-
})
|
|
244
|
+
return style;
|
|
245
|
+
});
|
|
233
246
|
|
|
234
247
|
const wrapStyle = computed(() => {
|
|
235
|
-
const style: CSSProperties = {}
|
|
236
|
-
if (
|
|
237
|
-
|
|
248
|
+
const style: CSSProperties = {};
|
|
249
|
+
if (
|
|
250
|
+
loading.value ||
|
|
251
|
+
isError.value ||
|
|
252
|
+
props.width == "100%" ||
|
|
253
|
+
props.mode != "heightFix"
|
|
254
|
+
) {
|
|
255
|
+
style.width = addUnit(props.width);
|
|
238
256
|
} else {
|
|
239
|
-
style.width =
|
|
257
|
+
style.width = "fit-content";
|
|
240
258
|
}
|
|
241
|
-
if (
|
|
242
|
-
|
|
259
|
+
if (
|
|
260
|
+
loading.value ||
|
|
261
|
+
isError.value ||
|
|
262
|
+
props.height == "100%" ||
|
|
263
|
+
props.mode != "widthFix"
|
|
264
|
+
) {
|
|
265
|
+
style.height = addUnit(props.height);
|
|
243
266
|
} else {
|
|
244
|
-
style.height =
|
|
267
|
+
style.height = "fit-content";
|
|
245
268
|
}
|
|
246
269
|
// 如果是显示圆形,设置一个很多的半径值即可
|
|
247
|
-
style.borderRadius =
|
|
270
|
+
style.borderRadius =
|
|
271
|
+
props.shape == "circle" ? "10000px" : addUnit(props.radius);
|
|
248
272
|
// 如果设置圆角,必须要有hidden,否则可能圆角无效
|
|
249
|
-
style.overflow = getPx(radius
|
|
273
|
+
style.overflow = getPx(props.radius) > 0 ? "hidden" : "visible";
|
|
250
274
|
|
|
251
|
-
return Object.assign(style, customStyle
|
|
252
|
-
})
|
|
275
|
+
return Object.assign(style, props.customStyle);
|
|
276
|
+
});
|
|
253
277
|
|
|
254
278
|
onMounted(() => {
|
|
255
|
-
show.value = true
|
|
256
|
-
})
|
|
279
|
+
show.value = true;
|
|
280
|
+
});
|
|
257
281
|
|
|
258
282
|
const clickHandler = () => {
|
|
259
|
-
emit(
|
|
283
|
+
emit("click");
|
|
260
284
|
|
|
261
|
-
if (previewImage
|
|
285
|
+
if (props.previewImage) {
|
|
262
286
|
uni.previewImage({
|
|
263
|
-
urls: [src
|
|
264
|
-
})
|
|
287
|
+
urls: [props.src],
|
|
288
|
+
});
|
|
265
289
|
}
|
|
266
|
-
}
|
|
290
|
+
};
|
|
267
291
|
|
|
268
292
|
/**
|
|
269
293
|
* @description 图片加载失败
|
|
270
294
|
* */
|
|
271
|
-
const onErrorHandler = (err:
|
|
272
|
-
loading.value = false
|
|
273
|
-
isError.value = true
|
|
274
|
-
emit(
|
|
275
|
-
}
|
|
295
|
+
const onErrorHandler = (err: ImageOnErrorEvent) => {
|
|
296
|
+
loading.value = false;
|
|
297
|
+
isError.value = true;
|
|
298
|
+
emit("error", err);
|
|
299
|
+
};
|
|
276
300
|
|
|
277
301
|
/**
|
|
278
302
|
* @description 图片加载成功
|
|
279
303
|
* */
|
|
280
|
-
const onLoadHandler = (e:
|
|
281
|
-
loading.value = false
|
|
282
|
-
isError.value = false
|
|
283
|
-
emit(
|
|
284
|
-
removeBgColor()
|
|
285
|
-
}
|
|
304
|
+
const onLoadHandler = (e: ImageOnLoadEvent) => {
|
|
305
|
+
loading.value = false;
|
|
306
|
+
isError.value = false;
|
|
307
|
+
emit("load", e);
|
|
308
|
+
removeBgColor();
|
|
309
|
+
};
|
|
286
310
|
|
|
287
311
|
const removeBgColor = () => {
|
|
288
312
|
// 淡入动画过渡完成后,将背景设置为透明色,否则png图片会看到灰色的背景
|
|
289
313
|
backgroundStyle.value = {
|
|
290
|
-
backgroundColor: bgColor
|
|
291
|
-
}
|
|
292
|
-
}
|
|
314
|
+
backgroundColor: props.bgColor,
|
|
315
|
+
};
|
|
316
|
+
};
|
|
293
317
|
</script>
|
|
294
318
|
|
|
295
319
|
<style scoped lang="scss">
|
|
296
|
-
@import
|
|
320
|
+
@import "./index.scss";
|
|
297
321
|
</style>
|
|
@@ -1,89 +1,93 @@
|
|
|
1
|
-
import type { CSSProperties } from
|
|
1
|
+
import type { CSSProperties } from "vue";
|
|
2
|
+
import type {
|
|
3
|
+
ImageOnErrorEvent,
|
|
4
|
+
ImageOnLoadEvent,
|
|
5
|
+
} from "@uni-helper/uni-types";
|
|
2
6
|
|
|
3
7
|
export default interface HyImageProps {
|
|
4
8
|
/**
|
|
5
9
|
* @description 图片地址
|
|
6
10
|
* */
|
|
7
|
-
src?: string
|
|
11
|
+
src?: string;
|
|
8
12
|
/**
|
|
9
13
|
* @description 裁剪模式,见官网说明 (默认 'aspectFill' )
|
|
10
14
|
* */
|
|
11
|
-
mode?: HyApp.ImageModeVo
|
|
15
|
+
mode?: HyApp.ImageModeVo;
|
|
12
16
|
/**
|
|
13
17
|
* @description 宽度,单位任意,如果为数值,则为px单位 (默认 '300' )
|
|
14
18
|
* */
|
|
15
|
-
width?: string | number
|
|
19
|
+
width?: string | number;
|
|
16
20
|
/**
|
|
17
21
|
* @description 高度,单位任意,如果为数值,则为px单位 (默认 '225' )
|
|
18
22
|
* */
|
|
19
|
-
height?: string | number
|
|
23
|
+
height?: string | number;
|
|
20
24
|
/**
|
|
21
25
|
* @description 图片形状,circle-圆形,square-方形 (默认 'square' )
|
|
22
26
|
* */
|
|
23
|
-
shape?: HyApp.ShapeType
|
|
27
|
+
shape?: HyApp.ShapeType;
|
|
24
28
|
/**
|
|
25
29
|
* @description 圆角值,单位任意,如果为数值,则为px单位 (默认 0 )
|
|
26
30
|
* */
|
|
27
|
-
radius?: number | string
|
|
31
|
+
radius?: number | string;
|
|
28
32
|
/**
|
|
29
33
|
* @description 是否懒加载,仅微信小程序、App、百度小程序、字节跳动小程序有效 (默认 true )
|
|
30
34
|
* */
|
|
31
|
-
lazyLoad?: boolean
|
|
35
|
+
lazyLoad?: boolean;
|
|
32
36
|
/**
|
|
33
37
|
* @description 是否开启长按图片显示识别小程序码菜单,仅微信小程序有效 (默认 true )
|
|
34
38
|
* */
|
|
35
|
-
showMenuByLongPress?: boolean
|
|
39
|
+
showMenuByLongPress?: boolean;
|
|
36
40
|
/**
|
|
37
41
|
* @description 加载中的图标,或者小图片 (默认 'photo' )
|
|
38
42
|
* */
|
|
39
|
-
loadingIcon?: string
|
|
43
|
+
loadingIcon?: string;
|
|
40
44
|
/**
|
|
41
45
|
* @description 加载失败的图标,或者小图片 (默认 'error-circle' )
|
|
42
46
|
* */
|
|
43
|
-
errorIcon?: string
|
|
47
|
+
errorIcon?: string;
|
|
44
48
|
/**
|
|
45
49
|
* @description 是否显示加载中的图标或者自定义的slot (默认 true )
|
|
46
50
|
* */
|
|
47
|
-
showLoading?: boolean
|
|
51
|
+
showLoading?: boolean;
|
|
48
52
|
/**
|
|
49
53
|
* @description 是否显示加载错误的图标或者自定义的slot (默认 true )
|
|
50
54
|
* */
|
|
51
|
-
showError?: boolean
|
|
55
|
+
showError?: boolean;
|
|
52
56
|
/**
|
|
53
57
|
* @description 是否需要淡入效果 (默认 true )
|
|
54
58
|
* */
|
|
55
|
-
fade?: boolean
|
|
59
|
+
fade?: boolean;
|
|
56
60
|
/**
|
|
57
61
|
* @description 只支持网络资源,只对微信小程序有效 (默认 false )
|
|
58
62
|
* */
|
|
59
|
-
webp?: boolean
|
|
63
|
+
webp?: boolean;
|
|
60
64
|
/**
|
|
61
65
|
* @description 搭配fade参数的过渡时间,单位ms (默认 500 )
|
|
62
66
|
* */
|
|
63
|
-
duration?: number
|
|
67
|
+
duration?: number;
|
|
64
68
|
/**
|
|
65
69
|
* @description 背景颜色,用于深色页面加载图片时,为了和背景色融合 (默认 '#f3f4f6' )
|
|
66
70
|
* */
|
|
67
|
-
bgColor?: string
|
|
71
|
+
bgColor?: string;
|
|
68
72
|
/**
|
|
69
73
|
* @description 是否模糊图片 (默认 false )
|
|
70
74
|
* */
|
|
71
|
-
indistinct?: boolean
|
|
75
|
+
indistinct?: boolean;
|
|
72
76
|
/**
|
|
73
77
|
* @description 是否预览图片 (默认 false )
|
|
74
78
|
* */
|
|
75
|
-
previewImage?: boolean
|
|
79
|
+
previewImage?: boolean;
|
|
76
80
|
/**
|
|
77
81
|
* @description 定义需要用到的外部样式
|
|
78
82
|
* */
|
|
79
|
-
customStyle?: CSSProperties
|
|
83
|
+
customStyle?: CSSProperties;
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
export interface IImageEmits {
|
|
83
87
|
/** 点击触发 */
|
|
84
|
-
(e:
|
|
88
|
+
(e: "click"): void;
|
|
85
89
|
/** 图片加载错误触发 */
|
|
86
|
-
(e:
|
|
90
|
+
(e: "error", err: ImageOnErrorEvent): void;
|
|
87
91
|
/** 图片加载中触发 */
|
|
88
|
-
(e:
|
|
92
|
+
(e: "load", event: ImageOnLoadEvent): void;
|
|
89
93
|
}
|