hy-app 0.2.14 → 0.2.16
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/hy-action-sheet/hy-action-sheet.vue +81 -13
- package/components/hy-action-sheet/typing.d.ts +1 -3
- package/components/hy-address-picker/hy-address-picker.vue +109 -8
- package/components/hy-address-picker/index.scss +2 -2
- package/components/hy-address-picker/typing.d.ts +39 -30
- package/components/hy-avatar/hy-avatar.vue +78 -4
- package/components/hy-avatar/typing.d.ts +21 -16
- package/components/hy-back-top/hy-back-top.vue +86 -28
- package/components/hy-back-top/typing.d.ts +17 -12
- package/components/hy-badge/hy-badge.vue +114 -43
- package/components/hy-badge/typing.d.ts +20 -15
- package/components/hy-button/hy-button.vue +22 -40
- package/components/hy-calendar/hy-calendar.vue +290 -143
- package/components/hy-calendar/typing.d.ts +38 -31
- package/components/hy-card/hy-card.vue +139 -36
- package/components/hy-card/typing.d.ts +39 -28
- package/components/hy-cell/hy-cell.vue +131 -67
- package/components/hy-cell/typing.d.ts +6 -1
- package/components/hy-check-button/hy-check-button.vue +101 -32
- package/components/hy-check-button/typing.d.ts +26 -19
- package/components/hy-checkbox/hy-checkbox.vue +167 -78
- package/components/hy-checkbox/typing.d.ts +26 -19
- package/components/hy-code-input/hy-code-input.vue +101 -5
- package/components/hy-code-input/typing.d.ts +9 -0
- package/components/hy-config-provider/hy-config-provider.vue +44 -24
- package/components/hy-config-provider/typing.d.ts +0 -4
- package/components/hy-count-down/hy-count-down.vue +99 -62
- package/components/hy-count-down/typing.d.ts +18 -5
- package/components/hy-count-to/hy-count-to.vue +165 -113
- package/components/hy-count-to/typing.d.ts +15 -11
- package/components/hy-datetime-picker/hy-datetime-picker.vue +338 -232
- package/components/hy-datetime-picker/typing.d.ts +49 -39
- package/components/hy-divider/hy-divider.vue +128 -64
- package/components/hy-divider/typing.d.ts +16 -16
- package/components/hy-dropdown/hy-dropdown.vue +57 -19
- package/components/hy-dropdown/typing.d.ts +14 -14
- package/components/hy-dropdown-item/hy-dropdown-item.vue +34 -5
- package/components/hy-dropdown-item/typing.d.ts +13 -6
- package/components/hy-empty/hy-empty.vue +64 -6
- package/components/hy-empty/typing.d.ts +5 -0
- package/components/hy-float-button/hy-float-button.vue +117 -5
- package/components/hy-float-button/typing.d.ts +7 -0
- package/components/hy-folding-panel/hy-folding-panel.vue +87 -25
- package/components/hy-folding-panel/typing.d.ts +24 -15
- package/components/hy-grid/hy-grid.vue +95 -35
- package/components/hy-grid/typing.d.ts +24 -19
- package/components/hy-icon/hy-icon.vue +84 -6
- package/components/hy-icon/typing.d.ts +5 -0
- package/components/hy-image/hy-image.vue +105 -6
- package/components/hy-image/typing.d.ts +9 -0
- package/components/hy-input/hy-input.vue +277 -130
- package/components/hy-input/props.ts +13 -14
- package/components/hy-input/typing.d.ts +59 -38
- package/components/hy-line/hy-line.vue +65 -25
- package/components/hy-line-progress/hy-line-progress.vue +68 -35
- package/components/hy-list/hy-list.vue +127 -61
- package/components/hy-list/typing.d.ts +19 -12
- package/components/hy-loading/hy-loading.vue +79 -25
- package/components/hy-menu/hy-menu.vue +69 -45
- package/components/hy-menu/typing.d.ts +22 -15
- package/components/hy-modal/hy-modal.vue +91 -4
- package/components/hy-modal/typing.d.ts +11 -0
- package/components/hy-navbar/hy-navbar.vue +105 -25
- package/components/hy-navbar/typing.d.ts +25 -20
- package/components/hy-notice-bar/hy-notice-bar.vue +97 -19
- package/components/hy-notice-bar/typing.d.ts +22 -17
- package/components/hy-notify/hy-notify.vue +106 -54
- package/components/hy-number-step/hy-number-step.vue +211 -120
- package/components/hy-number-step/typing.d.ts +45 -28
- package/components/hy-overlay/hy-overlay.vue +60 -16
- package/components/hy-overlay/typing.d.ts +11 -6
- package/components/hy-pagination/hy-pagination.vue +94 -37
- package/components/hy-pagination/typing.d.ts +20 -11
- package/components/hy-picker/hy-picker.vue +225 -160
- package/components/hy-picker/typing.d.ts +51 -28
- package/components/hy-popover/hy-popover.vue +55 -7
- package/components/hy-popover/typing.d.ts +21 -1
- package/components/hy-popup/hy-popup.vue +164 -99
- package/components/hy-popup/typing.d.ts +11 -0
- package/components/hy-price/hy-price.vue +77 -30
- package/components/hy-price/typing.d.ts +10 -10
- package/components/hy-qrcode/hy-qrcode.vue +75 -5
- package/components/hy-qrcode/typing.d.ts +25 -16
- package/components/hy-radio/hy-radio.vue +169 -88
- package/components/hy-radio/typing.d.ts +29 -22
- package/components/hy-rate/hy-rate.vue +155 -104
- package/components/hy-rate/typing.d.ts +23 -16
- package/components/hy-read-more/hy-read-more.vue +83 -56
- package/components/hy-read-more/typing.d.ts +18 -11
- package/components/hy-scroll-list/hy-scroll-list.vue +69 -58
- package/components/hy-scroll-list/typing.d.ts +14 -7
- package/components/hy-search/hy-search.vue +168 -62
- package/components/hy-search/typing.d.ts +47 -26
- package/components/hy-signature/hy-signature.vue +354 -272
- package/components/hy-signature/typing.d.ts +65 -52
- package/components/hy-slider/hy-slider.vue +208 -160
- package/components/hy-slider/typing.d.ts +28 -17
- package/components/hy-steps/hy-steps.vue +125 -99
- package/components/hy-steps/typing.d.ts +21 -14
- package/components/hy-submit-bar/hy-submit-bar.vue +129 -48
- package/components/hy-submit-bar/typing.d.ts +30 -23
- package/components/hy-subsection/hy-subsection.vue +139 -96
- package/components/hy-subsection/typing.d.ts +23 -16
- package/components/hy-swipe-action/hy-swipe-action.vue +161 -135
- package/components/hy-swipe-action/typing.d.ts +26 -17
- package/components/hy-swiper/hy-swiper.vue +178 -73
- package/components/hy-swiper/typing.d.ts +37 -28
- package/components/hy-switch/hy-switch.vue +107 -60
- package/components/hy-switch/typing.d.ts +25 -18
- package/components/hy-tabs/hy-tabs.vue +170 -160
- package/components/hy-tabs/typing.d.ts +36 -22
- package/components/hy-tag/hy-tag.vue +133 -58
- package/components/hy-tag/typing.d.ts +26 -18
- package/components/hy-text/hy-text.vue +106 -6
- package/components/hy-text/typing.d.ts +31 -26
- package/components/hy-textarea/hy-textarea.vue +183 -89
- package/components/hy-textarea/typing.d.ts +41 -24
- package/components/hy-tooltip/hy-tooltip.vue +145 -101
- package/components/hy-tooltip/typing.d.ts +18 -13
- package/components/hy-transition/hy-transition.vue +48 -13
- package/components/hy-transition/typing.d.ts +17 -0
- package/components/hy-upload/hy-upload.vue +113 -148
- package/components/hy-upload/typing.d.ts +71 -71
- package/components/hy-warn/hy-warn.vue +79 -36
- package/components/hy-warn/typing.d.ts +18 -11
- package/components/hy-waterfall/hy-waterfall.vue +90 -77
- package/components/hy-watermark/hy-watermark.vue +82 -5
- package/components/hy-watermark/typing.d.ts +20 -20
- package/global.d.ts +39 -59
- package/package.json +4 -19
- package/utils/inspect.ts +3 -1
- package/web-types.json +1 -1
- package/compiler.ts +0 -108
- package/component-helper.ts +0 -179
- package/components.json +0 -3287
- package/docgen.config.js +0 -13
- package/web-types.config.js +0 -7
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
import type { CSSProperties } from
|
|
1
|
+
import type { CSSProperties } from 'vue'
|
|
2
2
|
|
|
3
3
|
export default interface HySignatureProps {
|
|
4
4
|
/**
|
|
5
5
|
* @description 签名笔颜色
|
|
6
6
|
* */
|
|
7
|
-
penColor?: string
|
|
7
|
+
penColor?: string
|
|
8
8
|
/**
|
|
9
9
|
* @description 签名笔宽度(默认 2 )
|
|
10
10
|
* */
|
|
11
|
-
lineWidth?: number
|
|
11
|
+
lineWidth?: number
|
|
12
12
|
/**
|
|
13
13
|
* @description 清空按钮的文本
|
|
14
14
|
* */
|
|
15
|
-
clearText?: string
|
|
15
|
+
clearText?: string
|
|
16
16
|
/**
|
|
17
17
|
* @description 撤回按钮的文本
|
|
18
18
|
* */
|
|
19
|
-
revokeText?: string
|
|
19
|
+
revokeText?: string
|
|
20
20
|
/**
|
|
21
21
|
* @description 恢复按钮的文本
|
|
22
22
|
* */
|
|
23
|
-
restoreText?: string
|
|
23
|
+
restoreText?: string
|
|
24
24
|
/**
|
|
25
25
|
* @description 确认按钮的文本
|
|
26
26
|
* */
|
|
27
|
-
confirmText?: string
|
|
27
|
+
confirmText?: string
|
|
28
28
|
/**
|
|
29
29
|
* @description 目标文件的类型(默认 png )
|
|
30
30
|
* */
|
|
31
|
-
fileType?: string
|
|
31
|
+
fileType?: string
|
|
32
32
|
/**
|
|
33
33
|
* @description 签名笔颜色
|
|
34
34
|
* */
|
|
35
|
-
quality?: number
|
|
35
|
+
quality?: number
|
|
36
36
|
/**
|
|
37
37
|
* @description 目标文件的质量(默认 1 )
|
|
38
38
|
* */
|
|
39
|
-
exportScale?: number
|
|
39
|
+
exportScale?: number
|
|
40
40
|
/**
|
|
41
41
|
* @description 是否禁用签名板(默认 false )
|
|
42
42
|
* */
|
|
43
|
-
disabled?: boolean
|
|
43
|
+
disabled?: boolean
|
|
44
44
|
/**
|
|
45
45
|
* @description 画布的高度
|
|
46
46
|
* */
|
|
47
|
-
height?: number
|
|
47
|
+
height?: number
|
|
48
48
|
/**
|
|
49
49
|
* @description 画布的宽度
|
|
50
50
|
* */
|
|
51
|
-
width?: number
|
|
51
|
+
width?: number
|
|
52
52
|
/**
|
|
53
53
|
* @description 边框圆角
|
|
54
54
|
* */
|
|
55
|
-
round?: string | number
|
|
55
|
+
round?: string | number
|
|
56
56
|
/**
|
|
57
57
|
* @description 画板的背景色
|
|
58
58
|
* */
|
|
59
|
-
backgroundColor?: string
|
|
59
|
+
backgroundColor?: string
|
|
60
60
|
/**
|
|
61
61
|
* @description 是否禁用画布滚动(默认 true )
|
|
62
62
|
* */
|
|
63
|
-
disableScroll?: boolean
|
|
63
|
+
disableScroll?: boolean
|
|
64
64
|
/**
|
|
65
65
|
* @description 是否开启历史记录(默认 false )
|
|
66
66
|
* */
|
|
67
|
-
enableHistory?: boolean
|
|
67
|
+
enableHistory?: boolean
|
|
68
68
|
/**
|
|
69
69
|
* @description 撤回和恢复的步长(默认 1 )
|
|
70
70
|
* */
|
|
71
|
-
step?: number
|
|
71
|
+
step?: number
|
|
72
72
|
/**
|
|
73
73
|
* @description 撤回按钮的文本(默认 撤销 )
|
|
74
74
|
* */
|
|
75
|
-
undoText?: string
|
|
75
|
+
undoText?: string
|
|
76
76
|
/**
|
|
77
77
|
* @description 恢复按钮的文本(默认 恢复 )
|
|
78
78
|
* */
|
|
79
|
-
redoText?: string
|
|
79
|
+
redoText?: string
|
|
80
80
|
/**
|
|
81
81
|
* @description 是否启用压感模式(默认 false )
|
|
82
82
|
* */
|
|
83
|
-
pressure?: boolean
|
|
83
|
+
pressure?: boolean
|
|
84
84
|
/**
|
|
85
85
|
* @description 压感模式下笔画最小宽度(默认 2 )
|
|
86
86
|
* */
|
|
87
|
-
minWidth?: number
|
|
87
|
+
minWidth?: number
|
|
88
88
|
/**
|
|
89
89
|
* @description 压感模式下笔画最大宽度(默认 6 )
|
|
90
90
|
* */
|
|
91
|
-
maxWidth?: number
|
|
91
|
+
maxWidth?: number
|
|
92
92
|
/**
|
|
93
93
|
* @description 最小速度阈值,影响压感模式下的笔画宽度变化(默认 1.5 )
|
|
94
94
|
* */
|
|
95
|
-
minSpeed?: number
|
|
95
|
+
minSpeed?: number
|
|
96
96
|
/**
|
|
97
97
|
* @description 定义需要用到的外部样式
|
|
98
98
|
* */
|
|
99
|
-
customStyle?: CSSProperties
|
|
99
|
+
customStyle?: CSSProperties
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/**
|
|
@@ -107,11 +107,11 @@ export default interface HySignatureProps {
|
|
|
107
107
|
* @property height - 生成图片的高度
|
|
108
108
|
*/
|
|
109
109
|
export type SignatureResult = {
|
|
110
|
-
tempFilePath: string
|
|
111
|
-
success: boolean
|
|
112
|
-
width: number
|
|
113
|
-
height: number
|
|
114
|
-
}
|
|
110
|
+
tempFilePath: string
|
|
111
|
+
success: boolean
|
|
112
|
+
width: number
|
|
113
|
+
height: number
|
|
114
|
+
}
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* 签名线条类型
|
|
@@ -122,11 +122,11 @@ export type SignatureResult = {
|
|
|
122
122
|
* @property isPressure - 是否为笔锋模式的线条 (可选)
|
|
123
123
|
*/
|
|
124
124
|
export interface Line {
|
|
125
|
-
points: Point[]
|
|
126
|
-
color: string
|
|
127
|
-
width: number
|
|
128
|
-
backgroundColor?: string
|
|
129
|
-
isPressure?: boolean
|
|
125
|
+
points: Point[]
|
|
126
|
+
color: string
|
|
127
|
+
width: number
|
|
128
|
+
backgroundColor?: string
|
|
129
|
+
isPressure?: boolean
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
/**
|
|
@@ -144,17 +144,17 @@ export interface Line {
|
|
|
144
144
|
* @property isFirstPoint - 是否为线条的第一个点 (可选)
|
|
145
145
|
*/
|
|
146
146
|
export interface Point {
|
|
147
|
-
x: number
|
|
148
|
-
y: number
|
|
149
|
-
t: number
|
|
150
|
-
speed?: number
|
|
151
|
-
distance?: number
|
|
152
|
-
lineWidth?: number
|
|
153
|
-
lastX1?: number
|
|
154
|
-
lastY1?: number
|
|
155
|
-
lastX2?: number
|
|
156
|
-
lastY2?: number
|
|
157
|
-
isFirstPoint?: boolean
|
|
147
|
+
x: number
|
|
148
|
+
y: number
|
|
149
|
+
t: number
|
|
150
|
+
speed?: number
|
|
151
|
+
distance?: number
|
|
152
|
+
lineWidth?: number
|
|
153
|
+
lastX1?: number
|
|
154
|
+
lastY1?: number
|
|
155
|
+
lastX2?: number
|
|
156
|
+
lastY2?: number
|
|
157
|
+
isFirstPoint?: boolean
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
/**
|
|
@@ -169,13 +169,26 @@ export type SignatureExpose = {
|
|
|
169
169
|
/** 初始化签名板
|
|
170
170
|
* @param forceUpdate - 是否强制更新
|
|
171
171
|
*/
|
|
172
|
-
init: (forceUpdate?: boolean) => void
|
|
172
|
+
init: (forceUpdate?: boolean) => void
|
|
173
173
|
/** 点击清除按钮清除签名 */
|
|
174
|
-
clear: () => void
|
|
174
|
+
clear: () => void
|
|
175
175
|
/** 点击确定按钮 */
|
|
176
|
-
confirm: () => void
|
|
176
|
+
confirm: () => void
|
|
177
177
|
/* 点击恢复 */
|
|
178
|
-
restore: () => void
|
|
178
|
+
restore: () => void
|
|
179
179
|
/* 点击撤回 */
|
|
180
|
-
revoke: () => void
|
|
181
|
-
}
|
|
180
|
+
revoke: () => void
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface ISignatureEmits {
|
|
184
|
+
/** 开始签名时触发 */
|
|
185
|
+
(e: 'start', event: TouchEvent): void
|
|
186
|
+
/** 结束签名时触发 */
|
|
187
|
+
(e: 'end', event: TouchEvent): void
|
|
188
|
+
/** 签名过程中触发 */
|
|
189
|
+
(e: 'signing', event: TouchEvent): void
|
|
190
|
+
/** 确认签名时触发 */
|
|
191
|
+
(e: 'confirm', result: SignatureResult): void
|
|
192
|
+
/** 清空签名时触发 */
|
|
193
|
+
(e: 'clear'): void
|
|
194
|
+
}
|