uview-plus 3.2.3 → 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 (98) hide show
  1. package/changelog.md +7 -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-switch/u-switch.vue +1 -1
  9. package/components/u-tabbar-item/u-tabbar-item.vue +1 -1
  10. package/components/u-tag/u-tag.vue +1 -1
  11. package/index.js +5 -2
  12. package/libs/css/common.scss +3 -0
  13. package/libs/mixin/mpShare.js +15 -13
  14. package/package.json +1 -1
  15. package/types/comps/_common.d.ts +9 -0
  16. package/types/comps/actionSheet.d.ts +121 -0
  17. package/types/comps/album.d.ts +72 -0
  18. package/types/comps/alert.d.ts +55 -0
  19. package/types/comps/avatar.d.ts +85 -0
  20. package/types/comps/avatarGroup.d.ts +62 -0
  21. package/types/comps/backTop.d.ts +74 -0
  22. package/types/comps/badge.d.ts +76 -0
  23. package/types/comps/button.d.ts +169 -0
  24. package/types/comps/calendar.d.ts +164 -0
  25. package/types/comps/cell.d.ts +133 -0
  26. package/types/comps/cellGroup.d.ts +27 -0
  27. package/types/comps/checkbox.d.ts +69 -0
  28. package/types/comps/checkboxGroup.d.ts +93 -0
  29. package/types/comps/code.d.ts +69 -0
  30. package/types/comps/codeInput.d.ts +98 -0
  31. package/types/comps/col.d.ts +43 -0
  32. package/types/comps/collapse.d.ts +52 -0
  33. package/types/comps/collapseItem.d.ts +83 -0
  34. package/types/comps/countDown.d.ts +60 -0
  35. package/types/comps/countTo.d.ts +88 -0
  36. package/types/comps/datetimePicker.d.ts +146 -0
  37. package/types/comps/divider.d.ts +58 -0
  38. package/types/comps/empty.d.ts +72 -0
  39. package/types/comps/form.d.ts +76 -0
  40. package/types/comps/formItem.d.ts +68 -0
  41. package/types/comps/gap.d.ts +35 -0
  42. package/types/comps/grid.d.ts +34 -0
  43. package/types/comps/gridItem.d.ts +28 -0
  44. package/types/comps/icon.d.ts +93 -0
  45. package/types/comps/image.d.ts +119 -0
  46. package/types/comps/indexAnchor.d.ts +38 -0
  47. package/types/comps/indexItem.d.ts +18 -0
  48. package/types/comps/indexList.d.ts +39 -0
  49. package/types/comps/input.d.ts +234 -0
  50. package/types/comps/keyboard.d.ts +125 -0
  51. package/types/comps/line.d.ts +44 -0
  52. package/types/comps/lineProgress.d.ts +51 -0
  53. package/types/comps/link.d.ts +51 -0
  54. package/types/comps/list.d.ts +92 -0
  55. package/types/comps/listItem.d.ts +18 -0
  56. package/types/comps/loadMore.d.ts +108 -0
  57. package/types/comps/loadingIcon.d.ts +68 -0
  58. package/types/comps/loadingPage.d.ts +58 -0
  59. package/types/comps/modal.d.ts +115 -0
  60. package/types/comps/navbar.d.ts +113 -0
  61. package/types/comps/noNetwork.d.ts +40 -0
  62. package/types/comps/noticeBar.d.ts +85 -0
  63. package/types/comps/notify.d.ts +73 -0
  64. package/types/comps/numberBox.d.ts +155 -0
  65. package/types/comps/overlay.d.ts +46 -0
  66. package/types/comps/parse.d.ts +101 -0
  67. package/types/comps/picker.d.ts +115 -0
  68. package/types/comps/popup.d.ts +103 -0
  69. package/types/comps/radio.d.ts +77 -0
  70. package/types/comps/radioGroup.d.ts +97 -0
  71. package/types/comps/rate.d.ts +85 -0
  72. package/types/comps/readMore.d.ts +80 -0
  73. package/types/comps/row.d.ts +34 -0
  74. package/types/comps/scrollList.d.ts +51 -0
  75. package/types/comps/search.d.ts +167 -0
  76. package/types/comps/skeleton.d.ts +70 -0
  77. package/types/comps/slider.d.ts +79 -0
  78. package/types/comps/steps.d.ts +48 -0
  79. package/types/comps/stepsItem.d.ts +41 -0
  80. package/types/comps/sticky.d.ts +48 -0
  81. package/types/comps/subsection.d.ts +64 -0
  82. package/types/comps/swipeAction.d.ts +24 -0
  83. package/types/comps/swipeActionItem.d.ts +58 -0
  84. package/types/comps/swiper.d.ts +142 -0
  85. package/types/comps/swiperIndicator.d.ts +37 -0
  86. package/types/comps/switch.d.ts +73 -0
  87. package/types/comps/tabbar.d.ts +54 -0
  88. package/types/comps/tabbarItem.d.ts +52 -0
  89. package/types/comps/tabs.d.ts +85 -0
  90. package/types/comps/tag.d.ts +93 -0
  91. package/types/comps/text.d.ts +110 -0
  92. package/types/comps/textarea.d.ts +158 -0
  93. package/types/comps/toast.d.ts +59 -0
  94. package/types/comps/tooltip.d.ts +71 -0
  95. package/types/comps/transition.d.ts +61 -0
  96. package/types/comps/upload.d.ts +163 -0
  97. package/types/comps.d.ts +99 -0
  98. package/types/index.d.ts +47 -0
