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.
Files changed (106) hide show
  1. package/attributes.json +1 -1
  2. package/components/hy-address-picker/hy-address-picker.vue +249 -249
  3. package/components/hy-address-picker/props.ts +103 -103
  4. package/components/hy-button/hy-button.vue +320 -289
  5. package/components/hy-button/props.ts +143 -143
  6. package/components/hy-button/typing.d.ts +43 -35
  7. package/components/hy-calendar/header.vue +58 -58
  8. package/components/hy-calendar/hy-calendar.vue +8 -6
  9. package/components/hy-calendar/month.vue +402 -402
  10. package/components/hy-calendar/props.ts +169 -169
  11. package/components/hy-calendar/typing.d.ts +47 -45
  12. package/components/hy-cell-item/hy-cell-item.vue +161 -161
  13. package/components/hy-cell-item/props.ts +59 -59
  14. package/components/hy-check-button/hy-check-button.vue +135 -135
  15. package/components/hy-code-input/hy-code-input.vue +231 -231
  16. package/components/hy-code-input/props.ts +90 -90
  17. package/components/hy-config-provider/hy-config-provider.vue +53 -53
  18. package/components/hy-config-provider/props.ts +30 -30
  19. package/components/hy-coupon/hy-coupon.vue +183 -183
  20. package/components/hy-coupon/props.ts +108 -108
  21. package/components/hy-datetime-picker/hy-datetime-picker.vue +41 -55
  22. package/components/hy-datetime-picker/props.ts +144 -144
  23. package/components/hy-datetime-picker/typing.d.ts +2 -0
  24. package/components/hy-divider/props.ts +83 -83
  25. package/components/hy-empty/icon.ts +72 -72
  26. package/components/hy-folding-panel/hy-folding-panel-group.vue +162 -162
  27. package/components/hy-form/hy-form.vue +220 -220
  28. package/components/hy-icon/hy-icon.vue +112 -112
  29. package/components/hy-index-bar/hy-index-bar.vue +185 -185
  30. package/components/hy-index-bar/index.scss +64 -64
  31. package/components/hy-index-bar/props.ts +94 -94
  32. package/components/hy-index-bar/typing.d.ts +36 -36
  33. package/components/hy-input/hy-input.vue +333 -333
  34. package/components/hy-input/props.ts +186 -186
  35. package/components/hy-modal/hy-modal.vue +211 -211
  36. package/components/hy-modal/props.ts +94 -94
  37. package/components/hy-modal/typing.d.ts +16 -16
  38. package/components/hy-notice-bar/hy-row-notice.vue +121 -121
  39. package/components/hy-notify/hy-notify.vue +174 -174
  40. package/components/hy-number-step/hy-number-step.vue +367 -367
  41. package/components/hy-overlay/hy-overlay.vue +61 -61
  42. package/components/hy-overlay/props.ts +38 -38
  43. package/components/hy-pagination/hy-pagination.vue +136 -136
  44. package/components/hy-pagination/props.ts +58 -58
  45. package/components/hy-parse/hy-parse.vue +550 -550
  46. package/components/hy-parse/node/node.vue +781 -781
  47. package/components/hy-parse/parser.js +1455 -1455
  48. package/components/hy-parse/props.ts +19 -19
  49. package/components/hy-parse/typing.d.ts +68 -68
  50. package/components/hy-picker/hy-picker.vue +435 -435
  51. package/components/hy-picker/props.ts +122 -122
  52. package/components/hy-picker/typing.d.ts +38 -38
  53. package/components/hy-qrcode/props.ts +72 -72
  54. package/components/hy-qrcode/qrcode.js.bak +1433 -1433
  55. package/components/hy-radio/props.ts +97 -97
  56. package/components/hy-read-more/props.ts +48 -48
  57. package/components/hy-search/props.ts +133 -133
  58. package/components/hy-signature/canvasHelper.ts +51 -51
  59. package/components/hy-signature/props.ts +121 -121
  60. package/components/hy-skeleton/hy-skeleton.vue +142 -142
  61. package/components/hy-skeleton/props.ts +46 -46
  62. package/components/hy-skeleton/typing.d.ts +31 -31
  63. package/components/hy-steps/hy-steps.vue +275 -275
  64. package/components/hy-steps/typing.d.ts +25 -25
  65. package/components/hy-swiper/hy-swiper.vue +3 -3
  66. package/components/hy-swiper/index.scss +5 -5
  67. package/components/hy-swiper/props.ts +0 -1
  68. package/components/hy-table/hy-table.vue +630 -630
  69. package/components/hy-table/props.ts +62 -62
  70. package/components/hy-table/typing.d.ts +29 -29
  71. package/components/hy-tabs/hy-tabs.vue +336 -335
  72. package/components/hy-tabs/props.ts +84 -77
  73. package/components/hy-tag/hy-tag.vue +173 -173
  74. package/components/hy-tag/props.ts +89 -89
  75. package/components/hy-text/hy-text.vue +237 -237
  76. package/components/hy-text/props.ts +115 -115
  77. package/components/hy-textarea/hy-textarea.vue +198 -198
  78. package/components/hy-toast/hy-toast.vue +200 -200
  79. package/components/hy-toast/props.ts +3 -3
  80. package/components/hy-transition/hy-transition.vue +157 -157
  81. package/components/hy-transition/props.ts +32 -32
  82. package/components/hy-upload/hy-upload.vue +384 -384
  83. package/components/hy-watermark/hy-watermark.vue +1058 -1058
  84. package/components/hy-watermark/props.ts +109 -109
  85. package/global.d.ts +94 -94
  86. package/libs/api/http.ts +119 -119
  87. package/libs/composables/index.ts +8 -8
  88. package/libs/composables/useMessage.ts +149 -149
  89. package/libs/composables/useToast.ts +45 -45
  90. package/libs/composables/useTranslate.ts +10 -10
  91. package/libs/css/_config.scss +5 -5
  92. package/libs/index.ts +8 -8
  93. package/libs/locale/index.ts +32 -32
  94. package/libs/locale/lang/en-US.ts +84 -84
  95. package/libs/locale/lang/zh-CN.ts +87 -87
  96. package/libs/typing/index.ts +2 -2
  97. package/libs/typing/modules/common.d.ts +139 -139
  98. package/libs/typing/modules/form.ts +176 -176
  99. package/libs/typing/modules/http.d.ts +19 -19
  100. package/libs/typing/modules/index.d.ts +12 -12
  101. package/libs/utils/inside.ts +340 -340
  102. package/libs/utils/inspect.ts +140 -140
  103. package/libs/utils/utils.ts +525 -525
  104. package/package.json +81 -81
  105. package/tags.json +1 -1
  106. package/web-types.json +1 -1
