uview-plus 3.2.3 → 3.2.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 (100) hide show
  1. package/changelog.md +9 -0
  2. package/components/u-checkbox/u-checkbox.vue +2 -2
  3. package/components/u-number-box/u-number-box.vue +4 -4
  4. package/components/u-picker/u-picker.vue +1 -1
  5. package/components/u-radio/u-radio.vue +2 -2
  6. package/components/u-rate/u-rate.vue +1 -1
  7. package/components/u-subsection/u-subsection.vue +22 -14
  8. package/components/u-swipe-action-item/u-swipe-action-item.vue +18 -1
  9. package/components/u-switch/u-switch.vue +1 -1
  10. package/components/u-tabbar-item/u-tabbar-item.vue +1 -1
  11. package/components/u-tag/u-tag.vue +1 -1
  12. package/index.js +5 -2
  13. package/libs/css/common.scss +3 -0
  14. package/libs/mixin/mpShare.js +15 -13
  15. package/package.json +2 -1
  16. package/types/comps/_common.d.ts +9 -0
  17. package/types/comps/actionSheet.d.ts +121 -0
  18. package/types/comps/album.d.ts +72 -0
  19. package/types/comps/alert.d.ts +55 -0
  20. package/types/comps/avatar.d.ts +85 -0
  21. package/types/comps/avatarGroup.d.ts +62 -0
  22. package/types/comps/backTop.d.ts +74 -0
  23. package/types/comps/badge.d.ts +76 -0
  24. package/types/comps/button.d.ts +169 -0
  25. package/types/comps/calendar.d.ts +164 -0
  26. package/types/comps/cell.d.ts +133 -0
  27. package/types/comps/cellGroup.d.ts +27 -0
  28. package/types/comps/checkbox.d.ts +69 -0
  29. package/types/comps/checkboxGroup.d.ts +93 -0
  30. package/types/comps/code.d.ts +69 -0
  31. package/types/comps/codeInput.d.ts +98 -0
  32. package/types/comps/col.d.ts +43 -0
  33. package/types/comps/collapse.d.ts +52 -0
  34. package/types/comps/collapseItem.d.ts +83 -0
  35. package/types/comps/countDown.d.ts +60 -0
  36. package/types/comps/countTo.d.ts +88 -0
  37. package/types/comps/datetimePicker.d.ts +146 -0
  38. package/types/comps/divider.d.ts +58 -0
  39. package/types/comps/empty.d.ts +72 -0
  40. package/types/comps/form.d.ts +76 -0
  41. package/types/comps/formItem.d.ts +68 -0
  42. package/types/comps/gap.d.ts +35 -0
  43. package/types/comps/grid.d.ts +34 -0
  44. package/types/comps/gridItem.d.ts +28 -0
  45. package/types/comps/icon.d.ts +93 -0
  46. package/types/comps/image.d.ts +119 -0
  47. package/types/comps/indexAnchor.d.ts +38 -0
  48. package/types/comps/indexItem.d.ts +18 -0
  49. package/types/comps/indexList.d.ts +39 -0
  50. package/types/comps/input.d.ts +234 -0
  51. package/types/comps/keyboard.d.ts +125 -0
  52. package/types/comps/line.d.ts +44 -0
  53. package/types/comps/lineProgress.d.ts +51 -0
  54. package/types/comps/link.d.ts +51 -0
  55. package/types/comps/list.d.ts +92 -0
  56. package/types/comps/listItem.d.ts +18 -0
  57. package/types/comps/loadMore.d.ts +108 -0
  58. package/types/comps/loadingIcon.d.ts +68 -0
  59. package/types/comps/loadingPage.d.ts +58 -0
  60. package/types/comps/modal.d.ts +115 -0
  61. package/types/comps/navbar.d.ts +113 -0
  62. package/types/comps/noNetwork.d.ts +40 -0
  63. package/types/comps/noticeBar.d.ts +85 -0
  64. package/types/comps/notify.d.ts +73 -0
  65. package/types/comps/numberBox.d.ts +155 -0
  66. package/types/comps/overlay.d.ts +46 -0
  67. package/types/comps/parse.d.ts +101 -0
  68. package/types/comps/picker.d.ts +115 -0
  69. package/types/comps/popup.d.ts +103 -0
  70. package/types/comps/radio.d.ts +77 -0
  71. package/types/comps/radioGroup.d.ts +97 -0
  72. package/types/comps/rate.d.ts +85 -0
  73. package/types/comps/readMore.d.ts +80 -0
  74. package/types/comps/row.d.ts +34 -0
  75. package/types/comps/scrollList.d.ts +51 -0
  76. package/types/comps/search.d.ts +167 -0
  77. package/types/comps/skeleton.d.ts +70 -0
  78. package/types/comps/slider.d.ts +79 -0
  79. package/types/comps/steps.d.ts +48 -0
  80. package/types/comps/stepsItem.d.ts +41 -0
  81. package/types/comps/sticky.d.ts +48 -0
  82. package/types/comps/subsection.d.ts +64 -0
  83. package/types/comps/swipeAction.d.ts +24 -0
  84. package/types/comps/swipeActionItem.d.ts +58 -0
  85. package/types/comps/swiper.d.ts +142 -0
  86. package/types/comps/swiperIndicator.d.ts +37 -0
  87. package/types/comps/switch.d.ts +73 -0
  88. package/types/comps/tabbar.d.ts +54 -0
  89. package/types/comps/tabbarItem.d.ts +52 -0
  90. package/types/comps/tabs.d.ts +85 -0
  91. package/types/comps/tag.d.ts +93 -0
  92. package/types/comps/text.d.ts +110 -0
  93. package/types/comps/textarea.d.ts +158 -0
  94. package/types/comps/toast.d.ts +59 -0
  95. package/types/comps/tooltip.d.ts +71 -0
  96. package/types/comps/transition.d.ts +61 -0
  97. package/types/comps/upload.d.ts +163 -0
  98. package/types/comps.d.ts +99 -0
  99. package/types/index.d.ts +48 -0
  100. package/types/package.json +26 -0
