uview-plus 3.1.52 → 3.2.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.
Files changed (134) hide show
  1. package/changelog.md +51 -0
  2. package/components/u-action-sheet/u-action-sheet.vue +1 -1
  3. package/components/u-album/u-album.vue +261 -261
  4. package/components/u-avatar/u-avatar.vue +3 -2
  5. package/components/u-avatar-group/u-avatar-group.vue +106 -106
  6. package/components/u-button/u-button.vue +6 -1
  7. package/components/u-calendar/u-calendar.vue +4 -3
  8. package/components/u-cell/u-cell.vue +4 -2
  9. package/components/u-checkbox/props.js +5 -0
  10. package/components/u-checkbox/u-checkbox.vue +29 -17
  11. package/components/u-code/u-code.vue +1 -1
  12. package/components/u-dropdown/props.js +8 -14
  13. package/components/u-dropdown/u-dropdown.vue +202 -77
  14. package/components/u-dropdown-item/props.js +45 -36
  15. package/components/u-dropdown-item/u-dropdown-item.vue +121 -148
  16. package/components/u-form/u-form.vue +1 -1
  17. package/components/u-form-item/props.js +6 -1
  18. package/components/u-form-item/u-form-item.vue +1 -1
  19. package/components/u-grid/u-grid.vue +4 -2
  20. package/components/u-grid-item/u-grid-item.vue +8 -7
  21. package/components/u-input/u-input.vue +1 -1
  22. package/components/u-lazy-load/u-lazy-load.vue +251 -0
  23. package/components/u-number-box/u-number-box.vue +4 -4
  24. package/components/u-picker/u-picker.vue +5 -2
  25. package/components/u-popup/u-popup.vue +1 -1
  26. package/components/u-radio/u-radio.vue +2 -2
  27. package/components/u-rate/u-rate.vue +1 -1
  28. package/components/u-read-more/u-read-more.vue +164 -160
  29. package/components/u-slider/u-slider.vue +6 -6
  30. package/components/u-steps-item/u-steps-item.vue +318 -318
  31. package/components/u-subsection/u-subsection.vue +35 -21
  32. package/components/u-swiper/u-swiper.vue +6 -8
  33. package/components/u-switch/u-switch.vue +1 -1
  34. package/components/u-tabbar-item/u-tabbar-item.vue +1 -1
  35. package/components/u-tabs/u-tabs.vue +1 -0
  36. package/components/u-tag/props.js +5 -2
  37. package/components/u-tag/u-tag.vue +1 -1
  38. package/components/u-text/u-text.vue +226 -226
  39. package/components/u-textarea/u-textarea.vue +275 -275
  40. package/components/u-transition/u-transition.vue +1 -1
  41. package/components/u-waterfall/u-waterfall.vue +225 -0
  42. package/index.js +5 -2
  43. package/libs/config/props/formItem.js +1 -0
  44. package/libs/config/props/tag.js +30 -29
  45. package/libs/css/common.scss +4 -1
  46. package/libs/css/components.scss +5 -5
  47. package/libs/css/flex.scss +45 -45
  48. package/libs/mixin/mixin.js +2 -2
  49. package/libs/mixin/mpShare.js +15 -13
  50. package/package.json +1 -1
  51. package/types/comps/_common.d.ts +9 -0
  52. package/types/comps/actionSheet.d.ts +121 -0
  53. package/types/comps/album.d.ts +72 -0
  54. package/types/comps/alert.d.ts +55 -0
  55. package/types/comps/avatar.d.ts +85 -0
  56. package/types/comps/avatarGroup.d.ts +62 -0
  57. package/types/comps/backTop.d.ts +74 -0
  58. package/types/comps/badge.d.ts +76 -0
  59. package/types/comps/button.d.ts +169 -0
  60. package/types/comps/calendar.d.ts +164 -0
  61. package/types/comps/cell.d.ts +133 -0
  62. package/types/comps/cellGroup.d.ts +27 -0
  63. package/types/comps/checkbox.d.ts +69 -0
  64. package/types/comps/checkboxGroup.d.ts +93 -0
  65. package/types/comps/code.d.ts +69 -0
  66. package/types/comps/codeInput.d.ts +98 -0
  67. package/types/comps/col.d.ts +43 -0
  68. package/types/comps/collapse.d.ts +52 -0
  69. package/types/comps/collapseItem.d.ts +83 -0
  70. package/types/comps/countDown.d.ts +60 -0
  71. package/types/comps/countTo.d.ts +88 -0
  72. package/types/comps/datetimePicker.d.ts +146 -0
  73. package/types/comps/divider.d.ts +58 -0
  74. package/types/comps/empty.d.ts +72 -0
  75. package/types/comps/form.d.ts +76 -0
  76. package/types/comps/formItem.d.ts +68 -0
  77. package/types/comps/gap.d.ts +35 -0
  78. package/types/comps/grid.d.ts +34 -0
  79. package/types/comps/gridItem.d.ts +28 -0
  80. package/types/comps/icon.d.ts +93 -0
  81. package/types/comps/image.d.ts +119 -0
  82. package/types/comps/indexAnchor.d.ts +38 -0
  83. package/types/comps/indexItem.d.ts +18 -0
  84. package/types/comps/indexList.d.ts +39 -0
  85. package/types/comps/input.d.ts +234 -0
  86. package/types/comps/keyboard.d.ts +125 -0
  87. package/types/comps/line.d.ts +44 -0
  88. package/types/comps/lineProgress.d.ts +51 -0
  89. package/types/comps/link.d.ts +51 -0
  90. package/types/comps/list.d.ts +92 -0
  91. package/types/comps/listItem.d.ts +18 -0
  92. package/types/comps/loadMore.d.ts +108 -0
  93. package/types/comps/loadingIcon.d.ts +68 -0
  94. package/types/comps/loadingPage.d.ts +58 -0
  95. package/types/comps/modal.d.ts +115 -0
  96. package/types/comps/navbar.d.ts +113 -0
  97. package/types/comps/noNetwork.d.ts +40 -0
  98. package/types/comps/noticeBar.d.ts +85 -0
  99. package/types/comps/notify.d.ts +73 -0
  100. package/types/comps/numberBox.d.ts +155 -0
  101. package/types/comps/overlay.d.ts +46 -0
  102. package/types/comps/parse.d.ts +101 -0
  103. package/types/comps/picker.d.ts +115 -0
  104. package/types/comps/popup.d.ts +103 -0
  105. package/types/comps/radio.d.ts +77 -0
  106. package/types/comps/radioGroup.d.ts +97 -0
  107. package/types/comps/rate.d.ts +85 -0
  108. package/types/comps/readMore.d.ts +80 -0
  109. package/types/comps/row.d.ts +34 -0
  110. package/types/comps/scrollList.d.ts +51 -0
  111. package/types/comps/search.d.ts +167 -0
  112. package/types/comps/skeleton.d.ts +70 -0
  113. package/types/comps/slider.d.ts +79 -0
  114. package/types/comps/steps.d.ts +48 -0
  115. package/types/comps/stepsItem.d.ts +41 -0
  116. package/types/comps/sticky.d.ts +48 -0
  117. package/types/comps/subsection.d.ts +64 -0
  118. package/types/comps/swipeAction.d.ts +24 -0
  119. package/types/comps/swipeActionItem.d.ts +58 -0
  120. package/types/comps/swiper.d.ts +142 -0
  121. package/types/comps/swiperIndicator.d.ts +37 -0
  122. package/types/comps/switch.d.ts +73 -0
  123. package/types/comps/tabbar.d.ts +54 -0
  124. package/types/comps/tabbarItem.d.ts +52 -0
  125. package/types/comps/tabs.d.ts +85 -0
  126. package/types/comps/tag.d.ts +93 -0
  127. package/types/comps/text.d.ts +110 -0
  128. package/types/comps/textarea.d.ts +158 -0
  129. package/types/comps/toast.d.ts +59 -0
  130. package/types/comps/tooltip.d.ts +71 -0
  131. package/types/comps/transition.d.ts +61 -0
  132. package/types/comps/upload.d.ts +163 -0
  133. package/types/comps.d.ts +99 -0
  134. package/types/index.d.ts +47 -0
