hy-app 0.4.13 → 0.5.0
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 +155 -238
- package/components/hy-action-sheet/props.ts +68 -15
- package/components/hy-action-sheet/typing.d.ts +115 -115
- package/components/hy-address-picker/hy-address-picker.vue +185 -289
- package/components/hy-address-picker/props.ts +97 -21
- package/components/hy-address-picker/typing.d.ts +90 -89
- package/components/hy-avatar/hy-avatar.vue +121 -204
- package/components/hy-avatar/props.ts +76 -18
- package/components/hy-avatar/typing.d.ts +63 -62
- package/components/hy-back-top/hy-back-top.vue +65 -120
- package/components/hy-back-top/props.ts +57 -16
- package/components/hy-back-top/typing.d.ts +43 -42
- package/components/hy-badge/hy-badge.vue +66 -138
- package/components/hy-badge/props.ts +73 -17
- package/components/hy-badge/typing.d.ts +59 -58
- package/components/hy-button/hy-button.vue +226 -375
- package/components/hy-button/props.ts +129 -158
- package/components/hy-calendar/header.vue +48 -64
- package/components/hy-calendar/hy-calendar.vue +274 -438
- package/components/hy-calendar/month.vue +508 -516
- package/components/hy-calendar/props.ts +157 -35
- package/components/hy-calendar/typing.d.ts +129 -128
- package/components/hy-card/hy-card.vue +118 -240
- package/components/hy-card/index.scss +1 -2
- package/components/hy-card/props.ts +122 -27
- package/components/hy-card/typing.d.ts +119 -118
- package/components/hy-cell/hy-cell.vue +176 -258
- package/components/hy-cell/props.ts +71 -17
- package/components/hy-cell/typing.d.ts +87 -86
- package/components/hy-check-button/hy-check-button.vue +69 -139
- package/components/hy-check-button/props.ts +72 -18
- package/components/hy-check-button/typing.d.ts +74 -73
- package/components/hy-checkbox/hy-checkbox.vue +170 -263
- package/components/hy-checkbox/props.ts +94 -24
- package/components/hy-checkbox/typing.d.ts +72 -72
- package/components/hy-checkbox-group/hy-checkbox-group.vue +25 -100
- package/components/hy-checkbox-group/props.ts +80 -0
- package/components/hy-checkbox-group/typing.d.ts +65 -65
- package/components/hy-checkbox-item/hy-checkbox-item.vue +140 -177
- package/components/hy-checkbox-item/props.ts +24 -0
- package/components/hy-checkbox-item/typing.d.ts +4 -3
- package/components/hy-code-input/hy-code-input.vue +179 -262
- package/components/hy-code-input/props.ts +84 -18
- package/components/hy-code-input/typing.d.ts +71 -71
- package/components/hy-config-provider/hy-config-provider.vue +28 -50
- package/components/hy-config-provider/props.ts +26 -11
- package/components/hy-config-provider/typing.d.ts +20 -20
- package/components/hy-count-down/hy-count-down.vue +103 -131
- package/components/hy-count-down/props.ts +30 -8
- package/components/hy-count-down/typing.d.ts +25 -25
- package/components/hy-count-to/hy-count-to.vue +148 -213
- package/components/hy-count-to/props.ts +60 -15
- package/components/hy-count-to/typing.d.ts +46 -46
- package/components/hy-coupon/README.md +133 -0
- package/components/hy-coupon/hy-coupon.vue +180 -0
- package/components/hy-coupon/index.scss +553 -0
- package/components/hy-coupon/props.ts +129 -0
- package/components/hy-coupon/typing.d.ts +146 -0
- package/components/hy-datetime-picker/hy-datetime-picker.vue +415 -580
- package/components/hy-datetime-picker/props.ts +142 -32
- package/components/hy-datetime-picker/typing.d.ts +132 -132
- package/components/hy-divider/hy-divider.vue +90 -169
- package/components/hy-divider/props.ts +78 -19
- package/components/hy-divider/typing.d.ts +60 -60
- package/components/hy-dropdown/hy-dropdown.vue +37 -71
- package/components/hy-dropdown/props.ts +38 -15
- package/components/hy-dropdown/typing.d.ts +44 -44
- package/components/hy-dropdown-item/hy-dropdown-item.vue +141 -173
- package/components/hy-dropdown-item/props.ts +19 -8
- package/components/hy-empty/hy-empty.vue +75 -129
- package/components/hy-empty/props.ts +57 -15
- package/components/hy-empty/typing.d.ts +84 -84
- package/components/hy-flex/hy-flex.vue +33 -88
- package/components/hy-flex/props.ts +58 -0
- package/components/hy-flex/typing.d.ts +14 -16
- package/components/hy-float-button/hy-float-button.vue +289 -406
- package/components/hy-float-button/props.ts +109 -25
- package/components/hy-folding-panel/hy-folding-panel.vue +86 -374
- package/components/hy-folding-panel/props.ts +40 -15
- package/components/hy-folding-panel/typing.d.ts +52 -63
- package/components/hy-folding-panel-item/hy-folding-panel-item.vue +186 -228
- package/components/hy-folding-panel-item/index.scss +87 -0
- package/components/hy-folding-panel-item/props.ts +81 -0
- package/components/hy-folding-panel-item/typing.d.ts +23 -0
- package/components/hy-form/hy-form.vue +172 -212
- package/components/hy-form/props.ts +37 -0
- package/components/hy-form/typing.d.ts +68 -61
- package/components/hy-form-group/typing.d.ts +74 -74
- package/components/hy-form-item/hy-form-item.vue +100 -129
- package/components/hy-form-item/props.ts +25 -0
- package/components/hy-form-item/typing.d.ts +40 -37
- package/components/hy-grid/hy-grid.vue +76 -132
- package/components/hy-grid/props.ts +58 -16
- package/components/hy-grid/typing.d.ts +66 -66
- package/components/hy-icon/hy-icon.vue +84 -161
- package/components/hy-icon/props.ts +76 -22
- package/components/hy-icon/typing.d.ts +83 -82
- package/components/hy-image/hy-image.vue +142 -272
- package/components/hy-image/props.ts +105 -23
- package/components/hy-image/typing.d.ts +84 -87
- package/components/hy-input/hy-input.vue +230 -421
- package/components/hy-input/props.ts +183 -35
- package/components/hy-input/typing.d.ts +169 -169
- package/components/hy-line/hy-line.vue +34 -72
- package/components/hy-line/props.ts +41 -10
- package/components/hy-line/typing.d.ts +29 -29
- package/components/hy-line-progress/hy-line-progress.vue +66 -101
- package/components/hy-line-progress/props.ts +31 -10
- package/components/hy-line-progress/typing.d.ts +29 -29
- package/components/hy-list/hy-list.vue +151 -220
- package/components/hy-list/props.ts +67 -16
- package/components/hy-list/typing.d.ts +52 -52
- package/components/hy-loading/hy-loading.vue +63 -119
- package/components/hy-loading/props.ts +63 -15
- package/components/hy-loading/typing.d.ts +49 -49
- package/components/hy-menu/hy-menu.vue +124 -166
- package/components/hy-menu/props.ts +42 -10
- package/components/hy-menu/typing.d.ts +60 -60
- package/components/hy-modal/hy-modal.vue +127 -218
- package/components/hy-modal/props.ts +89 -24
- package/components/hy-navbar/hy-navbar.vue +104 -177
- package/components/hy-navbar/props.ts +76 -22
- package/components/hy-navbar/typing.d.ts +81 -81
- package/components/hy-notice-bar/hy-notice-bar.vue +67 -144
- package/components/hy-notice-bar/props.ts +80 -19
- package/components/hy-notice-bar/typing.d.ts +62 -62
- package/components/hy-notify/hy-notify.vue +128 -177
- package/components/hy-notify/props.ts +49 -12
- package/components/hy-notify/typing.d.ts +45 -41
- package/components/hy-number-step/hy-number-step.vue +281 -394
- package/components/hy-number-step/props.ts +110 -27
- package/components/hy-number-step/typing.d.ts +120 -120
- package/components/hy-overlay/hy-overlay.vue +39 -66
- package/components/hy-overlay/props.ts +31 -8
- package/components/hy-pagination/hy-pagination.vue +100 -155
- package/components/hy-pagination/props.ts +53 -13
- package/components/hy-picker/hy-picker.vue +309 -430
- package/components/hy-picker/index.scss +8 -12
- package/components/hy-picker/props.ts +110 -26
- package/components/hy-popover/hy-popover.vue +190 -252
- package/components/hy-popover/props.ts +48 -10
- package/components/hy-popup/hy-popup.vue +162 -248
- package/components/hy-popup/props.ts +82 -18
- package/components/hy-price/hy-price.vue +45 -104
- package/components/hy-price/props.ts +52 -12
- package/components/hy-price/typing.d.ts +41 -36
- package/components/hy-qrcode/hy-qrcode.vue +115 -185
- package/components/hy-qrcode/props.ts +68 -18
- package/components/hy-qrcode/typing.d.ts +67 -66
- package/components/hy-radio/hy-radio.vue +161 -259
- package/components/hy-radio/props.ts +95 -25
- package/components/hy-radio/typing.d.ts +85 -84
- package/components/hy-rate/hy-rate.vue +185 -270
- package/components/hy-rate/props.ts +76 -18
- package/components/hy-rate/typing.d.ts +61 -60
- package/components/hy-read-more/hy-read-more.vue +93 -136
- package/components/hy-read-more/props.ts +43 -13
- package/components/hy-scroll-list/hy-scroll-list.vue +81 -102
- package/components/hy-scroll-list/props.ts +22 -11
- package/components/hy-search/hy-search.vue +155 -284
- package/components/hy-search/props.ts +130 -25
- package/components/hy-signature/hy-signature.vue +491 -635
- package/components/hy-signature/props.ts +115 -26
- package/components/hy-signature/typing.d.ts +138 -138
- package/components/hy-slider/hy-slider.vue +388 -477
- package/components/hy-slider/props.ts +75 -19
- package/components/hy-steps/hy-steps.vue +212 -279
- package/components/hy-steps/props.ts +47 -13
- package/components/hy-submit-bar/hy-submit-bar.vue +137 -222
- package/components/hy-submit-bar/props.ts +89 -20
- package/components/hy-submit-bar/typing.d.ts +86 -85
- package/components/hy-subsection/hy-subsection.vue +132 -185
- package/components/hy-subsection/props.ts +50 -17
- package/components/hy-subsection/typing.d.ts +52 -52
- package/components/hy-swipe-action/hy-swipe-action.vue +228 -283
- package/components/hy-swipe-action/props.ts +43 -18
- package/components/hy-swipe-action/typing.d.ts +46 -46
- package/components/hy-swiper/hy-swiper.vue +159 -286
- package/components/hy-swiper/props.ts +126 -28
- package/components/hy-swiper/typing.d.ts +115 -115
- package/components/hy-switch/hy-switch.vue +112 -176
- package/components/hy-switch/props.ts +60 -15
- package/components/hy-switch/typing.d.ts +63 -63
- package/components/hy-tabBar/hy-tabBar.vue +64 -60
- package/components/hy-tabs/hy-tabs.vue +277 -380
- package/components/hy-tabs/props.ts +75 -18
- package/components/hy-tag/hy-tag.vue +111 -204
- package/components/hy-tag/props.ts +81 -19
- package/components/hy-text/hy-text.vue +200 -322
- package/components/hy-text/props.ts +107 -28
- package/components/hy-textarea/hy-textarea.vue +147 -256
- package/components/hy-textarea/props.ts +112 -25
- package/components/hy-textarea/typing.d.ts +42 -42
- package/components/hy-toast/hy-toast.vue +135 -143
- package/components/hy-tooltip/hy-tooltip.vue +220 -306
- package/components/hy-tooltip/props.ts +79 -15
- package/components/hy-transition/hy-transition.vue +111 -138
- package/components/hy-transition/props.ts +30 -8
- package/components/hy-upload/hy-upload.vue +320 -469
- package/components/hy-upload/props.ts +130 -27
- package/components/hy-warn/hy-warn.vue +80 -129
- package/components/hy-warn/props.ts +47 -12
- package/components/hy-waterfall/hy-waterfall.vue +139 -163
- package/components/hy-waterfall/props.ts +19 -7
- package/components/hy-watermark/hy-watermark.vue +762 -870
- package/components/hy-watermark/props.ts +103 -22
- package/global.d.ts +2 -0
- package/libs/css/theme.scss +3 -3
- package/package.json +2 -2
- package/web-types.json +1 -1
- package/components/hy-folding-panel/index.scss +0 -9
|
@@ -1,38 +1,186 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type { CSSProperties, PropType } from 'vue'
|
|
2
|
+
import type { InputConfirmType, InputType } from '@uni-helper/uni-types'
|
|
3
|
+
import type HyIconProps from '../hy-icon/typing'
|
|
2
4
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
5
|
+
const inputProps = {
|
|
6
|
+
/** 输入的值 */
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: [String, Number],
|
|
9
|
+
required: true
|
|
10
|
+
},
|
|
11
|
+
/**
|
|
12
|
+
* 输入框类型,见上方说明
|
|
13
|
+
* @values text,idcard,number,digit,safe-password,tel,nickname
|
|
14
|
+
* */
|
|
15
|
+
type: {
|
|
16
|
+
type: String as PropType<InputType>,
|
|
17
|
+
default: 'text'
|
|
18
|
+
},
|
|
19
|
+
/** 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序 */
|
|
20
|
+
fixed: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
/** 是否禁用输入框 */
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
/** 禁用状态时的背景色 */
|
|
30
|
+
disabledColor: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ''
|
|
33
|
+
},
|
|
34
|
+
/** 是否显示清除控件 */
|
|
35
|
+
clearable: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false
|
|
38
|
+
},
|
|
39
|
+
/** 是否密码类型 */
|
|
40
|
+
password: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
/** 最大输入长度,设置为 -1 的时候不限制最大长度 */
|
|
45
|
+
maxlength: {
|
|
46
|
+
type: Number,
|
|
47
|
+
default: -1
|
|
48
|
+
},
|
|
49
|
+
/** 输入框为空时的占位符 */
|
|
50
|
+
placeholder: String,
|
|
51
|
+
/** 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ */
|
|
52
|
+
placeholderClass: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: 'input-placeholder'
|
|
55
|
+
},
|
|
56
|
+
/** 指定placeholder的样式,字符串/对象形式,如"color: red;" */
|
|
57
|
+
placeholderStyle: {
|
|
58
|
+
type: Object as PropType<CSSProperties>,
|
|
59
|
+
default: () => ({})
|
|
60
|
+
},
|
|
61
|
+
/** 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效 */
|
|
62
|
+
showWordLimit: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false
|
|
65
|
+
},
|
|
66
|
+
/** 设置右下角按钮的文字,兼容性详见uni-app文档 */
|
|
67
|
+
confirmType: {
|
|
68
|
+
type: String as PropType<InputConfirmType>,
|
|
69
|
+
default: 'done'
|
|
70
|
+
},
|
|
71
|
+
/** 点击键盘右下角按钮时是否保持键盘不收起,H5无效 */
|
|
72
|
+
confirmHold: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: false
|
|
75
|
+
},
|
|
76
|
+
/** focus时,点击页面的时候不收起键盘,微信小程序有效 */
|
|
77
|
+
holdKeyboard: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: false
|
|
80
|
+
},
|
|
81
|
+
/** 自动获取焦点,在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点 */
|
|
82
|
+
focus: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: false
|
|
85
|
+
},
|
|
86
|
+
/** 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效 */
|
|
87
|
+
autoBlur: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: false
|
|
90
|
+
},
|
|
91
|
+
/** 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效 */
|
|
92
|
+
disableDefaultPadding: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: false
|
|
95
|
+
},
|
|
96
|
+
/** 指定focus时光标的位置 */
|
|
97
|
+
cursor: {
|
|
98
|
+
type: Number,
|
|
99
|
+
default: 140
|
|
100
|
+
},
|
|
101
|
+
/** 输入框聚焦时底部与键盘的距离 */
|
|
102
|
+
cursorSpacing: {
|
|
103
|
+
type: Number,
|
|
104
|
+
default: 30
|
|
105
|
+
},
|
|
106
|
+
/** 光标起始位置,自动聚集时有效,需与selection-end搭配使用 */
|
|
107
|
+
selectionStart: {
|
|
108
|
+
type: Number,
|
|
109
|
+
default: -1
|
|
110
|
+
},
|
|
111
|
+
/** 光标结束位置,自动聚集时有效,需与selection-start搭配使用 */
|
|
112
|
+
selectionEnd: {
|
|
113
|
+
type: Number,
|
|
114
|
+
default: -1
|
|
115
|
+
},
|
|
116
|
+
/** 键盘弹起时,是否自动上推页面 */
|
|
117
|
+
adjustPosition: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: true
|
|
120
|
+
},
|
|
121
|
+
/**
|
|
122
|
+
* 输入框内容对齐方式
|
|
123
|
+
* @values left,center,right
|
|
124
|
+
* */
|
|
125
|
+
inputAlign: {
|
|
126
|
+
type: String as PropType<HyApp.RowCenterType>,
|
|
127
|
+
default: 'left'
|
|
128
|
+
},
|
|
129
|
+
/** 输入框字体的大小 */
|
|
130
|
+
fontSize: {
|
|
131
|
+
type: [String, Number],
|
|
132
|
+
default: '15px'
|
|
133
|
+
},
|
|
134
|
+
/** 输入框字体颜色 */
|
|
135
|
+
color: {
|
|
136
|
+
type: String,
|
|
137
|
+
default: ''
|
|
138
|
+
},
|
|
139
|
+
/** 输入框前置图标 */
|
|
140
|
+
prefixIcon: {
|
|
141
|
+
type: Object as PropType<HyIconProps>,
|
|
142
|
+
default: () => {}
|
|
143
|
+
},
|
|
144
|
+
/** 输入框后置图标 */
|
|
145
|
+
suffixIcon: {
|
|
146
|
+
type: Object as PropType<HyIconProps>,
|
|
147
|
+
default: () => {}
|
|
148
|
+
},
|
|
149
|
+
/**
|
|
150
|
+
* 边框类型
|
|
151
|
+
* @values surround,bottom,none
|
|
152
|
+
* */
|
|
153
|
+
border: {
|
|
154
|
+
type: String as PropType<HyApp.BorderType>,
|
|
155
|
+
default: 'surround'
|
|
156
|
+
},
|
|
157
|
+
/** 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会 */
|
|
158
|
+
readonly: {
|
|
159
|
+
type: Boolean,
|
|
160
|
+
default: false
|
|
161
|
+
},
|
|
162
|
+
/**
|
|
163
|
+
* 输入框形状
|
|
164
|
+
* @values circle,square
|
|
165
|
+
* */
|
|
166
|
+
shape: {
|
|
167
|
+
type: String as PropType<HyApp.ShapeType>,
|
|
168
|
+
default: 'square'
|
|
169
|
+
},
|
|
170
|
+
/** 是否忽略组件内对文本合成系统事件的处理 */
|
|
171
|
+
ignoreCompositionEvent: {
|
|
172
|
+
type: Boolean,
|
|
173
|
+
default: false
|
|
174
|
+
},
|
|
175
|
+
/** 内容式化函数 */
|
|
176
|
+
formatter: Function,
|
|
177
|
+
/** 定义需要用到的外部样式 */
|
|
178
|
+
customStyle: {
|
|
179
|
+
type: Object as PropType<CSSProperties>,
|
|
180
|
+
default: () => {}
|
|
181
|
+
},
|
|
182
|
+
/** 自定义外部类名 */
|
|
183
|
+
customClass: String
|
|
36
184
|
}
|
|
37
185
|
|
|
38
|
-
export default
|
|
186
|
+
export default inputProps
|
|
@@ -1,176 +1,176 @@
|
|
|
1
|
-
import type { CSSProperties } from
|
|
2
|
-
import type HyIconProps from
|
|
1
|
+
import type { CSSProperties } from 'vue'
|
|
2
|
+
import type HyIconProps from '../hy-icon/typing'
|
|
3
3
|
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from
|
|
4
|
+
InputOnBlurEvent,
|
|
5
|
+
InputOnConfirmEvent,
|
|
6
|
+
InputOnFocusEvent,
|
|
7
|
+
InputOnKeyboardheightchange
|
|
8
|
+
} from '@uni-helper/uni-types'
|
|
9
9
|
|
|
10
10
|
export default interface HyInputProps {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @description 输入的值
|
|
13
|
+
* */
|
|
14
|
+
modelValue: string | number
|
|
15
|
+
/**
|
|
16
|
+
* @description 输入框类型,见上方说明 ( 默认 'text' )
|
|
17
|
+
* */
|
|
18
|
+
type?: HyApp.InputType
|
|
19
|
+
/**
|
|
20
|
+
* @description 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序 ( 默认 false )
|
|
21
|
+
* */
|
|
22
|
+
fixed?: boolean
|
|
23
|
+
/**
|
|
24
|
+
* @description 是否禁用输入框 ( 默认 false )
|
|
25
|
+
* */
|
|
26
|
+
disabled?: boolean
|
|
27
|
+
/**
|
|
28
|
+
* @description 禁用状态时的背景色( 默认 '#f5f7fa' )
|
|
29
|
+
* */
|
|
30
|
+
disabledColor?: string
|
|
31
|
+
/**
|
|
32
|
+
* @description 是否显示清除控件 ( 默认 false )
|
|
33
|
+
* */
|
|
34
|
+
clearable?: boolean
|
|
35
|
+
/**
|
|
36
|
+
* @description 是否密码类型 ( 默认 false )
|
|
37
|
+
* */
|
|
38
|
+
password?: boolean
|
|
39
|
+
/**
|
|
40
|
+
* @description 最大输入长度,设置为 -1 的时候不限制最大长度 ( 默认 -1 )
|
|
41
|
+
* */
|
|
42
|
+
maxlength?: number
|
|
43
|
+
/**
|
|
44
|
+
* @description 输入框为空时的占位符
|
|
45
|
+
* */
|
|
46
|
+
placeholder?: string | null
|
|
47
|
+
/**
|
|
48
|
+
* @description 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ ( 默认 'input-placeholder' )
|
|
49
|
+
* */
|
|
50
|
+
placeholderClass?: string
|
|
51
|
+
/**
|
|
52
|
+
* @description 指定placeholder的样式,字符串/对象形式,如"color: red;"
|
|
53
|
+
* */
|
|
54
|
+
placeholderStyle?: CSSProperties
|
|
55
|
+
/**
|
|
56
|
+
* @description 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效 ( 默认 false )
|
|
57
|
+
* */
|
|
58
|
+
showWordLimit?: boolean
|
|
59
|
+
/**
|
|
60
|
+
* @description 设置右下角按钮的文字,兼容性详见uni-app文档 ( 默认 'done' )
|
|
61
|
+
* */
|
|
62
|
+
confirmType?: string
|
|
63
|
+
/**
|
|
64
|
+
* @description 点击键盘右下角按钮时是否保持键盘不收起,H5无效 ( 默认 false )
|
|
65
|
+
* */
|
|
66
|
+
confirmHold?: boolean
|
|
67
|
+
/**
|
|
68
|
+
* @description focus时,点击页面的时候不收起键盘,微信小程序有效 ( 默认 false )
|
|
69
|
+
* */
|
|
70
|
+
holdKeyboard?: boolean
|
|
71
|
+
/**
|
|
72
|
+
* @description 自动获取焦点,在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点 ( 默认 false )
|
|
73
|
+
* */
|
|
74
|
+
focus?: boolean
|
|
75
|
+
/**
|
|
76
|
+
* @description 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效 ( 默认 false )
|
|
77
|
+
* */
|
|
78
|
+
autoBlur?: boolean
|
|
79
|
+
/**
|
|
80
|
+
* @description 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效 ( 默认 false )
|
|
81
|
+
* */
|
|
82
|
+
disableDefaultPadding?: boolean
|
|
83
|
+
/**
|
|
84
|
+
* @description 指定focus时光标的位置( 默认 140 )
|
|
85
|
+
* */
|
|
86
|
+
cursor?: number
|
|
87
|
+
/**
|
|
88
|
+
* @description 输入框聚焦时底部与键盘的距离 ( 默认 30 )
|
|
89
|
+
* */
|
|
90
|
+
cursorSpacing?: number
|
|
91
|
+
/**
|
|
92
|
+
* @description 光标起始位置,自动聚集时有效,需与selection-end搭配使用 ( 默认 -1 )
|
|
93
|
+
* */
|
|
94
|
+
selectionStart?: number
|
|
95
|
+
/**
|
|
96
|
+
* @description 光标结束位置,自动聚集时有效,需与selection-start搭配使用 ( 默认 -1 )
|
|
97
|
+
* */
|
|
98
|
+
selectionEnd?: number
|
|
99
|
+
/**
|
|
100
|
+
* @description 键盘弹起时,是否自动上推页面 ( 默认 true )
|
|
101
|
+
* */
|
|
102
|
+
adjustPosition?: boolean
|
|
103
|
+
/**
|
|
104
|
+
* @description 输入框内容对齐方式( 默认 'left' )
|
|
105
|
+
* */
|
|
106
|
+
inputAlign?: HyApp.RowCenterType
|
|
107
|
+
/**
|
|
108
|
+
* @description 输入框字体的大小 ( 默认 '15px' )
|
|
109
|
+
* */
|
|
110
|
+
fontSize?: string | number
|
|
111
|
+
/**
|
|
112
|
+
* @description 输入框字体颜色 ( 默认 '#303133' )
|
|
113
|
+
* */
|
|
114
|
+
color?: string
|
|
115
|
+
/**
|
|
116
|
+
* @description 输入框前置图标
|
|
117
|
+
* */
|
|
118
|
+
prefixIcon?: Partial<HyIconProps>
|
|
119
|
+
/**
|
|
120
|
+
* @description 输入框后置图标
|
|
121
|
+
* */
|
|
122
|
+
suffixIcon?: Partial<HyIconProps>
|
|
123
|
+
/**
|
|
124
|
+
* @description 边框类型,surround-四周边框,bottom-底部边框,none-无边框 ( 默认 'surround' )
|
|
125
|
+
* */
|
|
126
|
+
border?: HyApp.BorderType
|
|
127
|
+
/**
|
|
128
|
+
* @description 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会 ( 默认 false )
|
|
129
|
+
* */
|
|
130
|
+
readonly?: boolean
|
|
131
|
+
/**
|
|
132
|
+
* @description 输入框形状,circle-圆形,square-方形 ( 默认 'square' )
|
|
133
|
+
* */
|
|
134
|
+
shape?: HyApp.ShapeType
|
|
135
|
+
/**
|
|
136
|
+
* @description 内容式化函数
|
|
137
|
+
* */
|
|
138
|
+
formatter?: Function | null
|
|
139
|
+
/**
|
|
140
|
+
* @description 定义需要用到的外部样式
|
|
141
|
+
* */
|
|
142
|
+
customStyle?: CSSProperties
|
|
143
|
+
/**
|
|
144
|
+
* @description 值变化事件
|
|
145
|
+
* */
|
|
146
|
+
onChange?: Function
|
|
147
|
+
/**
|
|
148
|
+
* @description 失去焦点事件
|
|
149
|
+
* */
|
|
150
|
+
onBlur?: Function
|
|
151
|
+
/**
|
|
152
|
+
* @description 是否忽略组件内对文本合成系统事件的处理。
|
|
153
|
+
* */
|
|
154
|
+
ignoreCompositionEvent?: boolean
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
export interface IInputEmits {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
158
|
+
/** 输入框失去焦点时触发 */
|
|
159
|
+
(e: 'blur', event: InputOnBlurEvent, value: string | number): void
|
|
160
|
+
/** 输入框聚焦时触发 */
|
|
161
|
+
(e: 'focus', event: InputOnFocusEvent): void
|
|
162
|
+
/** 点击完成按钮时触发 */
|
|
163
|
+
(e: 'confirm', event: InputOnConfirmEvent, value: string | number): void
|
|
164
|
+
/** 键盘高度发生变化的时候触发此事件 */
|
|
165
|
+
(e: 'keyboardheightchange', event: InputOnKeyboardheightchange): void
|
|
166
|
+
/** 内容发生变化触发此事件 */
|
|
167
|
+
(e: 'change', value: string | number): void
|
|
168
|
+
/** 内容发生变化触发此事件 */
|
|
169
|
+
(e: 'update:modelValue', value: string | number): void
|
|
170
|
+
/** 点击清空内容 */
|
|
171
|
+
(e: 'clear'): void
|
|
172
|
+
/** 点击前缀触发 */
|
|
173
|
+
(e: 'onPrefix'): void
|
|
174
|
+
/** 点击后缀触发 */
|
|
175
|
+
(e: 'onSuffix'): void
|
|
176
176
|
}
|