@@ -0,0 +1,119 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ export declare type ImageMode = 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'heightFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom left' | 'bottom right'
4
+
5
+ declare interface ImageProps {
6
+ /**
7
+ * 图片地址,强烈建议使用绝对或者网络路径
8
+ */
9
+ src?: string
10
+ /**
11
+ * 裁剪模式
12
+ * @default "aspectFill"
13
+ */
14
+ mode?: ImageMode
15
+ /**
16
+ * 宽度,单位任意,如果为数值,默认单位px
17
+ * @default 300
18
+ */
19
+ width?: string | number
20
+ /**
21
+ * 高度,单位任意,如果为数值,默认单位px
22
+ * @default 225
23
+ */
24
+ height?: string | number
25
+ /**
26
+ * 图片形状
27
+ * @default "square"
28
+ */
29
+ shape?: 'circle' | 'square'
30
+ /**
31
+ * 圆角,默认单位px
32
+ * @default 0
33
+ */
34
+ radius?: string | number
35
+ /**
36
+ * 是否懒加载,仅微信小程序、App、百度小程序、字节跳动小程序有效
37
+ * @default true
38
+ */
39
+ lazyLoad?: boolean
40
+ /**
41
+ * 是否开启长按图片显示识别小程序码菜单,仅微信小程序有效
42
+ */
43
+ showMenuByLongpress?: boolean
44
+ /**
45
+ * 加载中的图标,或者小图片
46
+ * @default "photo"
47
+ */
48
+ loadingIcon?: string
49
+ /**
50
+ * 加载失败的图标,或者小图片
51
+ * @default "error-circle"
52
+ */
53
+ errorIcon?: string
54
+ /**
55
+ * 是否显示加载中的图标或者自定义的slot
56
+ * @default true
57
+ */
58
+ showLoading?: boolean
59
+ /**
60
+ * 是否显示加载错误的图标或者自定义的slot
61
+ * @default true
62
+ */
63
+ showError?: boolean
64
+ /**
65
+ * 是否需要淡入效果
66
+ * @default true
67
+ */
68
+ fade?: boolean
69
+ /**
70
+ * 只支持网络资源,只对微信小程序有效
71
+ * @default false
72
+ */
73
+ webp?: boolean
74
+ /**
75
+ * 搭配`fade`参数的过渡时间,单位ms
76
+ * @default 500
77
+ */
78
+ duration?: string | number
79
+ /**
80
+ * 背景颜色,用于深色页面加载图片时,为了和背景色融合
81
+ * @default "#f3f4f6"
82
+ */
83
+ bgColor?: string
84
+ /**
85
+ * 点击图片时触发
86
+ */
87
+ onClick?: () => any
88
+ /**
89
+ * 图片加载失败时触发
90
+ * @param err 错误信息
91
+ */
92
+ onError?: (err: any) => any
93
+ /**
94
+ * 图片加载成功时触发
95
+ */
96
+ onLoad?: () => any
97
+ }
98
+
99
+ declare interface ImageSlots {
100
+ /**
101
+ * 自定义加载中的提示内容
102
+ */
103
+ ['loading']?: () => any
104
+ /**
105
+ * 自定义失败的提示内容
106
+ */
107
+ ['error']?: () => any
108
+ }
109
+
110
+ declare interface _Image {
111
+ new (): {
112
+ $props: AllowedComponentProps &
113
+ VNodeProps &
114
+ ImageProps
115
+ $slots: ImageSlots
116
+ }
117
+ }
118
+
119
+ export declare const Image: _Image
@@ -0,0 +1,38 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface IndexAnchorProps {
4
+ /**
5
+ * 列表锚点文本内容
6
+ */
7
+ text?: string | number
8
+ /**
9
+ * 列表锚点文字颜色
10
+ * @default "#606266"
11
+ */
12
+ color?: string
13
+ /**
14
+ * 列表锚点文字大小,单位默认px
15
+ * @default 14
16
+ */
17
+ size?: string | number
18
+ /**
19
+ * 列表锚点背景颜色
20
+ * @default "#dedede"
21
+ */
22
+ bgColor?: string
23
+ /**
24
+ * 列表锚点高度,单位默认px
25
+ * @default 32
26
+ */
27
+ height?: string | number
28
+ }
29
+
30
+ declare interface _IndexAnchor {
31
+ new (): {
32
+ $props: AllowedComponentProps &
33
+ VNodeProps &
34
+ IndexAnchorProps
35
+ }
36
+ }
37
+
38
+ export declare const IndexAnchor: _IndexAnchor
@@ -0,0 +1,18 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface IndexItemSlots {
4
+ /**
5
+ * 自定义列表内容
6
+ */
7
+ ['default']?: () => any
8
+ }
9
+
10
+ declare interface _IndexItem {
11
+ new (): {
12
+ $props: AllowedComponentProps &
13
+ VNodeProps
14
+ $slots: IndexItemSlots
15
+ }
16
+ }
17
+
18
+ export declare const IndexItem: _IndexItem
@@ -0,0 +1,39 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface IndexListProps {
4
+ /**
5
+ * 右边锚点状态非激活时的颜色
6
+ * @default "#606266"
7
+ */
8
+ inactiveColor?: string
9
+ /**
10
+ * 右边锚点状态激活时的颜色
11
+ * @default "#5677fc"
12
+ */
13
+ activeColor?: string
14
+ /**
15
+ * 索引字符列表,数组
16
+ * @default "A-Z"
17
+ */
18
+ indexList?: (string | number)[]
19
+ /**
20
+ * 是否开启锚点自动吸顶
21
+ * @default true
22
+ */
23
+ sticky?: boolean
24
+ /**
25
+ * 自定义导航栏的高度,单位默认px
26
+ * @default 0
27
+ */
28
+ customNavHeight?: string | number
29
+ }
30
+
31
+ declare interface _IndexList {
32
+ new (): {
33
+ $props: AllowedComponentProps &
34
+ VNodeProps &
35
+ IndexListProps
36
+ }
37
+ }
38
+
39
+ export declare const IndexList: _IndexList
@@ -0,0 +1,234 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface InputProps {
4
+ /**
5
+ * 输入的值
6
+ */
7
+ value?: string | number
8
+ /**
9
+ * 输入框类型,详见[文档](https://www.uviewui.com/components/input.html#%E8%BE%93%E5%85%A5%E6%A1%86%E7%9A%84%E7%B1%BB%E5%9E%8B)
10
+ * @default "text"
11
+ */
12
+ type?: 'text' | 'number' | 'idcard' | 'digit' | 'password'
13
+ /**
14
+ * 是否禁用输入框
15
+ * @default false
16
+ */
17
+ disabled?: boolean
18
+ /**
19
+ * 禁用状态时的背景色
20
+ * @default "#f5f7fa"
21
+ */
22
+ disabledColor?: string
23
+ /**
24
+ * 是否显示清除控件
25
+ * @default false
26
+ */
27
+ clearable?: boolean
28
+ /**
29
+ * 是否密码类型
30
+ * @default false
31
+ */
32
+ password?: boolean
33
+ /**
34
+ * 最大输入长度,设置为 -1 的时候不限制最大长度
35
+ * @default -1
36
+ */
37
+ maxlength?: string | number
38
+ /**
39
+ * 输入框为空时的占位符
40
+ */
41
+ placeholder?: string
42
+ /**
43
+ * 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
44
+ * @default "input-placeholder"
45
+ */
46
+ placeholderClass?: string
47
+ /**
48
+ * 指定placeholder的样式
49
+ * @default "color: #c0c4cc"
50
+ */
51
+ placeholderStyle?: unknown
52
+ /**
53
+ * 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
54
+ * @default false
55
+ */
56
+ showWordLimit?: boolean
57
+ /**
58
+ * 设置右下角按钮的文字
59
+ * @default "done"
60
+ */
61
+ confirmType?: 'send' | 'search' | 'next' | 'go' | 'done'
62
+ /**
63
+ * 点击键盘右下角按钮时是否保持键盘不收起,H5无效
64
+ * @default false
65
+ */
66
+ confirmHold?: boolean
67
+ /**
68
+ * focus时,点击页面的时候不收起键盘,微信小程序有效
69
+ * @default false
70
+ */
71
+ holdKeyboard?: boolean
72
+ /**
73
+ * 自动获取焦点,在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
74
+ * @default false
75
+ */
76
+ focus?: boolean
77
+ /**
78
+ * 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
79
+ * @default false
80
+ */
81
+ autoBlur?: boolean
82
+ /**
83
+ * 是否忽略组件内对文本合成系统事件的处理。为 false 时将触发 compositionstart、compositionend、compositionupdate 事件,且在文本合成期间会触发 input 事件
84
+ * @default true
85
+ */
86
+ ignoreCompositionEvent?: boolean
87
+ /**
88
+ * 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
89
+ * @default false
90
+ */
91
+ disableDefaultPadding?: boolean
92
+ /**
93
+ * 指定focus时光标的位置
94
+ * @default -1
95
+ */
96
+ cursor?: string | number
97
+ /**
98
+ * 输入框聚焦时底部与键盘的距离
99
+ * @default 30
100
+ */
101
+ cursorSpacing?: string | number
102
+ /**
103
+ * 光标起始位置,自动聚集时有效,需与selection-end搭配使用
104
+ * @default -1
105
+ */
106
+ selectionStart?: string | number
107
+ /**
108
+ * 光标结束位置,自动聚集时有效,需与selection-start搭配使用
109
+ * @default -1
110
+ */
111
+ selectionEnd?: string | number
112
+ /**
113
+ * 键盘弹起时,是否自动上推页面
114
+ * @default true
115
+ */
116
+ adjustPosition?: boolean
117
+ /**
118
+ * 输入框内容对齐方式
119
+ * @default "left"
120
+ */
121
+ inputAlign?: 'left' | 'center' | 'right'
122
+ /**
123
+ * 输入框字体的大小
124
+ * @default "15px"
125
+ */
126
+ fontSize?: string | number
127
+ /**
128
+ * 输入框字体颜色
129
+ * @default "#303133"
130
+ */
131
+ color?: string
132
+ /**
133
+ * 输入框前置图标
134
+ */
135
+ prefixIcon?: string
136
+ /**
137
+ * 前置图标样式
138
+ */
139
+ prefixIconStyle?: unknown
140
+ /**
141
+ * 输入框后置图标
142
+ */
143
+ suffixIcon?: string
144
+ /**
145
+ * 后置图标样式
146
+ */
147
+ suffixIconStyle?: unknown
148
+ /**
149
+ * 边框类型,surround-四周边框,bottom-底部边框,none-无边框
150
+ * @default "surround"
151
+ */
152
+ border?: 'surround' | 'bottom' | 'none'
153
+ /**
154
+ * 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
155
+ * @default false
156
+ */
157
+ readonly?: boolean
158
+ /**
159
+ * 输入框形状,circle-圆形,square-方形
160
+ * @default "square"
161
+ */
162
+ shape?: 'square' | 'circle'
163
+ /**
164
+ * 输入过滤或格式化函数(如需兼容微信小程序,则只能通过`setFormatter`方法)
165
+ */
166
+ formatter?: (...args: any) => any
167
+ /**
168
+ * 定义需要用到的外部样式
169
+ */
170
+ customStyle?: unknown
171
+ /**
172
+ * 输入框失去焦点时触发
173
+ * @param value 内容值
174
+ */
175
+ onBlur?: (value: any) => any
176
+ /**
177
+ * 输入框聚焦时触发
178
+ */
179
+ onFocus?: () => any
180
+ /**
181
+ * 点击完成按钮时触发
182
+ * @param value 内容值
183
+ */
184
+ onConfirm?: (value: any) => any
185
+ /**
186
+ * 键盘高度发生变化的时候触发此事件
187
+ */
188
+ onKeyboardheightchange?: () => any
189
+ /**
190
+ * 内容发生变化触发此事件
191
+ * @param value 内容值
192
+ */
193
+ onInput?: (value: any) => any
194
+ /**
195
+ * 内容发生变化触发此事件
196
+ * @param value 内容值
197
+ */
198
+ onChange?: (value: any) => any
199
+ /**
200
+ * 点击清空内容
201
+ */
202
+ onClear?: () => any
203
+ }
204
+
205
+ declare interface InputSlots {
206
+ /**
207
+ * 输入框前置内容,`nuve`环境需`u--input`有效,非`nvue`环境需`u-input`才有效
208
+ */
209
+ ['prefix']?: () => any
210
+ /**
211
+ * 输入框后置内容,`nuve`环境需`u--input`有效,非`nvue`环境需`u-input`才有效
212
+ */
213
+ ['suffix']?: () => any
214
+ }
215
+
216
+ declare interface _Input {
217
+ new (): {
218
+ $props: AllowedComponentProps &
219
+ VNodeProps &
220
+ InputProps
221
+ $slots: InputSlots
222
+ }
223
+ }
224
+
225
+ declare interface _InputRef {
226
+ /**
227
+ * 为兼容微信小程序而暴露的内部方法
228
+ */
229
+ setFormatter: () => void
230
+ }
231
+
232
+ export declare const Input: _Input
233
+
234
+ export declare const InputRef: _InputRef
@@ -0,0 +1,125 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface KeyboardProps {
4
+ /**
5
+ * 键盘的类型,number-数字键盘,card-身份证键盘,car-车牌号键盘
6
+ * @default "car"
7
+ */
8
+ mode?: 'car' | 'number' | 'card'
9
+ /**
10
+ * 是否显示"."按键,只在mode=number时有效
11
+ * @default false
12
+ */
13
+ dotDisabled?: boolean
14
+ /**
15
+ * 是否显示键盘顶部工具条
16
+ * @default true
17
+ */
18
+ tooltip?: boolean
19
+ /**
20
+ * 是否显示工具条中间的提示
21
+ * @default true
22
+ */
23
+ showTips?: boolean
24
+ /**
25
+ * 工具条中间的提示文字,详见[文档](https://www.uviewui.com/components/keyboard.html#%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8)
26
+ */
27
+ tips?: string
28
+ /**
29
+ * 是否显示工具条左边的"取消"按钮
30
+ * @default true
31
+ */
32
+ showCancel?: boolean
33
+ /**
34
+ * 是否显示工具条右边的"完成"按钮
35
+ * @default true
36
+ */
37
+ showConfirm?: boolean
38
+ /**
39
+ * 是否打乱键盘按键的顺序
40
+ * @default false
41
+ */
42
+ random?: boolean
43
+ /**
44
+ * 是否开启底部安全区适配
45
+ * @default false
46
+ */
47
+ safeAreaInsetBottom?: boolean
48
+ /**
49
+ * 是否允许点击遮罩收起键盘(注意:关闭事件需要自行处理,只会在开启closeOnClickOverlay后点击遮罩层执行close回调)
50
+ * @default true
51
+ */
52
+ closeOnClickOverlay?: boolean
53
+ /**
54
+ * 控制键盘的弹出与收起
55
+ * @default true
56
+ */
57
+ show?: boolean
58
+ /**
59
+ * 是否显示遮罩
60
+ * @default true
61
+ */
62
+ overlay?: boolean
63
+ /**
64
+ * 弹出键盘的`z-index`值
65
+ * @default 1075
66
+ */
67
+ zIndex?: string | number
68
+ /**
69
+ * 确认按钮的文字
70
+ * @default "确认"
71
+ */
72
+ confirmText?: string
73
+ /**
74
+ * 取消按钮的文字
75
+ * @default "取消"
76
+ */
77
+ cancelText?: string
78
+ /**
79
+ * 自定义样式
80
+ */
81
+ customStyle?: unknown
82
+ /**
83
+ * `mode`为`car`下,输入文字后,是否自动切换为字母模式
84
+ * @default false
85
+ */
86
+ autoChange?: boolean
87
+ /**
88
+ * 按键被点击(不包含退格键被点击)
89
+ */
90
+ onChange?: () => any
91
+ /**
92
+ * 键盘关闭
93
+ */
94
+ onClose?: () => any
95
+ /**
96
+ * 键盘顶部工具条右边的"完成"按钮被点击
97
+ */
98
+ onConfirm?: () => any
99
+ /**
100
+ * 键盘顶部工具条左边的"取消"按钮被点击
101
+ */
102
+ onCancel?: () => any
103
+ /**
104
+ * 键盘退格键被点击
105
+ */
106
+ onBackspace?: () => any
107
+ }
108
+
109
+ declare interface KeyboardSlots {
110
+ /**
111
+ * 内容将会显示键盘的工具条上面,可以结合MessageInput 验证码输入组件实现类似支付宝输入密码时,上方显示输入内容的功能
112
+ */
113
+ ['default']: () => any
114
+ }
115
+
116
+ declare interface _Keyboard {
117
+ new (): {
118
+ $props: AllowedComponentProps &
119
+ VNodeProps &
120
+ KeyboardProps
121
+ $slots: KeyboardSlots
122
+ }
123
+ }
124
+
125
+ export declare const Keyboard: _Keyboard
@@ -0,0 +1,44 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface LineProps {
4
+ /**
5
+ * 线条的颜色
6
+ * @default "#d6d7d9"
7
+ */
8
+ color?: string
9
+ /**
10
+ * 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带rpx单位的值等
11
+ * @default 100%
12
+ */
13
+ length?: string | number
14
+ /**
15
+ * 线条的方向,`row`-横向,`col`-竖向
16
+ * @default "row"
17
+ */
18
+ direction?: "row" | "col"
19
+ /**
20
+ * 是否显示细边框
21
+ * @default true
22
+ */
23
+ hairline?: boolean
24
+ /**
25
+ * 线条与上下左右元素的间距,字符串形式,如"30rpx"、"20rpx 30rpx",默认单位px
26
+ * @default 0
27
+ */
28
+ margin?: string | number
29
+ /**
30
+ * 是否虚线,false-实线,true-虚线
31
+ * @default false
32
+ */
33
+ dashed?: boolean
34
+ }
35
+
36
+ declare interface _Line {
37
+ new (): {
38
+ $props: AllowedComponentProps &
39
+ VNodeProps &
40
+ LineProps
41
+ }
42
+ }
43
+
44
+ export declare const Line: _Line
@@ -0,0 +1,51 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+
3
+ declare interface LineProgressProps {
4
+ /**
5
+ * 进度条激活部分的颜色
6
+ * @default "#19be6b"
7
+ */
8
+ activeColor?: string
9
+ /**
10
+ * 进度条的底色,默认为灰色
11
+ * @default "#ececec"
12
+ */
13
+ inactiveColor?: string
14
+ /**
15
+ * 进度百分比,数值
16
+ * @default 0
17
+ */
18
+ percentage?: string | number
19
+ /**
20
+ * 是否在进度条内部显示百分比的值
21
+ * @default true
22
+ */
23
+ showText?: boolean
24
+ /**
25
+ * 进度条的高度,默认单位px
26
+ * @default 12
27
+ */
28
+ height?: string | number
29
+ /**
30
+ * 点击触发事件
31
+ */
32
+ onClick?: () => any
33
+ }
34
+
35
+ declare interface LineProgressSlots {
36
+ /**
37
+ * 传入自定义的显示内容,将会覆盖默认显示的百分比值
38
+ */
39
+ ['default']?: (arg: any) => any
40
+ }
41
+
42
+ declare interface _LineProgress {
43
+ new (): {
44
+ $props: AllowedComponentProps &
45
+ VNodeProps &
46
+ LineProgressProps
47
+ $slots: LineProgressSlots
48
+ }
49
+ }
50
+
51
+ export declare const LineProgress: _LineProgress