hy-app 0.5.3 → 0.5.5
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/typing.d.ts +1 -63
- package/components/hy-address-picker/hy-address-picker.vue +7 -6
- package/components/hy-address-picker/typing.d.ts +0 -84
- package/components/hy-avatar/hy-avatar.vue +4 -3
- package/components/hy-avatar/typing.d.ts +0 -66
- package/components/hy-back-top/typing.d.ts +0 -47
- package/components/hy-badge/hy-badge.vue +3 -3
- package/components/hy-badge/index.scss +0 -1
- package/components/hy-badge/props.ts +6 -1
- package/components/hy-badge/typing.d.ts +0 -62
- package/components/hy-button/typing.d.ts +28 -162
- package/components/hy-calendar/hy-calendar.vue +2 -2
- package/components/hy-calendar/typing.d.ts +0 -128
- package/components/hy-card/hy-card.vue +12 -12
- package/components/hy-card/index.scss +17 -5
- package/components/hy-card/props.ts +1 -2
- package/components/hy-card/typing.d.ts +1 -114
- package/components/hy-cell/props.ts +1 -1
- package/components/hy-cell/typing.d.ts +0 -55
- package/components/hy-check-button/typing.d.ts +0 -43
- package/components/hy-checkbox/typing.d.ts +1 -73
- package/components/hy-checkbox-group/typing.d.ts +0 -65
- package/components/hy-code-input/typing.d.ts +0 -70
- package/components/hy-count-down/typing.d.ts +1 -20
- package/components/hy-count-to/typing.d.ts +0 -47
- package/components/hy-coupon/index.scss +7 -2
- package/components/hy-coupon/props.ts +7 -4
- package/components/hy-coupon/typing.d.ts +1 -134
- package/components/hy-datetime-picker/props.ts +1 -3
- package/components/hy-datetime-picker/typing.d.ts +0 -119
- package/components/hy-dropdown-item/typing.d.ts +12 -31
- package/components/hy-empty/typing.d.ts +1 -59
- package/components/hy-float-button/typing.d.ts +24 -113
- package/components/hy-folding-panel/props.ts +1 -1
- package/components/hy-folding-panel/typing.d.ts +0 -38
- package/components/hy-folding-panel-item/hy-folding-panel-item.vue +2 -3
- package/components/hy-folding-panel-item/typing.d.ts +14 -0
- package/components/hy-form/typing.d.ts +0 -27
- package/components/hy-form-item/hy-form-item.vue +7 -5
- package/components/hy-form-item/typing.d.ts +0 -19
- package/components/hy-grid/typing.d.ts +0 -43
- package/components/hy-icon/hy-icon.vue +3 -8
- package/components/hy-icon/typing.d.ts +0 -86
- package/components/hy-image/typing.d.ts +0 -80
- package/components/hy-input/typing.d.ts +0 -149
- package/components/hy-list/props.ts +1 -1
- package/components/hy-list/typing.d.ts +0 -51
- package/components/hy-menu/typing.d.ts +0 -35
- package/components/hy-modal/typing.d.ts +9 -84
- package/components/hy-navbar/typing.d.ts +0 -81
- package/components/hy-notice-bar/typing.d.ts +2 -65
- package/components/hy-number-step/typing.d.ts +0 -110
- package/components/hy-overlay/typing.d.ts +2 -27
- package/components/hy-pagination/typing.d.ts +6 -49
- package/components/hy-picker/typing.d.ts +27 -124
- package/components/hy-popover/typing.d.ts +25 -66
- package/components/hy-popup/hy-popup.vue +0 -1
- package/components/hy-popup/typing.d.ts +8 -77
- package/components/hy-price/typing.d.ts +0 -41
- package/components/hy-qrcode/hy-qrcode.vue +67 -2
- package/components/hy-qrcode/index.scss +3 -4
- package/components/hy-qrcode/typing.d.ts +0 -66
- package/components/hy-radio/typing.d.ts +1 -86
- package/components/hy-rate/typing.d.ts +0 -62
- package/components/hy-read-more/typing.d.ts +4 -49
- package/components/hy-scroll-list/typing.d.ts +4 -33
- package/components/hy-search/typing.d.ts +19 -120
- package/components/hy-signature/hy-signature.vue +25 -22
- package/components/hy-signature/index.scss +0 -4
- package/components/hy-signature/typing.d.ts +0 -101
- package/components/hy-slider/typing.d.ts +8 -77
- package/components/hy-steps/typing.d.ts +16 -60
- package/components/hy-submit-bar/typing.d.ts +0 -72
- package/components/hy-subsection/typing.d.ts +0 -49
- package/components/hy-swipe-action/index.ts +13 -22
- package/components/hy-swipe-action/typing.d.ts +1 -38
- package/components/hy-swiper/typing.d.ts +0 -101
- package/components/hy-switch/typing.d.ts +0 -62
- package/components/hy-tabbar/hy-tabbar.vue +137 -0
- package/components/{hy-tabBar → hy-tabbar}/index.scss +31 -31
- package/components/hy-tabbar/props.ts +59 -0
- package/components/hy-tabbar/typing.d.ts +21 -0
- package/components/hy-tabbar-group/hy-tabbar-group.vue +87 -0
- package/components/hy-tabbar-group/index.scss +57 -0
- package/components/hy-tabbar-group/props.ts +78 -0
- package/components/hy-tabbar-group/typing.ts +16 -0
- package/components/hy-tabbar-item/hy-tabbar-item.vue +103 -0
- package/components/hy-tabbar-item/index.scss +43 -0
- package/components/hy-tabbar-item/props.ts +24 -0
- package/components/hy-tabbar-item/typing.ts +10 -0
- package/components/hy-tabs/typing.d.ts +25 -92
- package/components/hy-tag/props.ts +8 -2
- package/components/hy-tag/typing.d.ts +9 -78
- package/components/hy-text/props.ts +8 -2
- package/components/hy-text/typing.d.ts +3 -100
- package/components/hy-textarea/props.ts +4 -1
- package/components/hy-textarea/typing.d.ts +0 -27
- package/components/hy-tooltip/props.ts +1 -4
- package/components/hy-tooltip/typing.d.ts +2 -55
- package/components/hy-transition/typing.d.ts +14 -43
- package/components/hy-upload/props.ts +1 -1
- package/components/hy-upload/typing.d.ts +56 -164
- package/components/hy-warn/typing.d.ts +4 -45
- package/components/index.ts +177 -177
- package/global.d.ts +87 -85
- package/package.json +2 -2
- package/web-types.json +1 -1
- package/components/hy-config-provider/typing.d.ts +0 -24
- package/components/hy-divider/typing.d.ts +0 -64
- package/components/hy-dropdown/typing.d.ts +0 -48
- package/components/hy-form-group/typing.d.ts +0 -0
- package/components/hy-line/typing.d.ts +0 -32
- package/components/hy-line-progress/typing.d.ts +0 -32
- package/components/hy-loading/typing.d.ts +0 -52
- package/components/hy-notify/typing.d.ts +0 -48
- package/components/hy-status-bar/typing.d.ts +0 -12
- package/components/hy-tabBar/hy-tabBar.vue +0 -109
- package/components/hy-tabBar/props.ts +0 -13
- package/components/hy-tabBar/typing.d.ts +0 -54
- package/components/hy-waterfall/typing.d.ts +0 -14
- package/components/hy-watermark/typing.d.ts +0 -76
|
@@ -1,53 +1,10 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyPaginationProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 当前页
|
|
6
|
-
*/
|
|
7
|
-
modelValue: number
|
|
8
|
-
/**
|
|
9
|
-
* @description 总页数,如果有total,则优先使用total计算页数
|
|
10
|
-
*/
|
|
11
|
-
totalPage?: number
|
|
12
|
-
/**
|
|
13
|
-
* @description 是否展示分页为Icon图标
|
|
14
|
-
*/
|
|
15
|
-
showIcon?: boolean
|
|
16
|
-
/**
|
|
17
|
-
* @desc 是否展示总条数
|
|
18
|
-
*/
|
|
19
|
-
showMessage?: boolean
|
|
20
|
-
/**
|
|
21
|
-
* @description 总条数
|
|
22
|
-
*/
|
|
23
|
-
total?: number
|
|
24
|
-
/**
|
|
25
|
-
* @description 每页条数
|
|
26
|
-
*/
|
|
27
|
-
pageSize?: number
|
|
28
|
-
/**
|
|
29
|
-
* @description 上一页文本
|
|
30
|
-
*/
|
|
31
|
-
prevText?: string
|
|
32
|
-
/**
|
|
33
|
-
* @description 下一页文本
|
|
34
|
-
*/
|
|
35
|
-
nextText?: string
|
|
36
|
-
/**
|
|
37
|
-
* @description 总页数只有一页时是否隐藏
|
|
38
|
-
*/
|
|
39
|
-
hideIfOnePage?: boolean
|
|
40
|
-
/**
|
|
41
|
-
* @description 定义需要用到的外部样式
|
|
42
|
-
* */
|
|
43
|
-
customStyle?: CSSProperties
|
|
44
|
-
}
|
|
45
1
|
type PaginationVo = {
|
|
46
|
-
|
|
2
|
+
value: number
|
|
47
3
|
}
|
|
4
|
+
|
|
48
5
|
export interface IPaginationEmits {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
6
|
+
/** 改变值触发 */
|
|
7
|
+
(e: 'change', param: PaginationVo): void
|
|
8
|
+
/** 改变值触发 */
|
|
9
|
+
(e: 'update:modelValue', value: PaginationVo['value']): void
|
|
53
10
|
}
|
|
@@ -1,131 +1,34 @@
|
|
|
1
|
-
import type { CSSProperties } from "vue";
|
|
2
|
-
import type HyInputProps from "../hy-input/typing";
|
|
3
|
-
|
|
4
1
|
export interface PickerColumnVo extends AnyObject {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @description id必填
|
|
4
|
+
* */
|
|
5
|
+
id: string
|
|
6
|
+
/**
|
|
7
|
+
* @description 显示文本
|
|
8
|
+
* */
|
|
9
|
+
text?: string
|
|
13
10
|
}
|
|
14
11
|
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* */
|
|
23
|
-
columns: (string | PickerColumnVo)[][];
|
|
24
|
-
/**
|
|
25
|
-
* @description 是否显示弹窗(默认 false )
|
|
26
|
-
* */
|
|
27
|
-
show?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* @description 弹窗弹出模式
|
|
30
|
-
* */
|
|
31
|
-
popupMode?: HyApp.LayoutType;
|
|
32
|
-
/**
|
|
33
|
-
* @description 分割数组条件
|
|
34
|
-
* */
|
|
35
|
-
separator?: string;
|
|
36
|
-
/**
|
|
37
|
-
* @description 是否显示顶部的操作栏(默认 true )
|
|
38
|
-
* */
|
|
39
|
-
showToolbar?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* @description 顶部标题
|
|
42
|
-
* */
|
|
43
|
-
title?: string;
|
|
44
|
-
/**
|
|
45
|
-
* @description 是否显示加载中状态(默认 false )
|
|
46
|
-
* */
|
|
47
|
-
loading?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* @description 各列中,单个选项的高度(默认 44 )
|
|
50
|
-
* */
|
|
51
|
-
itemHeight?: number;
|
|
52
|
-
/**
|
|
53
|
-
* @description 取消按钮的文字(默认 '取消' )
|
|
54
|
-
* */
|
|
55
|
-
cancelText?: string;
|
|
56
|
-
/**
|
|
57
|
-
* @description 确认按钮的文字(默认 '确定' )
|
|
58
|
-
* */
|
|
59
|
-
confirmText?: string;
|
|
60
|
-
/**
|
|
61
|
-
* @description 取消按钮的颜色(默认 '#909193' )
|
|
62
|
-
* */
|
|
63
|
-
cancelColor?: string;
|
|
64
|
-
/**
|
|
65
|
-
* @description 确认按钮的颜色(默认 '#3c9cff' )
|
|
66
|
-
* */
|
|
67
|
-
confirmColor?: string;
|
|
68
|
-
/**
|
|
69
|
-
* @description 每列中可见选项的数量(默认 5 )
|
|
70
|
-
* */
|
|
71
|
-
visibleItemCount?: number;
|
|
72
|
-
/**
|
|
73
|
-
* @description 选项对象中,需要展示的属性键名(默认 'text' )
|
|
74
|
-
* */
|
|
75
|
-
keyName?: string;
|
|
76
|
-
/**
|
|
77
|
-
* @description 是否允许点击遮罩关闭选择器(默认 false )
|
|
78
|
-
* */
|
|
79
|
-
closeOnClickOverlay?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* @description 各列的默认索引
|
|
82
|
-
* */
|
|
83
|
-
defaultIndex?: number[];
|
|
84
|
-
/**
|
|
85
|
-
* @description 是否在手指松开时立即触发change事件(默认 true )
|
|
86
|
-
* */
|
|
87
|
-
immediateChange?: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* @description 最高层级
|
|
90
|
-
* */
|
|
91
|
-
zIndex?: number;
|
|
92
|
-
/**
|
|
93
|
-
* @description 是否显示输入框(默认 false )
|
|
94
|
-
* */
|
|
95
|
-
hasInput?: boolean;
|
|
96
|
-
/**
|
|
97
|
-
* @description 输入框集合属性
|
|
98
|
-
* */
|
|
99
|
-
input?: Partial<HyInputProps>;
|
|
100
|
-
/**
|
|
101
|
-
* @description 是否自定义选择器nav左边内容
|
|
102
|
-
* */
|
|
103
|
-
toolbarRightSlot?: boolean;
|
|
104
|
-
/**
|
|
105
|
-
* @description 自定义输入框外部样式
|
|
106
|
-
* */
|
|
107
|
-
customStyle?: CSSProperties;
|
|
12
|
+
export type SelectValueVo = {
|
|
13
|
+
value: string[]
|
|
14
|
+
index?: number
|
|
15
|
+
indexs?: number[]
|
|
16
|
+
// values为当前变化列的数组内容
|
|
17
|
+
values?: Array<any>
|
|
18
|
+
columnIndex?: number
|
|
108
19
|
}
|
|
109
20
|
|
|
110
|
-
export type SelectValueVo = {
|
|
111
|
-
value: string[];
|
|
112
|
-
index?: number;
|
|
113
|
-
indexs?: number[];
|
|
114
|
-
// values为当前变化列的数组内容
|
|
115
|
-
values?: Array<any>;
|
|
116
|
-
columnIndex?: number;
|
|
117
|
-
};
|
|
118
21
|
export interface IPickerEmits {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
22
|
+
/** 关闭选择器时触发 */
|
|
23
|
+
(e: 'close'): void
|
|
24
|
+
/** 点击取消按钮 */
|
|
25
|
+
(e: 'cancel'): void
|
|
26
|
+
/** 点击确定按钮,返回当前选择的值 */
|
|
27
|
+
(e: 'confirm', params: SelectValueVo): void
|
|
28
|
+
/** 当选择值变化时触发 */
|
|
29
|
+
(e: 'change', params: SelectValueVo): void
|
|
30
|
+
/** 显示隐藏触发 */
|
|
31
|
+
(e: 'update:show', show: boolean): void
|
|
32
|
+
/** 选中值触发 */
|
|
33
|
+
(e: 'update:modelValue', value: any): void
|
|
131
34
|
}
|
|
@@ -1,80 +1,39 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
1
|
export type IPlacementVo =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
| 'top'
|
|
3
|
+
| 'top-start'
|
|
4
|
+
| 'top-end'
|
|
5
|
+
| 'bottom'
|
|
6
|
+
| 'bottom-start'
|
|
7
|
+
| 'bottom-end'
|
|
8
|
+
| 'left'
|
|
9
|
+
| 'left-start'
|
|
10
|
+
| 'left-end'
|
|
11
|
+
| 'right'
|
|
12
|
+
| 'right-start'
|
|
13
|
+
| 'right-end'
|
|
16
14
|
export type IOffset = number | number[] | Record<'x' | 'y', number>
|
|
17
15
|
|
|
18
16
|
export type PopoverExpose = {
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
open: () => void
|
|
18
|
+
close: () => void
|
|
21
19
|
}
|
|
22
20
|
export interface PopoverContentVo {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default interface HyOverlayProps {
|
|
29
|
-
/**
|
|
30
|
-
* @description 控制 popover 的显示状态
|
|
31
|
-
* */
|
|
32
|
-
modelValue?: boolean
|
|
33
|
-
/**
|
|
34
|
-
* @description 显示的内容,也可以通过 slot#content 传入
|
|
35
|
-
*/
|
|
36
|
-
content?: string | (string | PopoverContentVo)[]
|
|
37
|
-
/**
|
|
38
|
-
* @description 指定 popover 的放置位置:top / top-start / top-end / bottom / bottom-start / bottom-end / left / left-start / left-end / right / right-start / right-end
|
|
39
|
-
*/
|
|
40
|
-
placement?: IPlacementVo
|
|
41
|
-
/**
|
|
42
|
-
* @description 控制 popover 的显示状态
|
|
43
|
-
*/
|
|
44
|
-
offset?: IOffset
|
|
45
|
-
/**
|
|
46
|
-
* @description 是否禁用 popover
|
|
47
|
-
*/
|
|
48
|
-
disabled?: boolean
|
|
49
|
-
/**
|
|
50
|
-
* @description 是否显示关闭按钮
|
|
51
|
-
*/
|
|
52
|
-
showClose?: boolean
|
|
53
|
-
/**
|
|
54
|
-
* 当前显示的模式,决定内容的展现形式,可选值:normal(普通模式)/ menu(菜单模式)
|
|
55
|
-
*/
|
|
56
|
-
mode?: 'normal' | 'menu'
|
|
57
|
-
/**
|
|
58
|
-
* @description 定义需要用到的外部样式
|
|
59
|
-
* */
|
|
60
|
-
customStyle?: CSSProperties
|
|
61
|
-
/**
|
|
62
|
-
* @description 定义需要用到的类名
|
|
63
|
-
* */
|
|
64
|
-
customClass?: string
|
|
21
|
+
iconClass: string
|
|
22
|
+
content: string
|
|
23
|
+
icon: string
|
|
65
24
|
}
|
|
66
25
|
|
|
67
26
|
export type PopoverParamsVo = {
|
|
68
|
-
|
|
27
|
+
show: boolean
|
|
69
28
|
}
|
|
70
29
|
export type PopoverItemParamsVo = {
|
|
71
|
-
|
|
72
|
-
|
|
30
|
+
item: Record<string, any>
|
|
31
|
+
index: number
|
|
73
32
|
}
|
|
74
33
|
export interface IPopoverEmits {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
34
|
+
(e: 'menuClick', params: PopoverItemParamsVo): void
|
|
35
|
+
(e: 'change', params: PopoverParamsVo): void
|
|
36
|
+
(e: 'open'): void
|
|
37
|
+
(e: 'close'): void
|
|
38
|
+
(e: 'update:modelValue', value: boolean): void
|
|
80
39
|
}
|
|
@@ -1,79 +1,10 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyPopupProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 是否展示弹窗 (默认 false )
|
|
6
|
-
* */
|
|
7
|
-
show: boolean
|
|
8
|
-
/**
|
|
9
|
-
* @description 是否显示遮罩 (默认 true )
|
|
10
|
-
* */
|
|
11
|
-
overlay?: boolean
|
|
12
|
-
/**
|
|
13
|
-
* @description 弹出方向(默认 'bottom' )
|
|
14
|
-
* */
|
|
15
|
-
mode?: HyApp.LayoutType
|
|
16
|
-
/**
|
|
17
|
-
* @description 动画时长,单位ms (默认 300 )
|
|
18
|
-
* */
|
|
19
|
-
duration?: number
|
|
20
|
-
/**
|
|
21
|
-
* @description 是否显示关闭图标(默认 false )
|
|
22
|
-
* */
|
|
23
|
-
closeable?: boolean
|
|
24
|
-
/**
|
|
25
|
-
* @description 自定义遮罩的样式
|
|
26
|
-
* */
|
|
27
|
-
overlayStyle?: CSSProperties
|
|
28
|
-
/**
|
|
29
|
-
* @description 遮罩透明度,0-1之间(默认 0.5)
|
|
30
|
-
* */
|
|
31
|
-
overlayOpacity?: number
|
|
32
|
-
/**
|
|
33
|
-
* @description 点击遮罩是否关闭弹窗 (默认 true )
|
|
34
|
-
* */
|
|
35
|
-
closeOnClickOverlay?: boolean
|
|
36
|
-
/**
|
|
37
|
-
* @description 层级 (默认 10075 )
|
|
38
|
-
* */
|
|
39
|
-
zIndex?: number
|
|
40
|
-
/**
|
|
41
|
-
* @description 是否为iPhoneX留出底部安全距离 (默认 true )
|
|
42
|
-
* */
|
|
43
|
-
safeAreaInsetBottom?: boolean
|
|
44
|
-
/**
|
|
45
|
-
* @description 是否留出顶部安全距离(状态栏高度) (默认 false )
|
|
46
|
-
* */
|
|
47
|
-
safeAreaInsetTop?: boolean
|
|
48
|
-
/**
|
|
49
|
-
* @description 自定义关闭图标位置(默认 'top-right' )
|
|
50
|
-
* */
|
|
51
|
-
closeIconPos?: 'top-left' | 'top-right'
|
|
52
|
-
/**
|
|
53
|
-
* @description 圆角值(默认 0)
|
|
54
|
-
* */
|
|
55
|
-
round?: string | number
|
|
56
|
-
/**
|
|
57
|
-
* @description 当mode=center时 是否开启缩放(默认 true )
|
|
58
|
-
* */
|
|
59
|
-
zoom?: boolean
|
|
60
|
-
/**
|
|
61
|
-
* @description 背景颜色
|
|
62
|
-
* */
|
|
63
|
-
bgColor?: string
|
|
64
|
-
/**
|
|
65
|
-
* @description 自定义样式
|
|
66
|
-
* */
|
|
67
|
-
customStyle?: CSSProperties
|
|
68
|
-
}
|
|
69
|
-
|
|
70
1
|
export interface IPopupEmits {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
2
|
+
/** 弹出层打开触发 */
|
|
3
|
+
(e: 'open'): void
|
|
4
|
+
/** 弹出层关闭触发 */
|
|
5
|
+
(e: 'close'): void
|
|
6
|
+
/** 弹出层点击触发 */
|
|
7
|
+
(e: 'click'): void
|
|
8
|
+
/** 显示隐藏触发 */
|
|
9
|
+
(e: 'update:show', visible: boolean): void
|
|
79
10
|
}
|
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyPriceProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 传入金额值
|
|
6
|
-
* */
|
|
7
|
-
text: string | number
|
|
8
|
-
/**
|
|
9
|
-
* @description 金额符号(默认:¥)
|
|
10
|
-
* */
|
|
11
|
-
symbol?: string
|
|
12
|
-
/**
|
|
13
|
-
* @description 比例大小(默认:1.4)
|
|
14
|
-
* */
|
|
15
|
-
ratio?: number
|
|
16
|
-
/**
|
|
17
|
-
* @description 保留小数点后几位数(默认:2)
|
|
18
|
-
* */
|
|
19
|
-
num?: number
|
|
20
|
-
/**
|
|
21
|
-
* @description 字体颜色(默认:#FE3232)
|
|
22
|
-
* */
|
|
23
|
-
color?: string
|
|
24
|
-
/**
|
|
25
|
-
* @description 字体大小(默认:12)
|
|
26
|
-
* */
|
|
27
|
-
size?: string | number
|
|
28
|
-
/**
|
|
29
|
-
* @description 字体粗细(默认:500)
|
|
30
|
-
* */
|
|
31
|
-
weight?: number
|
|
32
|
-
/**
|
|
33
|
-
* @description 是否倾斜(默认:false)
|
|
34
|
-
* */
|
|
35
|
-
slant?: boolean
|
|
36
|
-
/**
|
|
37
|
-
* @description 自定义样式
|
|
38
|
-
* */
|
|
39
|
-
customStyle?: CSSProperties
|
|
40
|
-
}
|
|
41
|
-
|
|
42
1
|
export interface IPriceEmits {
|
|
43
2
|
/** 点击事件 */
|
|
44
3
|
(e: 'click', text: string | number): void
|
|
@@ -37,7 +37,6 @@ import { getCurrentInstance, ref, watch, nextTick } from 'vue'
|
|
|
37
37
|
import type { IQrcodeEmits } from './typing'
|
|
38
38
|
import QRCode from './qrcode.js'
|
|
39
39
|
import { addUnit, error } from '../../libs'
|
|
40
|
-
import qrCodeProps from './props'
|
|
41
40
|
// 组件
|
|
42
41
|
import HyLoading from '../hy-loading/hy-loading.vue'
|
|
43
42
|
import HyImage from '../hy-image/hy-image.vue'
|
|
@@ -48,7 +47,73 @@ import HyImage from '../hy-image/hy-image.vue'
|
|
|
48
47
|
*/
|
|
49
48
|
defineOptions({})
|
|
50
49
|
|
|
51
|
-
const props = defineProps(
|
|
50
|
+
// const props = withDefaults(defineProps<IProps>(), defaultProps)
|
|
51
|
+
const props = defineProps({
|
|
52
|
+
/** 实例ID字符串(如果有多个二维码组件必须设置不一样的cid) */
|
|
53
|
+
cid: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: 'hy-qrcode-canvas' + Math.random().toString()
|
|
56
|
+
},
|
|
57
|
+
/** 二维码大小 */
|
|
58
|
+
size: {
|
|
59
|
+
type: Number,
|
|
60
|
+
default: 200
|
|
61
|
+
},
|
|
62
|
+
/** 二维码内容 */
|
|
63
|
+
text: String,
|
|
64
|
+
/** 是否显示二维码 */
|
|
65
|
+
show: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: true
|
|
68
|
+
},
|
|
69
|
+
/** 二维码背景色 */
|
|
70
|
+
background: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: '#ffffff'
|
|
73
|
+
},
|
|
74
|
+
/** 二维码颜色 */
|
|
75
|
+
foreground: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: '#000000'
|
|
78
|
+
},
|
|
79
|
+
/** 定位角点颜色 */
|
|
80
|
+
pdGround: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: '#000000'
|
|
83
|
+
},
|
|
84
|
+
/** 是否是自定义组件 */
|
|
85
|
+
usingComponents: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: true
|
|
88
|
+
},
|
|
89
|
+
/** 容错级别 */
|
|
90
|
+
lv: {
|
|
91
|
+
type: Number,
|
|
92
|
+
default: 3
|
|
93
|
+
},
|
|
94
|
+
/** 二维码中间图标 */
|
|
95
|
+
icon: String,
|
|
96
|
+
/** 二维码中间图标大小 */
|
|
97
|
+
iconSize: {
|
|
98
|
+
type: Number,
|
|
99
|
+
default: 40
|
|
100
|
+
},
|
|
101
|
+
/** 显示加载状态 */
|
|
102
|
+
showLoading: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: true
|
|
105
|
+
},
|
|
106
|
+
/** 加载中提示语 */
|
|
107
|
+
loadingText: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: '二维码生成中...'
|
|
110
|
+
},
|
|
111
|
+
/** 是否预览 */
|
|
112
|
+
allowPreview: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: false
|
|
115
|
+
}
|
|
116
|
+
})
|
|
52
117
|
const emit = defineEmits<IQrcodeEmits>()
|
|
53
118
|
|
|
54
119
|
const instance = getCurrentInstance()
|
|
@@ -1,69 +1,3 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyQrcodeProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 实例ID字符串(如果有多个二维码组件必须设置不一样的cid)
|
|
6
|
-
* */
|
|
7
|
-
cid?: string
|
|
8
|
-
/**
|
|
9
|
-
* @description 二维码大小
|
|
10
|
-
* */
|
|
11
|
-
size?: string | number
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @description 二维码内容
|
|
15
|
-
* */
|
|
16
|
-
text: string
|
|
17
|
-
/**
|
|
18
|
-
* @description 是否显示二维码
|
|
19
|
-
* */
|
|
20
|
-
show?: boolean
|
|
21
|
-
/**
|
|
22
|
-
* @description 二维码背景色
|
|
23
|
-
* */
|
|
24
|
-
background?: string
|
|
25
|
-
/**
|
|
26
|
-
* @description 二维码颜色
|
|
27
|
-
* */
|
|
28
|
-
foreground?: string
|
|
29
|
-
/**
|
|
30
|
-
* @description 定位角点颜色
|
|
31
|
-
* */
|
|
32
|
-
pdGround?: string
|
|
33
|
-
/**
|
|
34
|
-
* @description 容错级别
|
|
35
|
-
* */
|
|
36
|
-
lv?: number
|
|
37
|
-
/**
|
|
38
|
-
* @description 是否是自定义组件
|
|
39
|
-
* */
|
|
40
|
-
usingComponents?: boolean
|
|
41
|
-
/**
|
|
42
|
-
* @description 二维码中间图标
|
|
43
|
-
* */
|
|
44
|
-
icon?: string
|
|
45
|
-
/**
|
|
46
|
-
* @description 二维码中间图标大小
|
|
47
|
-
* */
|
|
48
|
-
iconSize?: string | number
|
|
49
|
-
/**
|
|
50
|
-
* @description 显示加载状态
|
|
51
|
-
* */
|
|
52
|
-
showLoading?: boolean
|
|
53
|
-
/**
|
|
54
|
-
* @description 加载中提示语
|
|
55
|
-
* */
|
|
56
|
-
loadingText?: string
|
|
57
|
-
/**
|
|
58
|
-
* @description 是否预览
|
|
59
|
-
* */
|
|
60
|
-
allowPreview?: boolean
|
|
61
|
-
/**
|
|
62
|
-
* @description 定义需要用到的外部样式
|
|
63
|
-
* */
|
|
64
|
-
customStyle?: CSSProperties
|
|
65
|
-
}
|
|
66
|
-
|
|
67
1
|
export interface IQrcodeEmits {
|
|
68
2
|
/** 二维码生成成功 */
|
|
69
3
|
(e: 'result', res: any): void
|