hy-app 0.6.4 → 0.6.6
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/attributes.json +1 -1
- package/components/hy-address-picker/hy-address-picker.vue +249 -249
- package/components/hy-address-picker/props.ts +103 -103
- package/components/hy-button/hy-button.vue +320 -289
- package/components/hy-button/props.ts +143 -143
- package/components/hy-button/typing.d.ts +43 -35
- package/components/hy-calendar/header.vue +58 -58
- package/components/hy-calendar/hy-calendar.vue +8 -6
- package/components/hy-calendar/month.vue +402 -402
- package/components/hy-calendar/props.ts +169 -169
- package/components/hy-calendar/typing.d.ts +47 -45
- package/components/hy-cell-item/hy-cell-item.vue +161 -161
- package/components/hy-cell-item/props.ts +59 -59
- package/components/hy-check-button/hy-check-button.vue +135 -135
- package/components/hy-code-input/hy-code-input.vue +231 -231
- package/components/hy-code-input/props.ts +90 -90
- package/components/hy-config-provider/hy-config-provider.vue +53 -53
- package/components/hy-config-provider/props.ts +30 -30
- package/components/hy-coupon/hy-coupon.vue +183 -183
- package/components/hy-coupon/props.ts +108 -108
- package/components/hy-datetime-picker/hy-datetime-picker.vue +41 -55
- package/components/hy-datetime-picker/props.ts +144 -144
- package/components/hy-datetime-picker/typing.d.ts +2 -0
- package/components/hy-divider/props.ts +83 -83
- package/components/hy-empty/icon.ts +72 -72
- package/components/hy-folding-panel/hy-folding-panel-group.vue +162 -162
- package/components/hy-form/hy-form.vue +220 -220
- package/components/hy-icon/hy-icon.vue +112 -112
- package/components/hy-index-bar/hy-index-bar.vue +185 -185
- package/components/hy-index-bar/index.scss +64 -64
- package/components/hy-index-bar/props.ts +94 -94
- package/components/hy-index-bar/typing.d.ts +36 -36
- package/components/hy-input/hy-input.vue +333 -333
- package/components/hy-input/props.ts +186 -186
- package/components/hy-modal/hy-modal.vue +211 -211
- package/components/hy-modal/props.ts +94 -94
- package/components/hy-modal/typing.d.ts +16 -16
- package/components/hy-notice-bar/hy-row-notice.vue +121 -121
- package/components/hy-notify/hy-notify.vue +174 -174
- package/components/hy-number-step/hy-number-step.vue +367 -367
- package/components/hy-overlay/hy-overlay.vue +61 -61
- package/components/hy-overlay/props.ts +38 -38
- package/components/hy-pagination/hy-pagination.vue +136 -136
- package/components/hy-pagination/props.ts +58 -58
- package/components/hy-parse/hy-parse.vue +550 -550
- package/components/hy-parse/node/node.vue +781 -781
- package/components/hy-parse/parser.js +1455 -1455
- package/components/hy-parse/props.ts +19 -19
- package/components/hy-parse/typing.d.ts +68 -68
- package/components/hy-picker/hy-picker.vue +435 -435
- package/components/hy-picker/props.ts +122 -122
- package/components/hy-picker/typing.d.ts +38 -38
- package/components/hy-qrcode/props.ts +72 -72
- package/components/hy-qrcode/qrcode.js.bak +1433 -1433
- package/components/hy-radio/props.ts +97 -97
- package/components/hy-read-more/props.ts +48 -48
- package/components/hy-search/props.ts +133 -133
- package/components/hy-signature/canvasHelper.ts +51 -51
- package/components/hy-signature/props.ts +121 -121
- package/components/hy-skeleton/hy-skeleton.vue +142 -142
- package/components/hy-skeleton/props.ts +46 -46
- package/components/hy-skeleton/typing.d.ts +31 -31
- package/components/hy-steps/hy-steps.vue +275 -275
- package/components/hy-steps/typing.d.ts +25 -25
- package/components/hy-swiper/hy-swiper.vue +3 -3
- package/components/hy-swiper/index.scss +5 -5
- package/components/hy-swiper/props.ts +0 -1
- package/components/hy-table/hy-table.vue +630 -630
- package/components/hy-table/props.ts +62 -62
- package/components/hy-table/typing.d.ts +29 -29
- package/components/hy-tabs/hy-tabs.vue +336 -335
- package/components/hy-tabs/props.ts +84 -77
- package/components/hy-tag/hy-tag.vue +173 -173
- package/components/hy-tag/props.ts +89 -89
- package/components/hy-text/hy-text.vue +237 -237
- package/components/hy-text/props.ts +115 -115
- package/components/hy-textarea/hy-textarea.vue +198 -198
- package/components/hy-toast/hy-toast.vue +200 -200
- package/components/hy-toast/props.ts +3 -3
- package/components/hy-transition/hy-transition.vue +157 -157
- package/components/hy-transition/props.ts +32 -32
- package/components/hy-upload/hy-upload.vue +384 -384
- package/components/hy-watermark/hy-watermark.vue +1058 -1058
- package/components/hy-watermark/props.ts +109 -109
- package/global.d.ts +94 -94
- package/libs/api/http.ts +119 -119
- package/libs/composables/index.ts +8 -8
- package/libs/composables/useMessage.ts +149 -149
- package/libs/composables/useToast.ts +45 -45
- package/libs/composables/useTranslate.ts +10 -10
- package/libs/css/_config.scss +5 -5
- package/libs/index.ts +8 -8
- package/libs/locale/index.ts +32 -32
- package/libs/locale/lang/en-US.ts +84 -84
- package/libs/locale/lang/zh-CN.ts +87 -87
- package/libs/typing/index.ts +2 -2
- package/libs/typing/modules/common.d.ts +139 -139
- package/libs/typing/modules/form.ts +176 -176
- package/libs/typing/modules/http.d.ts +19 -19
- package/libs/typing/modules/index.d.ts +12 -12
- package/libs/utils/inside.ts +340 -340
- package/libs/utils/inspect.ts +140 -140
- package/libs/utils/utils.ts +525 -525
- package/package.json +81 -81
- package/tags.json +1 -1
- package/web-types.json +1 -1
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
declare namespace HyApp {
|
|
2
|
-
/**
|
|
3
|
-
* @description dark:暗色、light:亮色
|
|
4
|
-
* */
|
|
5
|
-
type DarkModeType = 'dark' | 'light'
|
|
6
|
-
/**
|
|
7
|
-
* @description 主题类型 primary-默认,success-错误,warning-警告,error-错误,info-信息
|
|
8
|
-
* */
|
|
9
|
-
type ThemeType = 'primary' | 'success' | 'warning' | 'error' | 'info'
|
|
10
|
-
/**
|
|
11
|
-
* @description 大小
|
|
12
|
-
* */
|
|
13
|
-
type SizeType = 'small' | 'medium' | 'large'
|
|
14
|
-
/**
|
|
15
|
-
* @description 形状:circle-圆形,square-方块
|
|
16
|
-
* */
|
|
17
|
-
type ShapeType = 'circle' | 'square'
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description 形状:flex-start-开头排序,flex-start-结尾排序,space-between-两边靠边,space-around-两边留一半空隙,space-evenly-两边留一个空隙,center-居中
|
|
21
|
-
* */
|
|
22
|
-
type JustifyContentType =
|
|
23
|
-
| 'flex-start'
|
|
24
|
-
| 'flex-end'
|
|
25
|
-
| 'space-between'
|
|
26
|
-
| 'space-around'
|
|
27
|
-
| 'space-evenly'
|
|
28
|
-
| 'center'
|
|
29
|
-
/**
|
|
30
|
-
* @description 排列方式,row-横向,column-纵向
|
|
31
|
-
* */
|
|
32
|
-
type DirectionType = 'row' | 'column'
|
|
33
|
-
/**
|
|
34
|
-
* @description 布局方式;left-左,right-右,top-上,bottom-下,center-中
|
|
35
|
-
* */
|
|
36
|
-
type LayoutType = LeftRightType | TopBottomType | 'center'
|
|
37
|
-
/**
|
|
38
|
-
* @description 布局方式:left-左,right-右
|
|
39
|
-
* */
|
|
40
|
-
type LeftRightType = 'left' | 'right'
|
|
41
|
-
/**
|
|
42
|
-
* @description 布局方式:left-左,right-右,center-中间
|
|
43
|
-
* */
|
|
44
|
-
type RowCenterType = LeftRightType | 'center'
|
|
45
|
-
/**
|
|
46
|
-
* @description 布局方式:top-上,bottom-下,center-中间
|
|
47
|
-
* */
|
|
48
|
-
type ColumnCenterType = TopBottomType | 'center'
|
|
49
|
-
/**
|
|
50
|
-
* @description 布局方式:top-上,bottom-下
|
|
51
|
-
* */
|
|
52
|
-
type TopBottomType = 'top' | 'bottom'
|
|
53
|
-
/**
|
|
54
|
-
* @description 主题亮度:light-亮色,dark-暗色
|
|
55
|
-
* */
|
|
56
|
-
type ThemeVo = 'light' | 'dark'
|
|
57
|
-
/**
|
|
58
|
-
* @description 边框:surround-四周有边框,bottom-底部有边框,none-无边框
|
|
59
|
-
* */
|
|
60
|
-
type BorderType = 'surround' | 'bottom' | 'none'
|
|
61
|
-
/**
|
|
62
|
-
* @description 轮播图指示点样式:line-线形,dot-点
|
|
63
|
-
* */
|
|
64
|
-
type SwiperIndicatorModeType = 'line' | 'dot'
|
|
65
|
-
/**
|
|
66
|
-
* @description 输入框输入类型
|
|
67
|
-
* @desc test - 文本
|
|
68
|
-
* @desc idcard - 身份证id
|
|
69
|
-
* @desc number - 数字
|
|
70
|
-
* @desc digit - 数字输入框,不支持小数点和复数
|
|
71
|
-
* @desc password - 密码
|
|
72
|
-
* */
|
|
73
|
-
type InputType = 'text' | 'idcard' | 'number' | 'digit' | 'password'
|
|
74
|
-
/**
|
|
75
|
-
* @description 图片mode,详细见uniApp
|
|
76
|
-
* */
|
|
77
|
-
type ImageModeVo =
|
|
78
|
-
| 'scaleToFill'
|
|
79
|
-
| 'aspectFit'
|
|
80
|
-
| 'aspectFill'
|
|
81
|
-
| 'widthFix'
|
|
82
|
-
| 'heightFix'
|
|
83
|
-
| 'top'
|
|
84
|
-
| 'bottom'
|
|
85
|
-
| 'center'
|
|
86
|
-
| 'left'
|
|
87
|
-
| 'right'
|
|
88
|
-
| 'top left'
|
|
89
|
-
| 'top right'
|
|
90
|
-
| 'bottom left'
|
|
91
|
-
| 'bottom right'
|
|
92
|
-
/**
|
|
93
|
-
* @description 导航类型:
|
|
94
|
-
* */
|
|
95
|
-
type NavigationType = 'navigateTo' | 'redirectTo' | 'switchTab' | 'reLaunch'
|
|
96
|
-
/**
|
|
97
|
-
* @description 旋转方向
|
|
98
|
-
* */
|
|
99
|
-
type RotateType = 'left' | 'up' | 'down' | 'right'
|
|
100
|
-
/**
|
|
101
|
-
* @description 上传类型
|
|
102
|
-
* */
|
|
103
|
-
type FileType = 'video' | 'media' | 'all' | 'file' | 'image'
|
|
104
|
-
/**
|
|
105
|
-
* @description 加载模式:circle-圆圈,spinner-经典花,semicircle-半圆
|
|
106
|
-
* */
|
|
107
|
-
type LoadingMode = 'spinner' | 'circle' | 'semicircle'
|
|
108
|
-
/**
|
|
109
|
-
* @description 动画类型
|
|
110
|
-
* */
|
|
111
|
-
type TransitionMode =
|
|
112
|
-
| 'fade'
|
|
113
|
-
| 'fade-up'
|
|
114
|
-
| 'fade-down'
|
|
115
|
-
| 'fade-left'
|
|
116
|
-
| 'fade-right'
|
|
117
|
-
| 'fade-zoom'
|
|
118
|
-
| 'slide-up'
|
|
119
|
-
| 'slide-down'
|
|
120
|
-
| 'slide-left'
|
|
121
|
-
| 'slide-right'
|
|
122
|
-
| 'zoom-in'
|
|
123
|
-
| 'zoom-out'
|
|
124
|
-
/** label位置 */
|
|
125
|
-
type LabelPosition = 'left' | 'top'
|
|
126
|
-
interface IFieldNames {
|
|
127
|
-
/**
|
|
128
|
-
* @description 自定义columns的文本键
|
|
129
|
-
* */
|
|
130
|
-
name: string
|
|
131
|
-
/**
|
|
132
|
-
* @description 自定义columns的值键
|
|
133
|
-
* */
|
|
134
|
-
value: string
|
|
135
|
-
}
|
|
136
|
-
type FieldNamesType = {
|
|
137
|
-
[key in keyof IFieldNames as IFieldNames[key]]?: string | number | boolean
|
|
138
|
-
}
|
|
139
|
-
}
|
|
1
|
+
declare namespace HyApp {
|
|
2
|
+
/**
|
|
3
|
+
* @description dark:暗色、light:亮色
|
|
4
|
+
* */
|
|
5
|
+
type DarkModeType = 'dark' | 'light'
|
|
6
|
+
/**
|
|
7
|
+
* @description 主题类型 primary-默认,success-错误,warning-警告,error-错误,info-信息
|
|
8
|
+
* */
|
|
9
|
+
type ThemeType = 'primary' | 'success' | 'warning' | 'error' | 'info'
|
|
10
|
+
/**
|
|
11
|
+
* @description 大小
|
|
12
|
+
* */
|
|
13
|
+
type SizeType = 'small' | 'medium' | 'large'
|
|
14
|
+
/**
|
|
15
|
+
* @description 形状:circle-圆形,square-方块
|
|
16
|
+
* */
|
|
17
|
+
type ShapeType = 'circle' | 'square'
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description 形状:flex-start-开头排序,flex-start-结尾排序,space-between-两边靠边,space-around-两边留一半空隙,space-evenly-两边留一个空隙,center-居中
|
|
21
|
+
* */
|
|
22
|
+
type JustifyContentType =
|
|
23
|
+
| 'flex-start'
|
|
24
|
+
| 'flex-end'
|
|
25
|
+
| 'space-between'
|
|
26
|
+
| 'space-around'
|
|
27
|
+
| 'space-evenly'
|
|
28
|
+
| 'center'
|
|
29
|
+
/**
|
|
30
|
+
* @description 排列方式,row-横向,column-纵向
|
|
31
|
+
* */
|
|
32
|
+
type DirectionType = 'row' | 'column'
|
|
33
|
+
/**
|
|
34
|
+
* @description 布局方式;left-左,right-右,top-上,bottom-下,center-中
|
|
35
|
+
* */
|
|
36
|
+
type LayoutType = LeftRightType | TopBottomType | 'center'
|
|
37
|
+
/**
|
|
38
|
+
* @description 布局方式:left-左,right-右
|
|
39
|
+
* */
|
|
40
|
+
type LeftRightType = 'left' | 'right'
|
|
41
|
+
/**
|
|
42
|
+
* @description 布局方式:left-左,right-右,center-中间
|
|
43
|
+
* */
|
|
44
|
+
type RowCenterType = LeftRightType | 'center'
|
|
45
|
+
/**
|
|
46
|
+
* @description 布局方式:top-上,bottom-下,center-中间
|
|
47
|
+
* */
|
|
48
|
+
type ColumnCenterType = TopBottomType | 'center'
|
|
49
|
+
/**
|
|
50
|
+
* @description 布局方式:top-上,bottom-下
|
|
51
|
+
* */
|
|
52
|
+
type TopBottomType = 'top' | 'bottom'
|
|
53
|
+
/**
|
|
54
|
+
* @description 主题亮度:light-亮色,dark-暗色
|
|
55
|
+
* */
|
|
56
|
+
type ThemeVo = 'light' | 'dark'
|
|
57
|
+
/**
|
|
58
|
+
* @description 边框:surround-四周有边框,bottom-底部有边框,none-无边框
|
|
59
|
+
* */
|
|
60
|
+
type BorderType = 'surround' | 'bottom' | 'none'
|
|
61
|
+
/**
|
|
62
|
+
* @description 轮播图指示点样式:line-线形,dot-点
|
|
63
|
+
* */
|
|
64
|
+
type SwiperIndicatorModeType = 'line' | 'dot'
|
|
65
|
+
/**
|
|
66
|
+
* @description 输入框输入类型
|
|
67
|
+
* @desc test - 文本
|
|
68
|
+
* @desc idcard - 身份证id
|
|
69
|
+
* @desc number - 数字
|
|
70
|
+
* @desc digit - 数字输入框,不支持小数点和复数
|
|
71
|
+
* @desc password - 密码
|
|
72
|
+
* */
|
|
73
|
+
type InputType = 'text' | 'idcard' | 'number' | 'digit' | 'password'
|
|
74
|
+
/**
|
|
75
|
+
* @description 图片mode,详细见uniApp
|
|
76
|
+
* */
|
|
77
|
+
type ImageModeVo =
|
|
78
|
+
| 'scaleToFill'
|
|
79
|
+
| 'aspectFit'
|
|
80
|
+
| 'aspectFill'
|
|
81
|
+
| 'widthFix'
|
|
82
|
+
| 'heightFix'
|
|
83
|
+
| 'top'
|
|
84
|
+
| 'bottom'
|
|
85
|
+
| 'center'
|
|
86
|
+
| 'left'
|
|
87
|
+
| 'right'
|
|
88
|
+
| 'top left'
|
|
89
|
+
| 'top right'
|
|
90
|
+
| 'bottom left'
|
|
91
|
+
| 'bottom right'
|
|
92
|
+
/**
|
|
93
|
+
* @description 导航类型:
|
|
94
|
+
* */
|
|
95
|
+
type NavigationType = 'navigateTo' | 'redirectTo' | 'switchTab' | 'reLaunch'
|
|
96
|
+
/**
|
|
97
|
+
* @description 旋转方向
|
|
98
|
+
* */
|
|
99
|
+
type RotateType = 'left' | 'up' | 'down' | 'right'
|
|
100
|
+
/**
|
|
101
|
+
* @description 上传类型
|
|
102
|
+
* */
|
|
103
|
+
type FileType = 'video' | 'media' | 'all' | 'file' | 'image'
|
|
104
|
+
/**
|
|
105
|
+
* @description 加载模式:circle-圆圈,spinner-经典花,semicircle-半圆
|
|
106
|
+
* */
|
|
107
|
+
type LoadingMode = 'spinner' | 'circle' | 'semicircle'
|
|
108
|
+
/**
|
|
109
|
+
* @description 动画类型
|
|
110
|
+
* */
|
|
111
|
+
type TransitionMode =
|
|
112
|
+
| 'fade'
|
|
113
|
+
| 'fade-up'
|
|
114
|
+
| 'fade-down'
|
|
115
|
+
| 'fade-left'
|
|
116
|
+
| 'fade-right'
|
|
117
|
+
| 'fade-zoom'
|
|
118
|
+
| 'slide-up'
|
|
119
|
+
| 'slide-down'
|
|
120
|
+
| 'slide-left'
|
|
121
|
+
| 'slide-right'
|
|
122
|
+
| 'zoom-in'
|
|
123
|
+
| 'zoom-out'
|
|
124
|
+
/** label位置 */
|
|
125
|
+
type LabelPosition = 'left' | 'top'
|
|
126
|
+
interface IFieldNames {
|
|
127
|
+
/**
|
|
128
|
+
* @description 自定义columns的文本键
|
|
129
|
+
* */
|
|
130
|
+
name: string
|
|
131
|
+
/**
|
|
132
|
+
* @description 自定义columns的值键
|
|
133
|
+
* */
|
|
134
|
+
value: string
|
|
135
|
+
}
|
|
136
|
+
type FieldNamesType = {
|
|
137
|
+
[key in keyof IFieldNames as IFieldNames[key]]?: string | number | boolean
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -1,176 +1,176 @@
|
|
|
1
|
-
import type { DateModeEnum } from './enum'
|
|
2
|
-
import type { CheckboxColumnsVo } from '../../../components/hy-check-button/typing'
|
|
3
|
-
import type HyInputProps from '../../../components/hy-input/typing'
|
|
4
|
-
import type HyTextareaProps from '../../../components/hy-textarea/typing'
|
|
5
|
-
import type HySwitchProps from '../../../components/hy-switch/typing'
|
|
6
|
-
import type HyPickerProps from '../../../components/hy-picker/typing'
|
|
7
|
-
import type HyRadioProps from '../../../components/hy-radio/typing'
|
|
8
|
-
import type HyCheckButtonProps from '../../../components/hy-check-button/typing'
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 类型
|
|
12
|
-
* */
|
|
13
|
-
export enum FormTypeEnum {
|
|
14
|
-
/**
|
|
15
|
-
* 上传文件
|
|
16
|
-
* */
|
|
17
|
-
UPLOAD = 'upload',
|
|
18
|
-
/**
|
|
19
|
-
* 普通输入框
|
|
20
|
-
* */
|
|
21
|
-
TEXT = 'text',
|
|
22
|
-
/**
|
|
23
|
-
* 数字输入框,整数
|
|
24
|
-
* */
|
|
25
|
-
NUMBER = 'number',
|
|
26
|
-
/**
|
|
27
|
-
* 数字输入框,带有小数点
|
|
28
|
-
* */
|
|
29
|
-
DIGIT = 'digit',
|
|
30
|
-
/**
|
|
31
|
-
* 密码输入框
|
|
32
|
-
* */
|
|
33
|
-
PASSWORD = 'password',
|
|
34
|
-
/**
|
|
35
|
-
* 身份证id输入框
|
|
36
|
-
* */
|
|
37
|
-
ID_CARD = 'idcard',
|
|
38
|
-
/**
|
|
39
|
-
* 单选
|
|
40
|
-
* */
|
|
41
|
-
RADIO = 'radio',
|
|
42
|
-
/**
|
|
43
|
-
* 选择按钮(单选/多选)
|
|
44
|
-
* */
|
|
45
|
-
CHECK_BUTTON = 'checkButton',
|
|
46
|
-
/**
|
|
47
|
-
* 时间选择器
|
|
48
|
-
* */
|
|
49
|
-
DATE = 'date',
|
|
50
|
-
/**
|
|
51
|
-
* 选择器
|
|
52
|
-
* */
|
|
53
|
-
SELECT = 'select',
|
|
54
|
-
/**
|
|
55
|
-
* 地址选择器
|
|
56
|
-
* */
|
|
57
|
-
ADDRESS = 'address',
|
|
58
|
-
/**
|
|
59
|
-
* 开关
|
|
60
|
-
* */
|
|
61
|
-
SWITCH = 'switch',
|
|
62
|
-
/**
|
|
63
|
-
* 详情
|
|
64
|
-
* */
|
|
65
|
-
DETAIL = 'detail',
|
|
66
|
-
/**
|
|
67
|
-
* 文本域
|
|
68
|
-
* */
|
|
69
|
-
TEXTAREA = 'textarea',
|
|
70
|
-
/**
|
|
71
|
-
* 自定义
|
|
72
|
-
* */
|
|
73
|
-
CUSTOM = 'custom'
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface FormColumnsType {
|
|
77
|
-
/**
|
|
78
|
-
* 标题
|
|
79
|
-
* */
|
|
80
|
-
label: string
|
|
81
|
-
/**
|
|
82
|
-
* 字段
|
|
83
|
-
* */
|
|
84
|
-
field: string
|
|
85
|
-
/**
|
|
86
|
-
* 右固定
|
|
87
|
-
* */
|
|
88
|
-
right?: boolean
|
|
89
|
-
/**
|
|
90
|
-
* 表单类型
|
|
91
|
-
* */
|
|
92
|
-
type: FormTypeEnum
|
|
93
|
-
/**
|
|
94
|
-
* 文件最大上传数据
|
|
95
|
-
* */
|
|
96
|
-
maxCount?: number
|
|
97
|
-
/**
|
|
98
|
-
* 是否禁用
|
|
99
|
-
* */
|
|
100
|
-
disabled?: boolean
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* type = select时候必填
|
|
104
|
-
* */
|
|
105
|
-
select?: string[][] | { text: string; id: string }[][]
|
|
106
|
-
/**
|
|
107
|
-
* type = radio时候必填
|
|
108
|
-
* */
|
|
109
|
-
actions?: CheckboxColumnsVo[]
|
|
110
|
-
/**
|
|
111
|
-
* 输入框属性api集合
|
|
112
|
-
* */
|
|
113
|
-
input?: Partial<HyInputProps>
|
|
114
|
-
/**
|
|
115
|
-
* 文本域属性api集合
|
|
116
|
-
* */
|
|
117
|
-
textarea?: Partial<HyTextareaProps>
|
|
118
|
-
/**
|
|
119
|
-
* 开关属性api集合
|
|
120
|
-
* */
|
|
121
|
-
switchItem?: Partial<HySwitchProps>
|
|
122
|
-
/**
|
|
123
|
-
* 选择器属性api集合
|
|
124
|
-
* */
|
|
125
|
-
picker?: Partial<HyPickerProps>
|
|
126
|
-
/**
|
|
127
|
-
* 单选属性api集合
|
|
128
|
-
* */
|
|
129
|
-
radio?: Partial<HyRadioProps>
|
|
130
|
-
/**
|
|
131
|
-
* 选择按钮属性api集合
|
|
132
|
-
* */
|
|
133
|
-
checkButton?: Partial<HyCheckButtonProps>
|
|
134
|
-
/**
|
|
135
|
-
* 日期展示的格式
|
|
136
|
-
* */
|
|
137
|
-
mode?: DateModeEnum
|
|
138
|
-
/**
|
|
139
|
-
* 规则校验
|
|
140
|
-
* */
|
|
141
|
-
rules?: RulesVo | RulesVo[]
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface RulesVo {
|
|
145
|
-
/**
|
|
146
|
-
* 是否必填
|
|
147
|
-
* */
|
|
148
|
-
required?: boolean
|
|
149
|
-
/**
|
|
150
|
-
* 校验不通过时的提示信息
|
|
151
|
-
* */
|
|
152
|
-
message?: string
|
|
153
|
-
/**
|
|
154
|
-
* 表单事件校验
|
|
155
|
-
* */
|
|
156
|
-
trigger?: ('blur' | 'change')[]
|
|
157
|
-
/**
|
|
158
|
-
* 最小值
|
|
159
|
-
* */
|
|
160
|
-
min?: number
|
|
161
|
-
/**
|
|
162
|
-
* 最大值
|
|
163
|
-
* */
|
|
164
|
-
max?: number
|
|
165
|
-
/**
|
|
166
|
-
* 基础正则校验
|
|
167
|
-
* phone - 手机号校验
|
|
168
|
-
* email - 邮箱校验
|
|
169
|
-
* password - 复杂密码校验
|
|
170
|
-
* */
|
|
171
|
-
type?: 'phone' | 'email' | 'password'
|
|
172
|
-
/**
|
|
173
|
-
* 自定义校验规则
|
|
174
|
-
* */
|
|
175
|
-
validator?: (rule: any, value: string, callback?: Function) => boolean
|
|
176
|
-
}
|
|
1
|
+
import type { DateModeEnum } from './enum'
|
|
2
|
+
import type { CheckboxColumnsVo } from '../../../components/hy-check-button/typing'
|
|
3
|
+
import type HyInputProps from '../../../components/hy-input/typing'
|
|
4
|
+
import type HyTextareaProps from '../../../components/hy-textarea/typing'
|
|
5
|
+
import type HySwitchProps from '../../../components/hy-switch/typing'
|
|
6
|
+
import type HyPickerProps from '../../../components/hy-picker/typing'
|
|
7
|
+
import type HyRadioProps from '../../../components/hy-radio/typing'
|
|
8
|
+
import type HyCheckButtonProps from '../../../components/hy-check-button/typing'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 类型
|
|
12
|
+
* */
|
|
13
|
+
export enum FormTypeEnum {
|
|
14
|
+
/**
|
|
15
|
+
* 上传文件
|
|
16
|
+
* */
|
|
17
|
+
UPLOAD = 'upload',
|
|
18
|
+
/**
|
|
19
|
+
* 普通输入框
|
|
20
|
+
* */
|
|
21
|
+
TEXT = 'text',
|
|
22
|
+
/**
|
|
23
|
+
* 数字输入框,整数
|
|
24
|
+
* */
|
|
25
|
+
NUMBER = 'number',
|
|
26
|
+
/**
|
|
27
|
+
* 数字输入框,带有小数点
|
|
28
|
+
* */
|
|
29
|
+
DIGIT = 'digit',
|
|
30
|
+
/**
|
|
31
|
+
* 密码输入框
|
|
32
|
+
* */
|
|
33
|
+
PASSWORD = 'password',
|
|
34
|
+
/**
|
|
35
|
+
* 身份证id输入框
|
|
36
|
+
* */
|
|
37
|
+
ID_CARD = 'idcard',
|
|
38
|
+
/**
|
|
39
|
+
* 单选
|
|
40
|
+
* */
|
|
41
|
+
RADIO = 'radio',
|
|
42
|
+
/**
|
|
43
|
+
* 选择按钮(单选/多选)
|
|
44
|
+
* */
|
|
45
|
+
CHECK_BUTTON = 'checkButton',
|
|
46
|
+
/**
|
|
47
|
+
* 时间选择器
|
|
48
|
+
* */
|
|
49
|
+
DATE = 'date',
|
|
50
|
+
/**
|
|
51
|
+
* 选择器
|
|
52
|
+
* */
|
|
53
|
+
SELECT = 'select',
|
|
54
|
+
/**
|
|
55
|
+
* 地址选择器
|
|
56
|
+
* */
|
|
57
|
+
ADDRESS = 'address',
|
|
58
|
+
/**
|
|
59
|
+
* 开关
|
|
60
|
+
* */
|
|
61
|
+
SWITCH = 'switch',
|
|
62
|
+
/**
|
|
63
|
+
* 详情
|
|
64
|
+
* */
|
|
65
|
+
DETAIL = 'detail',
|
|
66
|
+
/**
|
|
67
|
+
* 文本域
|
|
68
|
+
* */
|
|
69
|
+
TEXTAREA = 'textarea',
|
|
70
|
+
/**
|
|
71
|
+
* 自定义
|
|
72
|
+
* */
|
|
73
|
+
CUSTOM = 'custom'
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface FormColumnsType {
|
|
77
|
+
/**
|
|
78
|
+
* 标题
|
|
79
|
+
* */
|
|
80
|
+
label: string
|
|
81
|
+
/**
|
|
82
|
+
* 字段
|
|
83
|
+
* */
|
|
84
|
+
field: string
|
|
85
|
+
/**
|
|
86
|
+
* 右固定
|
|
87
|
+
* */
|
|
88
|
+
right?: boolean
|
|
89
|
+
/**
|
|
90
|
+
* 表单类型
|
|
91
|
+
* */
|
|
92
|
+
type: FormTypeEnum
|
|
93
|
+
/**
|
|
94
|
+
* 文件最大上传数据
|
|
95
|
+
* */
|
|
96
|
+
maxCount?: number
|
|
97
|
+
/**
|
|
98
|
+
* 是否禁用
|
|
99
|
+
* */
|
|
100
|
+
disabled?: boolean
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* type = select时候必填
|
|
104
|
+
* */
|
|
105
|
+
select?: string[][] | { text: string; id: string }[][]
|
|
106
|
+
/**
|
|
107
|
+
* type = radio时候必填
|
|
108
|
+
* */
|
|
109
|
+
actions?: CheckboxColumnsVo[]
|
|
110
|
+
/**
|
|
111
|
+
* 输入框属性api集合
|
|
112
|
+
* */
|
|
113
|
+
input?: Partial<HyInputProps>
|
|
114
|
+
/**
|
|
115
|
+
* 文本域属性api集合
|
|
116
|
+
* */
|
|
117
|
+
textarea?: Partial<HyTextareaProps>
|
|
118
|
+
/**
|
|
119
|
+
* 开关属性api集合
|
|
120
|
+
* */
|
|
121
|
+
switchItem?: Partial<HySwitchProps>
|
|
122
|
+
/**
|
|
123
|
+
* 选择器属性api集合
|
|
124
|
+
* */
|
|
125
|
+
picker?: Partial<HyPickerProps>
|
|
126
|
+
/**
|
|
127
|
+
* 单选属性api集合
|
|
128
|
+
* */
|
|
129
|
+
radio?: Partial<HyRadioProps>
|
|
130
|
+
/**
|
|
131
|
+
* 选择按钮属性api集合
|
|
132
|
+
* */
|
|
133
|
+
checkButton?: Partial<HyCheckButtonProps>
|
|
134
|
+
/**
|
|
135
|
+
* 日期展示的格式
|
|
136
|
+
* */
|
|
137
|
+
mode?: DateModeEnum
|
|
138
|
+
/**
|
|
139
|
+
* 规则校验
|
|
140
|
+
* */
|
|
141
|
+
rules?: RulesVo | RulesVo[]
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface RulesVo {
|
|
145
|
+
/**
|
|
146
|
+
* 是否必填
|
|
147
|
+
* */
|
|
148
|
+
required?: boolean
|
|
149
|
+
/**
|
|
150
|
+
* 校验不通过时的提示信息
|
|
151
|
+
* */
|
|
152
|
+
message?: string
|
|
153
|
+
/**
|
|
154
|
+
* 表单事件校验
|
|
155
|
+
* */
|
|
156
|
+
trigger?: ('blur' | 'change')[]
|
|
157
|
+
/**
|
|
158
|
+
* 最小值
|
|
159
|
+
* */
|
|
160
|
+
min?: number
|
|
161
|
+
/**
|
|
162
|
+
* 最大值
|
|
163
|
+
* */
|
|
164
|
+
max?: number
|
|
165
|
+
/**
|
|
166
|
+
* 基础正则校验
|
|
167
|
+
* phone - 手机号校验
|
|
168
|
+
* email - 邮箱校验
|
|
169
|
+
* password - 复杂密码校验
|
|
170
|
+
* */
|
|
171
|
+
type?: 'phone' | 'email' | 'password'
|
|
172
|
+
/**
|
|
173
|
+
* 自定义校验规则
|
|
174
|
+
* */
|
|
175
|
+
validator?: (rule: any, value: string, callback?: Function) => boolean
|
|
176
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
declare namespace HyHttps {
|
|
2
|
-
interface HttpRequestConfig extends UniNamespace.RequestOptions {
|
|
3
|
-
/** 请求基地址 */
|
|
4
|
-
baseURL?: string
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
interface HttpResponse<T = any> {
|
|
8
|
-
config: HttpRequestConfig
|
|
9
|
-
statusCode: number
|
|
10
|
-
cookies: Array<string>
|
|
11
|
-
data: T
|
|
12
|
-
errMsg: string
|
|
13
|
-
header: AnyObject
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface HttpInterceptorManager<V, E = V> {
|
|
17
|
-
onFulfilled?: (config: V) => Promise<V> | V
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
declare namespace HyHttps {
|
|
2
|
+
interface HttpRequestConfig extends UniNamespace.RequestOptions {
|
|
3
|
+
/** 请求基地址 */
|
|
4
|
+
baseURL?: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface HttpResponse<T = any> {
|
|
8
|
+
config: HttpRequestConfig
|
|
9
|
+
statusCode: number
|
|
10
|
+
cookies: Array<string>
|
|
11
|
+
data: T
|
|
12
|
+
errMsg: string
|
|
13
|
+
header: AnyObject
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface HttpInterceptorManager<V, E = V> {
|
|
17
|
+
onFulfilled?: (config: V) => Promise<V> | V
|
|
18
|
+
}
|
|
19
|
+
}
|