@@ -0,0 +1,163 @@
1
+ import { AllowedComponentProps, VNodeProps } from './_common'
2
+ import { ImageMode } from './image';
3
+
4
+ declare interface UploadProps {
5
+ /**
6
+ * 接受的文件类型,file只支持H5(只有微信小程序才支持把accept配置为all、media)
7
+ * @default "image"
8
+ */
9
+ accept?: 'all' | 'media' | 'image' | 'file' | 'video'
10
+ /**
11
+ * 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
12
+ * @default ["album", "camera"]
13
+ */
14
+ capture?: 'album' | 'camera' | ('album' | 'camera')[]
15
+ /**
16
+ * 当accept为video时生效,是否压缩视频,默认为true
17
+ * @default true
18
+ */
19
+ compressed?: boolean
20
+ /**
21
+ * 当accept为video时生效,可选值为back或front
22
+ * @default "back"
23
+ */
24
+ camera?: 'back' | 'front'
25
+ /**
26
+ * 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
27
+ * @default 60
28
+ */
29
+ maxDuration?: number
30
+ /**
31
+ * 上传区域的图标,只能内置图标
32
+ * @default "camera-fill"
33
+ */
34
+ uploadIcon?: string
35
+ /**
36
+ * 上传区域的图标的颜色
37
+ * @default "#D3D4D6"
38
+ */
39
+ uploadIconColor?: string
40
+ /**
41
+ * 是否启用(显示/隐藏)组件
42
+ */
43
+ useBeforeRead?: boolean
44
+ /**
45
+ * 预览全图
46
+ * @default true
47
+ */
48
+ previewFullImage?: boolean
49
+ /**
50
+ * 最大选择图片的数量
51
+ * @default 52
52
+ */
53
+ maxCount?: string | number
54
+ /**
55
+ * 是否启用(显示/隐藏)组件
56
+ * @default false
57
+ */
58
+ disabled?: boolean
59
+ /**
60
+ * 预览上传的图片时的裁剪模式
61
+ * @default "aspectFill"
62
+ */
63
+ imageMode?: ImageMode
64
+ /**
65
+ * 标识符,可以在回调函数的第二项参数中获取
66
+ * @default "file"
67
+ */
68
+ name?: string
69
+ /**
70
+ * original 原图,compressed 压缩图,默认二者都有,H5无效
71
+ * @default ["original", "compressed"]
72
+ */
73
+ sizeType?: ('original' | 'compressed')[]
74
+ /**
75
+ * 是否开启图片多选,部分安卓机型不支持
76
+ * @default false
77
+ */
78
+ multiple?: boolean
79
+ /**
80
+ * 是否显示删除图片的按钮
81
+ * @default true
82
+ */
83
+ deletable?: boolean
84
+ /**
85
+ * 选择单个文件的最大大小,单位B(byte),默认不限制
86
+ * @default Number.MAX_VALUE
87
+ */
88
+ maxSize?: string | number
89
+ /**
90
+ * 显示已上传的文件列表
91
+ */
92
+ fileList?: any[]
93
+ /**
94
+ * 上传区域的提示文字
95
+ */
96
+ uploadText?: string
97
+ /**
98
+ * 内部预览图片区域和选择图片按钮的区域宽度,单位rpx,不能是百分比,或者`auto`
99
+ * @default 80
100
+ */
101
+ width?: string | number
102
+ /**
103
+ * 内部预览图片区域和选择图片按钮的区域高度,单位rpx,不能是百分比,或者`auto`
104
+ * @default 80
105
+ */
106
+ height?: string | number
107
+ /**
108
+ * 是否在上传完成后展示预览图
109
+ * @default true
110
+ */
111
+ previewImage?: boolean
112
+ /**
113
+ * 读取后的处理函数
114
+ */
115
+ onAfterRead?: (file, lists, name) => any
116
+ /**
117
+ * 读取前的处理函数
118
+ */
119
+ onBeforeRead?: (file, lists, name) => any
120
+ /**
121
+ * 图片大小超出最大允许大小
122
+ */
123
+ onOversize?: (file, lists, name) => any
124
+ /**
125
+ * 全屏预览图片时触发
126
+ */
127
+ onClickPreview?: (file, lists, name) => any
128
+ /**
129
+ * 删除图片
130
+ */
131
+ onDelete?: (index, file, name) => any
132
+ }
133
+
134
+ declare interface UploadSlots {
135
+ /**
136
+ * 自定义上传样式
137
+ */
138
+ ['default']?: () => any
139
+ }
140
+
141
+ declare interface _UploadRef {
142
+ /**
143
+ * 读取后的处理函数
144
+ */
145
+ afterRead: (file, lists, name) => any
146
+ /**
147
+ * 读取前的处理函数
148
+ */
149
+ beforeRead: (file, lists, name) => any
150
+ }
151
+
152
+ declare interface _Upload {
153
+ new (): {
154
+ $props: AllowedComponentProps &
155
+ VNodeProps &
156
+ UploadProps
157
+ $slots: UploadSlots
158
+ }
159
+ }
160
+
161
+ export declare const Upload: _Upload
162
+
163
+ export declare const UploadRef: _UploadRef
@@ -0,0 +1,99 @@
1
+ declare module '@vue/runtime-core' {
2
+ export interface GlobalComponents {
3
+ // 基础组件
4
+ ['up-icon']: typeof import('./comps/icon')['Icon']
5
+ ['up-image']: typeof import('./comps/image')['Image']
6
+ ['up-button']: typeof import('./comps/button')['Button']
7
+ ['up-text']: typeof import('./comps/text')['Text']
8
+ ['up-row']: typeof import('./comps/row')['Row']
9
+ ['up-col']: typeof import('./comps/col')['Col']
10
+ ['up-cell']: typeof import('./comps/cell')['Cell']
11
+ ['up-cell-group']: typeof import('./comps/cellGroup')['CellGroup']
12
+ ['up-badge']: typeof import('./comps/badge')['Badge']
13
+ ['up-tag']: typeof import('./comps/tag')['Tag']
14
+ ['up-loading-icon']: typeof import('./comps/loadingIcon')['LoadingIcon']
15
+ ['up-loading-page']: typeof import('./comps/loadingPage')['LoadingPage']
16
+
17
+ // 表单组件
18
+ ['up-form']: typeof import('./comps/form')['Form']
19
+ ['up-form-item']: typeof import('./comps/formItem')['FormItem']
20
+ ['up-calendar']: typeof import('./comps/calendar')['Calendar']
21
+ ['up-keyboard']: typeof import('./comps/keyboard')['Keyboard']
22
+ ['up-picker']: typeof import('./comps/picker')['Picker']
23
+ ['up-datetime-picker']: typeof import('./comps/datetimePicker')['DatetimePicker']
24
+ ['up-rate']: typeof import('./comps/rate')['Rate']
25
+ ['up-search']: typeof import('./comps/search')['Search']
26
+ ['up-number-box']: typeof import('./comps/numberBox')['NumberBox']
27
+ ['up-upload']: typeof import('./comps/upload')['Upload']
28
+ ['up-code']: typeof import('./comps/code')['Code']
29
+ ['up-input']: typeof import('./comps/input')['Input']
30
+ ['up-textarea']: typeof import('./comps/textarea')['Textarea']
31
+ ['up-checkbox']: typeof import('./comps/checkbox')['Checkbox']
32
+ ['up-checkbox-group']: typeof import('./comps/checkboxGroup')['CheckboxGroup']
33
+ ['up-radio']: typeof import('./comps/radio')['Radio']
34
+ ['up-radio-group']: typeof import('./comps/radioGroup')['RadioGroup']
35
+ ['up-switch']: typeof import('./comps/switch')['Switch']
36
+ ['up-slider']: typeof import('./comps/slider')['Slider']
37
+ ['up-album']: typeof import('./comps/album')['Album']
38
+
39
+ // 数据组件
40
+ ['up-list']: typeof import('./comps/list')['List']
41
+ ['up-list-item']: typeof import('./comps/listItem')['ListItem']
42
+ ['up-line-progress']: typeof import('./comps/lineProgress')['LineProgress']
43
+ ['up-count-down']: typeof import('./comps/countDown')['CountDown']
44
+ ['up-count-to']: typeof import('./comps/countTo')['CountTo']
45
+
46
+ // 反馈组件
47
+ ['up-tooltip']: typeof import('./comps/tooltip')['Tooltip']
48
+ ['up-action-sheet']: typeof import('./comps/actionSheet')['ActionSheet']
49
+ ['up-alert']: typeof import('./comps/alert')['Alert']
50
+ ['up-toast']: typeof import('./comps/toast')['Toast']
51
+ ['up-notice-bar']: typeof import('./comps/noticeBar')['NoticeBar']
52
+ ['up-notify']: typeof import('./comps/notify')['Notify']
53
+ ['up-swipe-action']: typeof import('./comps/swipeAction')['SwipeAction']
54
+ ['up-swipe-action-item']: typeof import('./comps/swipeActionItem')['SwipeActionItem']
55
+ ['up-collapse']: typeof import('./comps/collapse')['Collapse']
56
+ ['up-collapse-item']: typeof import('./comps/collapseItem')['CollapseItem']
57
+ ['up-popup']: typeof import('./comps/popup')['Popup']
58
+ ['up-modal']: typeof import('./comps/modal')['Modal']
59
+
60
+ // 布局组件
61
+ ['up-scroll-list']: typeof import('./comps/scrollList')['ScrollList']
62
+ ['up-line']: typeof import('./comps/line')['Line']
63
+ ['up-overlay']: typeof import('./comps/overlay')['Overlay']
64
+ ['up-no-network']: typeof import('./comps/noNetwork')['NoNetwork']
65
+ ['up-grid']: typeof import('./comps/grid')['Grid']
66
+ ['up-grid-item']: typeof import('./comps/gridItem')['GridItem']
67
+ ['up-swiper']: typeof import('./comps/swiper')['Swiper']
68
+ ['up-skeleton']: typeof import('./comps/skeleton')['Skeleton']
69
+ ['up-sticky']: typeof import('./comps/sticky')['Sticky']
70
+ ['up-divider']: typeof import('./comps/divider')['Divider']
71
+
72
+ // 导航组件
73
+ ['up-tabbar']: typeof import('./comps/tabbar')['Tabbar']
74
+ ['up-tabbar-item']: typeof import('./comps/tabbarItem')['TabbarItem']
75
+ ['up-back-top']: typeof import('./comps/backTop')['BackTop']
76
+ ['up-navbar']: typeof import('./comps/navbar')['Navbar']
77
+ ['up-tabs']: typeof import('./comps/tabs')['Tabs']
78
+ ['up-subsection']: typeof import('./comps/subsection')['Subsection']
79
+ ['up-index-list']: typeof import('./comps/indexList')['IndexList']
80
+ ['up-index-item']: typeof import('./comps/indexItem')['IndexItem']
81
+ ['up-index-anchor']: typeof import('./comps/indexAnchor')['IndexAnchor']
82
+ ['up-steps']: typeof import('./comps/steps')['Steps']
83
+ ['up-steps-item']: typeof import('./comps/stepsItem')['StepsItem']
84
+ ['up-empty']: typeof import('./comps/empty')['Empty']
85
+
86
+ // 其他组件
87
+ ['up-parse']: typeof import('./comps/parse')['Parse']
88
+ ['up-code-input']: typeof import('./comps/codeInput')['CodeInput']
89
+ ['up-load-more']: typeof import('./comps/loadMore')['LoadMore']
90
+ ['up-read-more']: typeof import('./comps/readMore')['ReadMore']
91
+ ['up-gap']: typeof import('./comps/gap')['Gap']
92
+ ['up-avatar']: typeof import('./comps/avatar')['Avatar']
93
+ ['up-avatar-group']: typeof import('./comps/avatarGroup')['AvatarGroup']
94
+ ['up-link']: typeof import('./comps/link')['Link']
95
+ ['up-transition']: typeof import('./comps/transition')['Transition']
96
+ }
97
+ }
98
+
99
+ export {}
@@ -0,0 +1,47 @@
1
+ /// <reference path="./comps.d.ts" />
2
+ declare module 'uview-plus' {
3
+ export function install(): void //必要
4
+ interface test {
5
+ /** 邮箱格式校验 */
6
+ email(email: string): boolean
7
+ }
8
+ interface $u {
9
+ route: {},
10
+ colorGradient: {},
11
+ hexToRgb: {},
12
+ rgbToHex: {},
13
+ colorToRgba: {},
14
+ test: test,
15
+ type: {},
16
+ http: {},
17
+ config: {},
18
+ zIndex: {},
19
+ debounce: {},
20
+ throttle: {},
21
+ mixin: {},
22
+ mpMixin: {},
23
+ props: {},
24
+ color: {},
25
+ platform: {},
26
+ }
27
+
28
+ global {
29
+ interface Uni {
30
+ $u: $u
31
+ }
32
+ }
33
+ }
34
+ declare type UniCountDownRef = typeof import('./comps/countDown')['CountDownRef']
35
+ declare type UniCountToRef = typeof import('./comps/countTo')['CountToRef']
36
+ declare type UniReadMoreRef = typeof import('./comps/readMore')['ReadMoreRef']
37
+ declare type UniToastRef = typeof import('./comps/toast')['ToastRef']
38
+ declare type UniCollapseRef = typeof import('./comps/collapse')['CollapseRef']
39
+ declare type UniNotifyRef = typeof import('./comps/notify')['NotifyRef']
40
+ declare type UniCodeRef = typeof import('./comps/code')['CodeRef']
41
+ declare type UniInputRef = typeof import('./comps/input')['InputRef']
42
+ declare type UniUploadRef = typeof import('./comps/upload')['UploadRef']
43
+ declare type UniDatetimePickerRef = typeof import('./comps/datetimePicker')['DatetimePickerRef']
44
+ declare type UniPickerRef = typeof import('./comps/picker')['PickerRef']
45
+ declare type UniCalendarRef = typeof import('./comps/calendar')['CalendarRef']
46
+ declare type UniTextareaRef = typeof import('./comps/textarea')['TextareaRef']
47
+ declare type UniFormRef = typeof import('./comps/form')['FormRef']