@@ -1,231 +1,231 @@
1
- <template>
2
- <view :class="['hy-code-input', customClass]">
3
- <view
4
- :class="itemClass(index)"
5
- :style="[itemStyle(index)]"
6
- v-for="(item, index) in codeLength"
7
- :key="index"
8
- >
9
- <view
10
- class="hy-code-input--item__dot"
11
- v-if="dot && current > index"
12
- :style="{ color: color }"
13
- ></view>
14
- <text
15
- v-else
16
- class="hy-code-input--item__text"
17
- :style="{
18
- fontSize: addUnit(fontSize),
19
- fontWeight: bold ? 'bold' : 'normal',
20
- color: color
21
- }"
22
- >
23
- {{ codeArray[index] }}
24
- </text>
25
- </view>
26
- <input
27
- :disabled="disabledKeyboard"
28
- type="number"
29
- :focus="focus"
30
- :value="inputValue"
31
- :maxlength="maxlength"
32
- :adjustPosition="adjustPosition"
33
- class="hy-code-input__input"
34
- @input="inputHandler"
35
- :style="{
36
- height: boxSize
37
- }"
38
- @focus="isFocus = true"
39
- @blur="isFocus = false"
40
- />
41
- </view>
42
- </template>
43
-
44
- <script lang="ts">
45
- export default {
46
- name: 'hy-code-input',
47
- options: {
48
- addGlobalClass: true,
49
- virtualHost: true,
50
- styleIsolation: 'shared'
51
- }
52
- }
53
- </script>
54
-
55
- <script setup lang="ts">
56
- import { computed, nextTick, onUnmounted, ref, watch } from 'vue'
57
- import type { CSSProperties } from 'vue'
58
- import type { ICodeInputEmits } from './typing'
59
- import { addUnit, getPx } from '../../libs'
60
- import type { InputOnInputEvent } from '@uni-helper/uni-types'
61
- import codeInputProps from './props'
62
-
63
- /**
64
- * 一般用于验证用户短信验证码的场景,也可以结合华玥的键盘组件使用
65
- * @displayName hy-code-input
66
- */
67
- defineOptions({})
68
-
69
- const props = defineProps(codeInputProps)
70
- const emit = defineEmits<ICodeInputEmits>()
71
-
72
- const current = ref(0)
73
- const inputValue = ref('')
74
- const isFocus = ref(props.focus)
75
- let timer: ReturnType<typeof setInterval>
76
- const opacity = ref(1)
77
- const borderWidth = computed(() => (props.hairline ? '0.5px' : '2px'))
78
- const lineHeight = computed(() => (props.hairline ? '2px' : '4px'))
79
- const boxSize = addUnit(props.size)
80
-
81
- watch(
82
- () => props.modelValue,
83
- (newValue: string | number) => {
84
- inputValue.value = String(newValue).substring(0, props.maxlength)
85
- current.value = newValue.toString().length
86
- },
87
-
88
- { immediate: true }
89
- )
90
-
91
- watch(
92
- () => isFocus.value,
93
- (newValue) => {
94
- // #ifdef APP-NVUE
95
- if (newValue) {
96
- timer = setInterval(() => {
97
- opacity.value = Math.abs(opacity.value - 1)
98
- }, 600)
99
- } else {
100
- clearInterval(timer)
101
- }
102
- // #endif
103
- }
104
- )
105
-
106
- onUnmounted(() => {
107
- // #ifdef APP-NVUE
108
- clearInterval(timer)
109
- // #endif
110
- })
111
-
112
- // 根据长度,循环输入框的个数,因为头条小程序数值不能用于v-for
113
- const codeLength = computed(() => {
114
- return new Array(Number(props.maxlength))
115
- })
116
- // 循环item的样式
117
- const itemStyle = computed(() => {
118
- return (index: number) => {
119
- const style: CSSProperties = {
120
- width: boxSize,
121
- height: boxSize
122
- }
123
- if (props.borderColor) {
124
- style['--hy-border-color'] = props.borderColor
125
- }
126
- // 盒子模式下,需要额外进行处理
127
- if (props.mode === 'box' && props.border) {
128
- // 设置盒子的边框,如果是细边框,则设置为1px宽度
129
- style.borderWidth = borderWidth.value
130
- style.borderStyle = 'solid'
131
- style.borderColor = props.borderColor
132
- // 如果盒子间距为0的话
133
- if (getPx(props.space) === 0) {
134
- // 给第一和最后一个盒子设置圆角
135
- if (index === 0) {
136
- style.borderTopLeftRadius = '6px'
137
- style.borderBottomLeftRadius = '6px'
138
- }
139
- if (index === codeLength.value.length - 1) {
140
- style.borderTopRightRadius = '6px'
141
- style.borderBottomRightRadius = '6px'
142
- }
143
- // 最后一个盒子的右边框需要保留
144
- if (index !== codeLength.value.length - 1) {
145
- style.borderRight = 'none'
146
- }
147
- }
148
- }
149
- if (index !== codeLength.value.length - 1) {
150
- // 设置验证码字符之间的距离,通过margin-right设置,最后一个字符,无需右边框
151
- style.marginRight = addUnit(props.space)
152
- } else {
153
- // 最后一个盒子的有边框需要保留
154
- style.marginRight = 0
155
- }
156
-
157
- return style
158
- }
159
- })
160
-
161
- const itemClass = computed(() => {
162
- return (index: number) => {
163
- return [
164
- 'hy-code-input--item',
165
- props.border ? `hy-code-input--item__${props.mode}` : 'hy-code-input--item__no',
166
- current.value > index &&
167
- getPx(props.space) != 0 &&
168
- props.border &&
169
- `hy-code-input--item__${props.mode}__border`,
170
- isFocus.value &&
171
- current.value === index &&
172
- getPx(props.space) != 0 &&
173
- (props.border
174
- ? `hy-code-input--item__${props.mode}__active`
175
- : 'hy-code-input--item__no--active')
176
- ]
177
- }
178
- })
179
-
180
- /**
181
- * @description 将输入的值,转为数组,给item历遍时,根据当前的索引显示数组的元素
182
- */
183
- const codeArray = computed(() => {
184
- return String(inputValue.value).split('')
185
- })
186
-
187
- /**
188
- * @description 监听输入框的值发生变化
189
- * */
190
- const inputHandler = (e: InputOnInputEvent) => {
191
- const value = e.detail.value
192
- inputValue.value = value
193
- // 是否允许输入“.”符号
194
- if (props.disabledDot) {
195
- nextTick(() => {
196
- inputValue.value = value.replace('.', '')
197
- })
198
- }
199
- // 未达到maxlength之前,发送change事件,达到后发送finish事件
200
- emit('change', value)
201
- // 修改通过v-model双向绑定的值
202
- emit('update:modelValue', value)
203
- // 达到用户指定输入长度时,发出完成事件
204
- if (String(value).length >= Number(props.maxlength)) {
205
- emit('finish', value)
206
- }
207
- }
208
- </script>
209
-
210
- <style scoped lang="scss">
211
- @import './index.scss';
212
- @import '../../libs/css/mixin';
213
- @import '../../libs/css/theme';
214
- @include b(code-input) {
215
- @include m(item) {
216
- &__box {
217
- &__active {
218
- width: v-bind(boxSize);
219
- height: v-bind(boxSize);
220
- border-width: v-bind(borderWidth);
221
- }
222
- }
223
- &__line {
224
- &::after {
225
- height: v-bind(lineHeight);
226
- background-color: $hy-border-color;
227
- }
228
- }
229
- }
230
- }
231
- </style>
1
+ <template>
2
+ <view :class="['hy-code-input', customClass]">
3
+ <view
4
+ :class="itemClass(index)"
5
+ :style="[itemStyle(index)]"
6
+ v-for="(item, index) in codeLength"
7
+ :key="index"
8
+ >
9
+ <view
10
+ class="hy-code-input--item__dot"
11
+ v-if="dot && current > index"
12
+ :style="{ color: color }"
13
+ ></view>
14
+ <text
15
+ v-else
16
+ class="hy-code-input--item__text"
17
+ :style="{
18
+ fontSize: addUnit(fontSize),
19
+ fontWeight: bold ? 'bold' : 'normal',
20
+ color: color
21
+ }"
22
+ >
23
+ {{ codeArray[index] }}
24
+ </text>
25
+ </view>
26
+ <input
27
+ :disabled="disabledKeyboard"
28
+ type="number"
29
+ :focus="focus"
30
+ :value="inputValue"
31
+ :maxlength="maxlength"
32
+ :adjustPosition="adjustPosition"
33
+ class="hy-code-input__input"
34
+ @input="inputHandler"
35
+ :style="{
36
+ height: boxSize
37
+ }"
38
+ @focus="isFocus = true"
39
+ @blur="isFocus = false"
40
+ />
41
+ </view>
42
+ </template>
43
+
44
+ <script lang="ts">
45
+ export default {
46
+ name: 'hy-code-input',
47
+ options: {
48
+ addGlobalClass: true,
49
+ virtualHost: true,
50
+ styleIsolation: 'shared'
51
+ }
52
+ }
53
+ </script>
54
+
55
+ <script setup lang="ts">
56
+ import { computed, nextTick, onUnmounted, ref, watch } from 'vue'
57
+ import type { CSSProperties } from 'vue'
58
+ import type { ICodeInputEmits } from './typing'
59
+ import { addUnit, getPx } from '../../libs'
60
+ import type { InputOnInputEvent } from '@uni-helper/uni-types'
61
+ import codeInputProps from './props'
62
+
63
+ /**
64
+ * 一般用于验证用户短信验证码的场景,也可以结合华玥的键盘组件使用
65
+ * @displayName hy-code-input
66
+ */
67
+ defineOptions({})
68
+
69
+ const props = defineProps(codeInputProps)
70
+ const emit = defineEmits<ICodeInputEmits>()
71
+
72
+ const current = ref(0)
73
+ const inputValue = ref('')
74
+ const isFocus = ref(props.focus)
75
+ let timer: ReturnType<typeof setInterval>
76
+ const opacity = ref(1)
77
+ const borderWidth = computed(() => (props.hairline ? '0.5px' : '2px'))
78
+ const lineHeight = computed(() => (props.hairline ? '2px' : '4px'))
79
+ const boxSize = addUnit(props.size)
80
+
81
+ watch(
82
+ () => props.modelValue,
83
+ (newValue: string | number) => {
84
+ inputValue.value = String(newValue).substring(0, props.maxlength)
85
+ current.value = newValue.toString().length
86
+ },
87
+
88
+ { immediate: true }
89
+ )
90
+
91
+ watch(
92
+ () => isFocus.value,
93
+ (newValue) => {
94
+ // #ifdef APP-NVUE
95
+ if (newValue) {
96
+ timer = setInterval(() => {
97
+ opacity.value = Math.abs(opacity.value - 1)
98
+ }, 600)
99
+ } else {
100
+ clearInterval(timer)
101
+ }
102
+ // #endif
103
+ }
104
+ )
105
+
106
+ onUnmounted(() => {
107
+ // #ifdef APP-NVUE
108
+ clearInterval(timer)
109
+ // #endif
110
+ })
111
+
112
+ // 根据长度,循环输入框的个数,因为头条小程序数值不能用于v-for
113
+ const codeLength = computed(() => {
114
+ return new Array(Number(props.maxlength))
115
+ })
116
+ // 循环item的样式
117
+ const itemStyle = computed(() => {
118
+ return (index: number) => {
119
+ const style: CSSProperties = {
120
+ width: boxSize,
121
+ height: boxSize
122
+ }
123
+ if (props.borderColor) {
124
+ style['--hy-border-color'] = props.borderColor
125
+ }
126
+ // 盒子模式下,需要额外进行处理
127
+ if (props.mode === 'box' && props.border) {
128
+ // 设置盒子的边框,如果是细边框,则设置为1px宽度
129
+ style.borderWidth = borderWidth.value
130
+ style.borderStyle = 'solid'
131
+ style.borderColor = props.borderColor
132
+ // 如果盒子间距为0的话
133
+ if (getPx(props.space) === 0) {
134
+ // 给第一和最后一个盒子设置圆角
135
+ if (index === 0) {
136
+ style.borderTopLeftRadius = '6px'
137
+ style.borderBottomLeftRadius = '6px'
138
+ }
139
+ if (index === codeLength.value.length - 1) {
140
+ style.borderTopRightRadius = '6px'
141
+ style.borderBottomRightRadius = '6px'
142
+ }
143
+ // 最后一个盒子的右边框需要保留
144
+ if (index !== codeLength.value.length - 1) {
145
+ style.borderRight = 'none'
146
+ }
147
+ }
148
+ }
149
+ if (index !== codeLength.value.length - 1) {
150
+ // 设置验证码字符之间的距离,通过margin-right设置,最后一个字符,无需右边框
151
+ style.marginRight = addUnit(props.space)
152
+ } else {
153
+ // 最后一个盒子的有边框需要保留
154
+ style.marginRight = 0
155
+ }
156
+
157
+ return style
158
+ }
159
+ })
160
+
161
+ const itemClass = computed(() => {
162
+ return (index: number) => {
163
+ return [
164
+ 'hy-code-input--item',
165
+ props.border ? `hy-code-input--item__${props.mode}` : 'hy-code-input--item__no',
166
+ current.value > index &&
167
+ getPx(props.space) != 0 &&
168
+ props.border &&
169
+ `hy-code-input--item__${props.mode}__border`,
170
+ isFocus.value &&
171
+ current.value === index &&
172
+ getPx(props.space) != 0 &&
173
+ (props.border
174
+ ? `hy-code-input--item__${props.mode}__active`
175
+ : 'hy-code-input--item__no--active')
176
+ ]
177
+ }
178
+ })
179
+
180
+ /**
181
+ * @description 将输入的值,转为数组,给item历遍时,根据当前的索引显示数组的元素
182
+ */
183
+ const codeArray = computed(() => {
184
+ return String(inputValue.value).split('')
185
+ })
186
+
187
+ /**
188
+ * @description 监听输入框的值发生变化
189
+ * */
190
+ const inputHandler = (e: InputOnInputEvent) => {
191
+ const value = e.detail.value
192
+ inputValue.value = value
193
+ // 是否允许输入“.”符号
194
+ if (props.disabledDot) {
195
+ nextTick(() => {
196
+ inputValue.value = value.replace('.', '')
197
+ })
198
+ }
199
+ // 未达到maxlength之前,发送change事件,达到后发送finish事件
200
+ emit('change', value)
201
+ // 修改通过v-model双向绑定的值
202
+ emit('update:modelValue', value)
203
+ // 达到用户指定输入长度时,发出完成事件
204
+ if (String(value).length >= Number(props.maxlength)) {
205
+ emit('finish', value)
206
+ }
207
+ }
208
+ </script>
209
+
210
+ <style scoped lang="scss">
211
+ @import './index.scss';
212
+ @import '../../libs/css/mixin';
213
+ @import '../../libs/css/theme';
214
+ @include b(code-input) {
215
+ @include m(item) {
216
+ &__box {
217
+ &__active {
218
+ width: v-bind(boxSize);
219
+ height: v-bind(boxSize);
220
+ border-width: v-bind(borderWidth);
221
+ }
222
+ }
223
+ &__line {
224
+ &::after {
225
+ height: v-bind(lineHeight);
226
+ background-color: $hy-border-color;
227
+ }
228
+ }
229
+ }
230
+ }
231
+ </style>
@@ -1,90 +1,90 @@
1
- import type IProps from './typing'
2
- import type { CSSProperties, PropType } from 'vue'
3
-
4
- const codeInputProps = {
5
- /** 获取值 */
6
- modelValue: {
7
- type: [String, Number],
8
- required: true
9
- },
10
- /** 键盘弹起时,是否自动上推页面 */
11
- adjustPosition: {
12
- type: Boolean,
13
- default: true
14
- },
15
- /** 最大输入长度 */
16
- maxlength: {
17
- type: Number,
18
- default: 6
19
- },
20
- /** 显示border */
21
- border: {
22
- type: Boolean,
23
- default: true
24
- },
25
- /** 是否用圆点填充 */
26
- dot: {
27
- type: Boolean,
28
- default: false
29
- },
30
- /**
31
- * 示模式,box-盒子模式,line-底部横线模式
32
- * @values box,line
33
- * */
34
- mode: {
35
- type: String,
36
- default: 'box'
37
- },
38
- /** 是否细边框 */
39
- hairline: {
40
- type: Boolean,
41
- default: false
42
- },
43
- /** 字符间的距离 */
44
- space: {
45
- type: Number,
46
- default: 10
47
- },
48
- /** 是否自动获取焦点 */
49
- focus: {
50
- type: Boolean,
51
- default: false
52
- },
53
- /** 字体是否加粗 */
54
- bold: {
55
- type: Boolean,
56
- default: false
57
- },
58
- /** 字体颜色 */
59
- color: String,
60
- /** 字体大小,单位px */
61
- fontSize: {
62
- type: [String, Number],
63
- default: 18
64
- },
65
- /** 输入框的大小,宽等于高 */
66
- size: {
67
- type: [String, Number],
68
- default: 35
69
- },
70
- /** 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true */
71
- disabledKeyboard: {
72
- type: Boolean,
73
- default: false
74
- },
75
- /** 边框和线条颜色 */
76
- borderColor: String,
77
- /** 是否禁止输入"."符号 */
78
- disabledDot: {
79
- type: Boolean,
80
- default: true
81
- },
82
- /** 定义需要用到的外部样式 */
83
- customStyle: {
84
- type: Object as PropType<CSSProperties>
85
- },
86
- /** 自定义外部类名 */
87
- customClass: String
88
- }
89
-
90
- export default codeInputProps
1
+ import type IProps from './typing'
2
+ import type { CSSProperties, PropType } from 'vue'
3
+
4
+ const codeInputProps = {
5
+ /** 获取值 */
6
+ modelValue: {
7
+ type: [String, Number],
8
+ required: true
9
+ },
10
+ /** 键盘弹起时,是否自动上推页面 */
11
+ adjustPosition: {
12
+ type: Boolean,
13
+ default: true
14
+ },
15
+ /** 最大输入长度 */
16
+ maxlength: {
17
+ type: Number,
18
+ default: 6
19
+ },
20
+ /** 显示border */
21
+ border: {
22
+ type: Boolean,
23
+ default: true
24
+ },
25
+ /** 是否用圆点填充 */
26
+ dot: {
27
+ type: Boolean,
28
+ default: false
29
+ },
30
+ /**
31
+ * 示模式,box-盒子模式,line-底部横线模式
32
+ * @values box,line
33
+ * */
34
+ mode: {
35
+ type: String,
36
+ default: 'box'
37
+ },
38
+ /** 是否细边框 */
39
+ hairline: {
40
+ type: Boolean,
41
+ default: false
42
+ },
43
+ /** 字符间的距离 */
44
+ space: {
45
+ type: Number,
46
+ default: 10
47
+ },
48
+ /** 是否自动获取焦点 */
49
+ focus: {
50
+ type: Boolean,
51
+ default: false
52
+ },
53
+ /** 字体是否加粗 */
54
+ bold: {
55
+ type: Boolean,
56
+ default: false
57
+ },
58
+ /** 字体颜色 */
59
+ color: String,
60
+ /** 字体大小,单位px */
61
+ fontSize: {
62
+ type: [String, Number],
63
+ default: 18
64
+ },
65
+ /** 输入框的大小,宽等于高 */
66
+ size: {
67
+ type: [String, Number],
68
+ default: 35
69
+ },
70
+ /** 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true */
71
+ disabledKeyboard: {
72
+ type: Boolean,
73
+ default: false
74
+ },
75
+ /** 边框和线条颜色 */
76
+ borderColor: String,
77
+ /** 是否禁止输入"."符号 */
78
+ disabledDot: {
79
+ type: Boolean,
80
+ default: true
81
+ },
82
+ /** 定义需要用到的外部样式 */
83
+ customStyle: {
84
+ type: Object as PropType<CSSProperties>
85
+ },
86
+ /** 自定义外部类名 */
87
+ customClass: String
88
+ }
89
+
90
+ export default codeInputProps