@@ -0,0 +1,164 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface CalendarProps {
4
+ /**
5
+ * 标题内容
6
+ * @default "日期选择"
7
+ */
8
+ title?: string
9
+ /**
10
+ * 是否显示标题
11
+ * @default true
12
+ */
13
+ showTitle?: boolean
14
+ /**
15
+ * 是否显示副标题
16
+ * @default true
17
+ */
18
+ showSubtitle?: boolean
19
+ /**
20
+ * 日期类型选择
21
+ * @default 'single
22
+ */
23
+ mode?: 'single' | 'multiple' | 'range'
24
+ /**
25
+ * mode=range时,第一个日期底部的提示文字
26
+ * @default "开始"
27
+ */
28
+ startText?: string
29
+ /**
30
+ * mode=range时,最后一个日期底部的提示文字
31
+ * @default "结束"
32
+ */
33
+ endText?: string
34
+ /**
35
+ * 自定义列表
36
+ */
37
+ customList?: any[]
38
+ /**
39
+ * 主题色,对底部按钮和选中日期有效
40
+ * @default "#3c9cff"
41
+ */
42
+ color?: string
43
+ /**
44
+ * 最小的可选日期
45
+ * @default 0
46
+ */
47
+ minDate?: string | number
48
+ /**
49
+ * 最大可选日期
50
+ * @default 0
51
+ */
52
+ maxDate?: string | number
53
+ /**
54
+ * 默认选中的日期,mode为multiple或range是必须为数组格式
55
+ * @default null
56
+ */
57
+ defaultDate?: string | Date | any[]
58
+ /**
59
+ * mode=multiple时,最多可选多少个日期
60
+ * @default Number.MAX_SAFE_INTEGER
61
+ */
62
+ maxCount?: string | number
63
+ /**
64
+ * 日期行高
65
+ * @default 56
66
+ */
67
+ rowHeight?: string | number
68
+ /**
69
+ * 日期格式化函数(如需兼容微信小程序,则只能通过setFormatter方法)
70
+ */
71
+ formatter?: (...args: any) => any
72
+ /**
73
+ * 是否显示农历
74
+ * @default false
75
+ */
76
+ showLunar?: boolean
77
+ /**
78
+ * 是否显示月份背景色
79
+ * @default true
80
+ */
81
+ showMark?: boolean
82
+ /**
83
+ * 确定按钮的文字
84
+ * @default "确定"
85
+ */
86
+ confirmText?: string
87
+ /**
88
+ * 确认按钮处于禁用状态时的文字
89
+ * @default "确定"
90
+ */
91
+ confirmDisabledText?: string
92
+ /**
93
+ * 是否显示日历弹窗
94
+ * @default false
95
+ */
96
+ show?: boolean
97
+ /**
98
+ * 是否允许点击遮罩关闭日历 (注意:关闭事件需要自行处理,只会在开启closeOnClickOverlay后点击遮罩层执行close回调)
99
+ * @default false
100
+ */
101
+ closeOnClickOverlay?: boolean
102
+ /**
103
+ * 是否为只读状态,只读状态下禁止选择日期
104
+ * @default false
105
+ */
106
+ readonly?: boolean
107
+ /**
108
+ * 日期区间最多可选天数,默认无限制,mode = range时有效
109
+ * @default 无限制
110
+ */
111
+ maxRange?: string | number
112
+ /**
113
+ * 范围选择超过最多可选天数时的提示文案,mode = range时有效
114
+ * @default "选择天数不能超过 xx 天"
115
+ */
116
+ rangePrompt?: string | null
117
+ /**
118
+ * 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效
119
+ * @default true
120
+ */
121
+ showRangePrompt?: boolean
122
+ /**
123
+ * 是否允许日期范围的起止时间为同一天,mode = range时有效
124
+ * @default false
125
+ */
126
+ allowSameDay?: boolean
127
+ /**
128
+ * 圆角值,默认无圆角
129
+ * @default 0
130
+ */
131
+ round?: string | number
132
+ /**
133
+ * 最大展示的月份数量
134
+ * @default 3
135
+ */
136
+ monthNum?: string | number
137
+ /**
138
+ * 日期选择完成后触发,若`show-confirm`为`true`,则点击确认按钮后触发
139
+ */
140
+ onConfirm?: (...args: any) => any
141
+ /**
142
+ * 日历关闭时触发
143
+ */
144
+ onClose?: () => any
145
+ }
146
+
147
+ declare interface _Calendar {
148
+ new (): {
149
+ $props: AllowedComponentProps &
150
+ VNodeProps &
151
+ CalendarProps
152
+ }
153
+ }
154
+
155
+ declare interface _CalendarRef {
156
+ /**
157
+ * 为兼容微信小程序而暴露的内部方法,详见[文档](https://www.uviewui.com/components/calendar.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%96%87%E6%A1%88)
158
+ */
159
+ setFormatter: (type, value) => any
160
+ }
161
+
162
+ export declare const Calendar: _Calendar
163
+
164
+ export declare const CalendarRef: _CalendarRef
@@ -0,0 +1,133 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface CellProps {
4
+ /**
5
+ * 左侧标题
6
+ */
7
+ title?: string | number
8
+ /**
9
+ * 标题下方的描述信息
10
+ */
11
+ label?: string | number
12
+ /**
13
+ * 右侧的内容
14
+ */
15
+ value?: string | number
16
+ /**
17
+ * 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
18
+ */
19
+ icon?: string
20
+ /**
21
+ * 是否禁用cell
22
+ * @default false
23
+ */
24
+ disabled?: boolean
25
+ /**
26
+ * 是否显示下边框
27
+ * @default true
28
+ */
29
+ border?: boolean
30
+ /**
31
+ * 内容是否垂直居中(主要是针对右侧的value部分)
32
+ * @default false
33
+ */
34
+ center?: boolean
35
+ /**
36
+ * 点击后跳转的URL地址
37
+ */
38
+ url?: string
39
+ /**
40
+ * 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
41
+ * @default "navigateTo"
42
+ */
43
+ linkType?: string
44
+ /**
45
+ * 是否开启点击反馈(表现为点击时加上灰色背景)
46
+ * @default false
47
+ */
48
+ clickable?: boolean
49
+ /**
50
+ * 是否展示右侧箭头并开启点击反馈
51
+ * @default false
52
+ */
53
+ isLink?: boolean
54
+ /**
55
+ * 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
56
+ * @default false
57
+ */
58
+ required?: boolean
59
+ /**
60
+ * 右侧的图标箭头
61
+ * @default "arrow-right"
62
+ */
63
+ rightIcon?: string
64
+ /**
65
+ * 右侧箭头的方向
66
+ * @default "right"
67
+ */
68
+ arrowDirection?: 'left' | 'right' | 'up' | 'down'
69
+ /**
70
+ * 左侧图标样式
71
+ */
72
+ iconStyle?: unknown
73
+ /**
74
+ * 右侧箭头图标的样式
75
+ */
76
+ rightIconStyle?: unknown
77
+ /**
78
+ * 标题的样式
79
+ */
80
+ titleStyle?: unknown
81
+ /**
82
+ * 单位元的大小,可选值为large
83
+ */
84
+ size?: string
85
+ /**
86
+ * 点击cell是否阻止事件传播
87
+ * @default true
88
+ */
89
+ stop?: boolean
90
+ /**
91
+ * 标识符,用于在`click`事件中进行返回
92
+ */
93
+ name?: string | number
94
+ /**
95
+ * 点击cell列表时触发
96
+ * @param name `props`的`name`参数标识符
97
+ */
98
+ onClick?: (name: any) => any
99
+ }
100
+
101
+ declare interface CellSlots {
102
+ /**
103
+ * 自定义左侧标题部分的内容,如需使用,请勿定义`title`参数,或赋值`null`即可
104
+ */
105
+ ['title']?: () => any
106
+ /**
107
+ * 自定义右侧标题部分的内容,如需使用,请勿定义`value`参数,或赋值`null`即可
108
+ */
109
+ ['value']?: () => any
110
+ /**
111
+ * 自定义左侧的图标
112
+ */
113
+ ['icon']?: () => any
114
+ /**
115
+ * 自定义右侧图标内容,需设置`arrow`为`false`才起作用
116
+ */
117
+ ['right-icon']?: () => any
118
+ /**
119
+ * 自定义label内容
120
+ */
121
+ ['label']?: () => any
122
+ }
123
+
124
+ declare interface _Cell {
125
+ new (): {
126
+ $props: AllowedComponentProps &
127
+ VNodeProps &
128
+ CellProps
129
+ $slots: CellSlots
130
+ }
131
+ }
132
+
133
+ export declare const Cell: _Cell
@@ -0,0 +1,27 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface CellGroupProps {
4
+ /**
5
+ * 分组标题
6
+ */
7
+ title?: string
8
+ /**
9
+ * 是否显示外边框
10
+ * @default true
11
+ */
12
+ border?: boolean
13
+ /**
14
+ * 用户自定义外部样式,对象形式
15
+ */
16
+ customStyle?: unknown
17
+ }
18
+
19
+ declare interface _CellGroup {
20
+ new (): {
21
+ $props: AllowedComponentProps &
22
+ VNodeProps &
23
+ CellGroupProps
24
+ }
25
+ }
26
+
27
+ export declare const CellGroup: _CellGroup
@@ -0,0 +1,69 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface CheckboxProps {
4
+ /**
5
+ * checkbox的名称
6
+ */
7
+ name?: string | number | boolean
8
+ /**
9
+ * 形状,square为方形,circle为圆型
10
+ * @default "square"
11
+ */
12
+ shape?: 'square' | 'circle'
13
+ /**
14
+ * 整体的大小
15
+ */
16
+ size?: string | number
17
+ /**
18
+ * 是否默认选中
19
+ * @default false
20
+ */
21
+ checked?: boolean
22
+ /**
23
+ * 是否禁用
24
+ * @default false
25
+ */
26
+ disabled?: string | boolean
27
+ /**
28
+ * 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
29
+ */
30
+ activeColor?: string
31
+ /**
32
+ * 未选中的颜色
33
+ */
34
+ inactiveColor?: string
35
+ /**
36
+ * 图标的大小,单位px
37
+ */
38
+ iconSize?: string | number
39
+ /**
40
+ * 图标颜色
41
+ */
42
+ iconColor?: string
43
+ /**
44
+ * label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
45
+ */
46
+ label?: string | number
47
+ /**
48
+ * label的字体大小,px单位
49
+ */
50
+ labelSize?: string | number
51
+ /**
52
+ * label的颜色
53
+ */
54
+ labelColor?: string
55
+ /**
56
+ * 是否禁止点击提示语选中复选框
57
+ */
58
+ labelDisabled?: string | boolean
59
+ }
60
+
61
+ declare interface _Checkbox {
62
+ new (): {
63
+ $props: AllowedComponentProps &
64
+ VNodeProps &
65
+ CheckboxProps
66
+ }
67
+ }
68
+
69
+ export declare const Checkbox: _Checkbox
@@ -0,0 +1,93 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface CheckboxGroupProps {
4
+ /**
5
+ * 标识符
6
+ */
7
+ name?: string
8
+ /**
9
+ * 绑定的值
10
+ * @default []
11
+ */
12
+ value?: string[]
13
+ /**
14
+ * 形状,square为方形,circle为圆型
15
+ * @default "square"
16
+ */
17
+ shape?: 'square' | 'circle'
18
+ /**
19
+ * 是否禁用全部checkbox
20
+ * @default false
21
+ */
22
+ disabled?: boolean
23
+ /**
24
+ * 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
25
+ * @default "#2979ff"
26
+ */
27
+ activeColor?: string
28
+ /**
29
+ * 未选中的颜色
30
+ * @default "#c8c9cc"
31
+ */
32
+ inactiveColor?: string
33
+ /**
34
+ * 整体的大小
35
+ * @default 18
36
+ */
37
+ size?: string
38
+ /**
39
+ * 布局方式,row-横向,column-纵向
40
+ * @default "row"
41
+ */
42
+ placement?: 'row' | 'column'
43
+ /**
44
+ * label的字体大小,px单位
45
+ * @default 14
46
+ */
47
+ labelSize?: string | number
48
+ /**
49
+ * label的颜色
50
+ * @default "#303133"
51
+ */
52
+ labelColor?: string
53
+ /**
54
+ * 是否禁止点击文本操作
55
+ * @default false
56
+ */
57
+ labelDisabled?: boolean
58
+ /**
59
+ * 图标的大小,单位px
60
+ * @default 12
61
+ */
62
+ iconSize?: string | number
63
+ /**
64
+ * 图标颜色
65
+ * @default "#fff"
66
+ */
67
+ iconColor?: string
68
+ /**
69
+ * 勾选图标的对齐方式,left-左边,right-右边
70
+ * @default "left"
71
+ */
72
+ iconPlacement?: 'left' | 'right'
73
+ /**
74
+ * 竖向配列时,是否显示下划线
75
+ * @default false
76
+ */
77
+ borderBottom?: boolean
78
+ /**
79
+ * 任一个`checkbox`状态发生变化时触发,回调为一个对象
80
+ * @param detail 元素为被选中的`checkbox`的`name`数组
81
+ */
82
+ onChange?: (detail: any[]) => any
83
+ }
84
+
85
+ declare interface _CheckboxGroup {
86
+ new (): {
87
+ $props: AllowedComponentProps &
88
+ VNodeProps &
89
+ CheckboxGroupProps
90
+ }
91
+ }
92
+
93
+ export declare const CheckboxGroup: _CheckboxGroup
@@ -0,0 +1,69 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface CodeProps {
4
+ /**
5
+ * 倒计时所需的秒数
6
+ * @default 60
7
+ */
8
+ seconds?: string | number
9
+ /**
10
+ * 开始前的提示语,详细见[文档](https://www.uviewui.com/components/code.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%8F%90%E7%A4%BA%E8%AF%AD)
11
+ * @default "获取验证码"
12
+ */
13
+ startText?: string
14
+ /**
15
+ * 倒计时期间的提示语,必须带有字母"x",详细见[文档](https://www.uviewui.com/components/code.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%8F%90%E7%A4%BA%E8%AF%AD)
16
+ * @default "X秒重新获取"
17
+ */
18
+ changeText?: string
19
+ /**
20
+ * 倒计结束的提示语,详细见[文档](https://www.uviewui.com/components/code.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%8F%90%E7%A4%BA%E8%AF%AD)
21
+ * @default "重新获取"
22
+ */
23
+ endText?: string
24
+ /**
25
+ * 是否在H5刷新或各端返回再进入时继续倒计时
26
+ * @default false
27
+ */
28
+ keepRunning?: boolean
29
+ /**
30
+ * 多个组件之间继续倒计时的区分`key`,详细见[文档](https://www.uviewui.com/components/code.html#%E4%BF%9D%E6%8C%81%E5%80%92%E8%AE%A1%E6%97%B6)
31
+ */
32
+ uniqueKey?: string
33
+ /**
34
+ * 倒计时期间,每秒触发一次
35
+ * @param text 当前剩余多少秒的状态
36
+ */
37
+ onChange?: (text: string) => any
38
+ /**
39
+ * 开始倒计时触发
40
+ */
41
+ onStart?: () => any
42
+ /**
43
+ * 结束倒计时触发
44
+ */
45
+ onEnd?: () => any
46
+ }
47
+
48
+ declare interface _Code {
49
+ new (): {
50
+ $props: AllowedComponentProps &
51
+ VNodeProps &
52
+ CodeProps
53
+ }
54
+ }
55
+
56
+ declare interface _CodeRef {
57
+ /**
58
+ * 开始倒计时
59
+ */
60
+ start: () => void
61
+ /**
62
+ * 结束当前正在进行中的倒计时,设置组件为可以重新获取验证码的状态
63
+ */
64
+ reset: () => void
65
+ }
66
+
67
+ export declare const Code: _Code
68
+
69
+ export declare const CodeRef: _CodeRef
@@ -0,0 +1,98 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface CodeInputProps {
4
+ /**
5
+ * 键盘弹起时,是否自动上推页面
6
+ * @default true
7
+ */
8
+ adjustPosition?: boolean
9
+ /**
10
+ * 输入字符个数
11
+ * @default 6
12
+ */
13
+ maxlength?: string | number
14
+ /**
15
+ * 是否用圆点填充
16
+ * @default false
17
+ */
18
+ dot?: boolean
19
+ /**
20
+ * 模式选择
21
+ * @default "box"
22
+ */
23
+ mode?: 'box' | 'bottomLine' | 'middleLine'
24
+ /**
25
+ * 是否细边框
26
+ * @default false
27
+ */
28
+ hairline?: boolean
29
+ /**
30
+ * 字符间的距离
31
+ * @default 10
32
+ */
33
+ space?: string | number
34
+ /**
35
+ * 预置值
36
+ */
37
+ value?: string | number
38
+ /**
39
+ * 是否自动获取焦点
40
+ * @default false
41
+ */
42
+ focus?: boolean
43
+ /**
44
+ * 字体和输入横线是否加粗
45
+ * @default false
46
+ */
47
+ bold?: boolean
48
+ /**
49
+ * 字体颜色
50
+ * @default "#606266"
51
+ */
52
+ color?: string
53
+ /**
54
+ * 字体大小,单位rpx
55
+ * @default 18
56
+ */
57
+ fontSize?: string | number
58
+ /**
59
+ * 输入框的大小,宽等于高
60
+ * @default 35
61
+ */
62
+ size?: string | number
63
+ /**
64
+ * 禁止点击输入框唤起系统键盘
65
+ * @default false
66
+ */
67
+ disabledKeyboard?: boolean
68
+ /**
69
+ * 边框和线条颜色
70
+ * @default "#c9cacc"
71
+ */
72
+ borderColor?: string
73
+ /**
74
+ * 是否禁止输入"."符号
75
+ * @default true
76
+ */
77
+ disabledDot?: boolean
78
+ /**
79
+ * 输入内容发生改变时触发
80
+ * @param value 当前输入的值
81
+ */
82
+ onChange?: (value: any) => any
83
+ /**
84
+ * 输入字符个数达`maxlength`值时触发
85
+ * @param value 当前输入的值
86
+ */
87
+ onFinish?: (value: any) => any
88
+ }
89
+
90
+ declare interface _CodeInput {
91
+ new (): {
92
+ $props: AllowedComponentProps &
93
+ VNodeProps &
94
+ CodeInputProps
95
+ }
96
+ }
97
+
98
+ export declare const CodeInput: _CodeInput
@@ -0,0 +1,43 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface ColProps {
4
+ /**
5
+ * 栅格占据的列数,总12等分
6
+ * @default 0
7
+ */
8
+ span?: string | number
9
+ /**
10
+ * 分栏左边偏移,计算方式与span相同
11
+ * @default 0
12
+ */
13
+ offset?: string | number
14
+ /**
15
+ * 水平排列方式(微信小程序暂不支持)
16
+ * @default "start"
17
+ */
18
+ justify?: 'start' | 'flex-start' | 'end' | 'flex-end' | 'center' | 'around' | 'space-around' | 'between' | 'space-between'
19
+ /**
20
+ * 垂直排列方式
21
+ * @default "stretch"
22
+ */
23
+ align?: 'top' | 'center' | 'bottom' | 'stretch'
24
+ /**
25
+ * 文字水平对齐方式
26
+ * @default 'left
27
+ */
28
+ textAlign?: 'left' | 'center' | 'right'
29
+ /**
30
+ * 点击触发事件
31
+ */
32
+ onClick?: () => any
33
+ }
34
+
35
+ declare interface _Col {
36
+ new (): {
37
+ $props: AllowedComponentProps &
38
+ VNodeProps &
39
+ ColProps
40
+ }
41
+ }
42
+
43
+ export declare const Col: _Col