uview-plus 3.8.117 → 3.8.120
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/changelog.md +38 -0
- package/components/u-datetime-picker/u-datetime-picker.vue +44 -8
- package/components/u-tabbar/u-tabbar.vue +11 -5
- package/components/u-waterfall/u-waterfall.vue +27 -14
- package/package.json +1 -1
- package/types/comps.d.ts +112 -95
- package/types/index.d.ts +129 -0
package/changelog.md
CHANGED
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
## 3.8.120
|
|
2
|
+
fix(types): 组件类型可直接从包名导入,模板提示补齐 u-/u-- 前缀
|
|
3
|
+
|
|
4
|
+
本版仅完善 TypeScript 类型与 IDE 模板提示,不改变组件运行时行为和 API。
|
|
5
|
+
|
|
6
|
+
- `uview-plus` 包入口重新导出 126 个公开组件类型,Props、Slots、Ref 可直接从包名导入,不再依赖 `uview-plus/types/comps/*` 内部路径
|
|
7
|
+
- Ref 类型统一按 `typeof` 导出,避免将源文件中的 const 声明当作类型使用时报 TS2749
|
|
8
|
+
- `GlobalComponents` 同时登记 `up-`、`u-`、`u--` 三种 easycom 前缀,模板中的 `u-button`、`u--button` 写法也能获得组件类型提示
|
|
9
|
+
- 保留一份组件清单,通过模板字面量键改写生成三种前缀,避免清单重复维护
|
|
10
|
+
- 新增 `verify:types-barrel-exports` 回归校验,防止入口类型导出与模板组件登记清单漂移
|
|
11
|
+
|
|
12
|
+
## 3.8.119
|
|
13
|
+
fix: 修复 datetime-picker format 兼容性与 tabbar 边框切页丢失
|
|
14
|
+
|
|
15
|
+
本版修复两个独立问题,均不涉及组件 API 变更。
|
|
16
|
+
|
|
17
|
+
fix: datetime-picker format 兼容库自身的 yyyy-mm-dd 写法,字符串绑定值不再退回 minDate (#537)
|
|
18
|
+
|
|
19
|
+
库内置的日期格式化工具 `timeFormat` 支持 `yyyy-mm-dd` 写法(全小写),但 u-datetime-picker 的 format 解析只识别 `YYYY-MM-DD`(全大写),导致用户按文档示例传入小写 format 时,传入的字符串绑定值无法被正确解析,组件退回到 minDate 而非用户期望的日期。
|
|
20
|
+
|
|
21
|
+
- format 解析逻辑补充小写月日模式 `mm` / `dd`,与库自身的 timeFormat 对齐
|
|
22
|
+
- 保持对原有大写 `MM` / `DD` 的兼容
|
|
23
|
+
- 新增 `verify:datetime-picker-format` 回归校验
|
|
24
|
+
|
|
25
|
+
fix: tabbar 顶部边框改为组件内联绘制,修复切换页面后边框丢失 (#873)
|
|
26
|
+
|
|
27
|
+
u-tabbar 的顶部边框原先靠模板上的全局工具类 `u-border-top` 绘制,组件自身 scoped 样式表没有任何 border 声明。该类只存在于宿主项目的全局样式表,而小程序自定义组件有样式隔离,能否命中取决于宿主引入全局样式的方式,于是出现同一个 tabbar 在首页有边框、切到另一个 tab 页边框消失。
|
|
28
|
+
|
|
29
|
+
- 改为在 tabbarStyle 里内联 borderTopWidth/Style/Color,边框跟着组件走
|
|
30
|
+
- 去掉 borderColor 上用来压全局类 !important 的 hack(nvue/weex 无法解析)
|
|
31
|
+
- 让 borderColor 为空时的主题边框色回退真正生效
|
|
32
|
+
- 新增 `verify:tabbar-border` 回归校验
|
|
33
|
+
|
|
34
|
+
## 3.8.118
|
|
35
|
+
修复 u-waterfall 在强制解锁后旧分配循环误释放新循环分发锁的问题。
|
|
36
|
+
|
|
37
|
+
旧循环在 await 后恢复时,现仅当前运行令牌的持有者可释放分发锁,避免接管循环与旧循环并发分配造成数据重复、列高错乱及回调重复触发。
|
|
38
|
+
|
|
1
39
|
## 3.8.117
|
|
2
40
|
fix: 修复瀑布流分发锁死、u-image 置于 u-swiper 内无法滑动、u-list-item 挂载竞态
|
|
3
41
|
|
|
@@ -63,8 +63,7 @@
|
|
|
63
63
|
import { mpMixin } from '../../libs/mixin/mpMixin';
|
|
64
64
|
import { mixin } from '../../libs/mixin/mixin';
|
|
65
65
|
import dayjs from './dayjs.esm.min.js';
|
|
66
|
-
import { range, error, padZero } from '../../libs/function/index';
|
|
67
|
-
import test from '../../libs/function/test';
|
|
66
|
+
import { range, error, padZero, timeFormat } from '../../libs/function/index';
|
|
68
67
|
/**
|
|
69
68
|
* DatetimePicker 时间日期选择器
|
|
70
69
|
* @description 此选择器用于时间日期
|
|
@@ -72,6 +71,8 @@
|
|
|
72
71
|
* @property {Boolean} show 用于控制选择器的弹出与收起 ( 默认 false )
|
|
73
72
|
* @property {Boolean} showToolbar 是否显示顶部的操作栏 ( 默认 true )
|
|
74
73
|
* @property {String | Number} modelValue 绑定值
|
|
74
|
+
* @property {Boolean} hasInput 是否自带input输入框 ( 默认 false )
|
|
75
|
+
* @property {String} format hasInput模式下输入框的日期显示格式,同时支持 yyyy-mm-dd(uview-plus timeFormat 写法) 与 YYYY-MM-DD(dayjs 写法)
|
|
75
76
|
* @property {String} title 顶部标题
|
|
76
77
|
* @property {String} mode 展示格式 mode=date为日期选择,mode=time为时间选择,mode=year-month为年月选择,mode=datetime为日期时间选择,mode=datehour为日期小时选择,mode=timesecond为时分秒选择,mode=datetimesecond为日期时分秒选择 ( 默认 ‘datetime )
|
|
77
78
|
* @property {Number} maxDate 可选的最大时间 默认值为后10年
|
|
@@ -210,6 +211,16 @@
|
|
|
210
211
|
const value = column[index]
|
|
211
212
|
return value == null ? fallback : value
|
|
212
213
|
},
|
|
214
|
+
// format 有两种写法:uview-plus 自身 timeFormat($u.timeFormat) 的规则(yyyy-mm-dd hh:MM:ss,
|
|
215
|
+
// 小写 y 表示年、MM 表示分钟),以及 dayjs 的规则(YYYY-MM-DD HH:mm:ss)。
|
|
216
|
+
// dayjs 没有小写 y 的 token,以此区分两者:否则按库里通用写法传 'yyyy-mm-dd',
|
|
217
|
+
// dayjs 只认得其中的 mm(分钟)与 dd(星期),会得到 'yyyy-00-Th' 这种结果(issue #537)
|
|
218
|
+
formatByPattern(value, pattern) {
|
|
219
|
+
if (/y/.test(pattern)) {
|
|
220
|
+
return timeFormat(value, pattern)
|
|
221
|
+
}
|
|
222
|
+
return dayjs(value).format(pattern)
|
|
223
|
+
},
|
|
213
224
|
getInputValue(newValue) {
|
|
214
225
|
if (newValue == '' || !newValue || newValue == undefined) {
|
|
215
226
|
this.inputValue = ''
|
|
@@ -219,7 +230,7 @@
|
|
|
219
230
|
this.inputValue = newValue
|
|
220
231
|
} else {
|
|
221
232
|
if (this.format) {
|
|
222
|
-
this.inputValue =
|
|
233
|
+
this.inputValue = this.formatByPattern(newValue, this.format)
|
|
223
234
|
} else {
|
|
224
235
|
let format = ''
|
|
225
236
|
switch (this.mode) {
|
|
@@ -529,14 +540,39 @@
|
|
|
529
540
|
generateArray(start, end) {
|
|
530
541
|
return Array.from(new Array(end + 1).keys()).slice(start)
|
|
531
542
|
},
|
|
543
|
+
// 把绑定值统一解析成毫秒时间戳,识别不出日期时返回null
|
|
544
|
+
// 支持毫秒时间戳(number或纯数字字符串),以及'2024-10-24'、'2024/10/24 15:08:09'这类
|
|
545
|
+
// 文档里写明支持的String绑定值
|
|
546
|
+
parseDateValue(value) {
|
|
547
|
+
if (value === '' || value === null || value === undefined) {
|
|
548
|
+
return null
|
|
549
|
+
}
|
|
550
|
+
if (typeof value === 'number') {
|
|
551
|
+
return Number.isFinite(value) ? value : null
|
|
552
|
+
}
|
|
553
|
+
const text = String(value).trim()
|
|
554
|
+
if (!text) {
|
|
555
|
+
return null
|
|
556
|
+
}
|
|
557
|
+
// 纯数字按时间戳处理,避免dayjs把'1729699200000'当成日期字符串去解析
|
|
558
|
+
if (/^-?\d+$/.test(text)) {
|
|
559
|
+
const timestamp = Number(text)
|
|
560
|
+
return Number.isFinite(timestamp) ? timestamp : null
|
|
561
|
+
}
|
|
562
|
+
const parsed = dayjs(text)
|
|
563
|
+
return parsed.isValid() ? parsed.valueOf() : null
|
|
564
|
+
},
|
|
532
565
|
// 得出合法的时间
|
|
533
566
|
correctValue(value) {
|
|
534
567
|
const isDateMode = !['time', 'timesecond'].includes(this.mode)
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
//
|
|
538
|
-
|
|
539
|
-
|
|
568
|
+
if (isDateMode) {
|
|
569
|
+
// 日期类型统一解析成毫秒时间戳,没有设置合法的当前时间时才使用最小时间。
|
|
570
|
+
// 这里不能用dayjs.unix(value).isValid()判断:dayjs.unix只接受秒级数字,
|
|
571
|
+
// 日期字符串乘1000后是NaN,'2024-10-24'这类合法值会被判为非法并被替换成
|
|
572
|
+
// minDate(默认当前年份-10),选择器于是停在十年前(issue #537)
|
|
573
|
+
const timestamp = this.parseDateValue(value)
|
|
574
|
+
value = timestamp === null ? this.minDate : timestamp
|
|
575
|
+
} else if (!value) {
|
|
540
576
|
// 如果是时间类型,而又没有默认值的话,就用最小时间
|
|
541
577
|
value = this.mode === 'timesecond'
|
|
542
578
|
? `${padZero(this.minHour)}:${padZero(this.minMinute)}:${padZero(this.minSecond)}`
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
ref="u-tabbar__content"
|
|
6
6
|
@touchmove.stop.prevent="noop"
|
|
7
7
|
:class="[
|
|
8
|
-
border && 'u-border-top',
|
|
9
8
|
fixed && 'u-tabbar--fixed',
|
|
10
9
|
`u-tabbar--${styleType}`,
|
|
11
10
|
textMode === 'active' && 'u-tabbar--text-active'
|
|
@@ -67,6 +66,10 @@
|
|
|
67
66
|
}
|
|
68
67
|
},
|
|
69
68
|
computed: {
|
|
69
|
+
// 顶部边框颜色,未指定borderColor时回退到主题边框色
|
|
70
|
+
tabbarBorderColor() {
|
|
71
|
+
return this.borderColor || this.upThemeVar('--up-border-color', '#dadbde')
|
|
72
|
+
},
|
|
70
73
|
tabbarStyle() {
|
|
71
74
|
const style = {
|
|
72
75
|
zIndex: this.zIndex,
|
|
@@ -75,10 +78,13 @@
|
|
|
75
78
|
'--up-tabbar-inactive-bg': this.inactiveBackgroundColor || 'transparent',
|
|
76
79
|
'--up-tabbar-icon-scale': `${this.iconScale}`
|
|
77
80
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
// 顶部边框由组件自身内联样式绘制,不再依赖全局的u-border-top工具类。
|
|
82
|
+
// 小程序自定义组件存在样式隔离,全局类名是否能作用到组件内部节点取决于宿主项目
|
|
83
|
+
// 引入全局样式的方式,会出现同一个tabbar在部分页面有边框、切换页面后边框丢失的问题。
|
|
84
|
+
if (this.border) {
|
|
85
|
+
style.borderTopWidth = '0.5px'
|
|
86
|
+
style.borderTopStyle = 'solid'
|
|
87
|
+
style.borderTopColor = this.tabbarBorderColor
|
|
82
88
|
}
|
|
83
89
|
if (['pill', 'card', 'glow', 'convex'].includes(this.styleType)) {
|
|
84
90
|
style.padding = '8rpx 12rpx 12rpx'
|
|
@@ -99,7 +99,9 @@
|
|
|
99
99
|
distributionQueue: [],
|
|
100
100
|
distributionRunning: false,
|
|
101
101
|
distributionPromise: null,
|
|
102
|
-
distributionGeneration: 0
|
|
102
|
+
distributionGeneration: 0,
|
|
103
|
+
// 每个分配循环持有独立令牌:锁被强制重置后新循环接管,旧循环恢复时只能安静退出
|
|
104
|
+
distributionRunToken: 0
|
|
103
105
|
}
|
|
104
106
|
},
|
|
105
107
|
watch: {
|
|
@@ -266,39 +268,50 @@
|
|
|
266
268
|
async runDistributionQueue() {
|
|
267
269
|
if (this.distributionRunning) return;
|
|
268
270
|
this.distributionRunning = true;
|
|
271
|
+
const runToken = ++this.distributionRunToken;
|
|
269
272
|
try {
|
|
270
273
|
while (this.distributionQueue.length > 0) {
|
|
274
|
+
if (runToken !== this.distributionRunToken) return;
|
|
271
275
|
const task = this.distributionQueue.shift();
|
|
272
276
|
if (task.generation !== this.distributionGeneration) continue;
|
|
273
|
-
await this.distributeData(task.data, task.generation);
|
|
277
|
+
await this.distributeData(task.data, task.generation, runToken);
|
|
274
278
|
}
|
|
275
279
|
} finally {
|
|
276
|
-
|
|
277
|
-
this.
|
|
278
|
-
|
|
279
|
-
this.distributionPromise =
|
|
280
|
+
// 仅当自己仍是当前循环时才释放锁,否则会清掉接管者的运行状态
|
|
281
|
+
if (runToken === this.distributionRunToken) {
|
|
282
|
+
this.distributionRunning = false;
|
|
283
|
+
this.distributionPromise = null;
|
|
284
|
+
if (this.distributionQueue.length > 0) {
|
|
285
|
+
this.distributionPromise = this.runDistributionQueue();
|
|
286
|
+
}
|
|
280
287
|
}
|
|
281
288
|
}
|
|
282
289
|
},
|
|
283
290
|
|
|
284
|
-
//
|
|
285
|
-
|
|
291
|
+
// 数据被重置或分配循环被接管时,当前循环应立即停止写入
|
|
292
|
+
isStaleDistribution(generation, runToken) {
|
|
293
|
+
return generation !== this.distributionGeneration
|
|
294
|
+
|| runToken !== this.distributionRunToken;
|
|
295
|
+
},
|
|
296
|
+
|
|
297
|
+
// 逐项测量并分配数据,代数或令牌变化时立即退出
|
|
298
|
+
async distributeData(newData, generation, runToken) {
|
|
286
299
|
let columnHeights = new Array(this.columnList.length).fill(0);
|
|
287
300
|
for (const item of newData) {
|
|
288
|
-
if (generation
|
|
301
|
+
if (this.isStaleDistribution(generation, runToken)) return;
|
|
289
302
|
columnHeights = await this.getColumnHeights();
|
|
290
|
-
if (generation
|
|
303
|
+
if (this.isStaleDistribution(generation, runToken)) return;
|
|
291
304
|
|
|
292
305
|
const minHeightIndex = this.getMinHeightColumnIndex(columnHeights);
|
|
293
306
|
this.columnList[minHeightIndex].push(item);
|
|
294
307
|
|
|
295
308
|
await sleep(this.addTime);
|
|
296
|
-
if (generation
|
|
309
|
+
if (this.isStaleDistribution(generation, runToken)) return;
|
|
297
310
|
await this.$nextTick();
|
|
298
|
-
if (generation
|
|
311
|
+
if (this.isStaleDistribution(generation, runToken)) return;
|
|
299
312
|
try {
|
|
300
313
|
const rect = await this.$uGetRect(`#u-column-${minHeightIndex}`);
|
|
301
|
-
if (generation
|
|
314
|
+
if (this.isStaleDistribution(generation, runToken)) return;
|
|
302
315
|
if (rect.height) {
|
|
303
316
|
columnHeights[minHeightIndex] = rect.height;
|
|
304
317
|
this.$emit('after-add-one', {
|
|
@@ -310,7 +323,7 @@
|
|
|
310
323
|
// 获取不到列高时,下一个元素会重新测量所有列
|
|
311
324
|
}
|
|
312
325
|
}
|
|
313
|
-
if (generation
|
|
326
|
+
if (this.isStaleDistribution(generation, runToken)) return;
|
|
314
327
|
this.$emit('after-add-all', {
|
|
315
328
|
columnHeights: columnHeights,
|
|
316
329
|
newData: newData
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "uview-plus",
|
|
3
3
|
"name": "uview-plus",
|
|
4
4
|
"displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙跨端移动组件库,组件丰富维护更新稳定。",
|
|
5
|
-
"version": "3.8.
|
|
5
|
+
"version": "3.8.120",
|
|
6
6
|
"description": "零云®uview-plus已兼容vue3支持多语言,120+全面的组件和便捷的工具会让您信手拈来。近期新增拖动排序、条码、图片裁剪、下拉刷新、虚拟列表、签名、Markdown等。",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"uview",
|
package/types/comps.d.ts
CHANGED
|
@@ -1,104 +1,121 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
/**
|
|
2
|
+
* uview-plus 组件登记表,键统一写 `up-` 前缀。
|
|
3
|
+
* easycom 同时支持 `up-` / `u-` / `u--` 三种前缀(见 pages.json 的 easycom.custom),
|
|
4
|
+
* 另两种前缀由下面的 UviewPlusAliasComponents 从这一份改写而来,无需手工维护三份清单。
|
|
5
|
+
*/
|
|
6
|
+
interface UviewPlusComponents {
|
|
7
|
+
// 基础组件
|
|
8
|
+
['up-icon']: typeof import('./comps/icon')['Icon']
|
|
9
|
+
['up-image']: typeof import('./comps/image')['Image']
|
|
10
|
+
['up-button']: typeof import('./comps/button')['Button']
|
|
11
|
+
['up-text']: typeof import('./comps/text')['Text']
|
|
12
|
+
['up-row']: typeof import('./comps/row')['Row']
|
|
13
|
+
['up-col']: typeof import('./comps/col')['Col']
|
|
14
|
+
['up-cell']: typeof import('./comps/cell')['Cell']
|
|
15
|
+
['up-cell-group']: typeof import('./comps/cellGroup')['CellGroup']
|
|
16
|
+
['up-badge']: typeof import('./comps/badge')['Badge']
|
|
17
|
+
['up-tag']: typeof import('./comps/tag')['Tag']
|
|
18
|
+
['up-loading-icon']: typeof import('./comps/loadingIcon')['LoadingIcon']
|
|
19
|
+
['up-loading-page']: typeof import('./comps/loadingPage')['LoadingPage']
|
|
20
|
+
|
|
21
|
+
// 表单组件
|
|
22
|
+
['up-form']: typeof import('./comps/form')['Form']
|
|
23
|
+
['up-form-item']: typeof import('./comps/formItem')['FormItem']
|
|
24
|
+
['up-calendar']: typeof import('./comps/calendar')['Calendar']
|
|
25
|
+
['up-calendar-strip']: typeof import('./comps/calendarStrip')['CalendarStrip']
|
|
26
|
+
['up-keyboard']: typeof import('./comps/keyboard')['Keyboard']
|
|
27
|
+
['up-picker']: typeof import('./comps/picker')['Picker']
|
|
28
|
+
['up-datetime-picker']: typeof import('./comps/datetimePicker')['DatetimePicker']
|
|
29
|
+
['up-rate']: typeof import('./comps/rate')['Rate']
|
|
30
|
+
['up-search']: typeof import('./comps/search')['Search']
|
|
31
|
+
['up-number-box']: typeof import('./comps/numberBox')['NumberBox']
|
|
32
|
+
['up-upload']: typeof import('./comps/upload')['Upload']
|
|
33
|
+
['up-code']: typeof import('./comps/code')['Code']
|
|
34
|
+
['up-input']: typeof import('./comps/input')['Input']
|
|
35
|
+
['up-textarea']: typeof import('./comps/textarea')['Textarea']
|
|
36
|
+
['up-checkbox']: typeof import('./comps/checkbox')['Checkbox']
|
|
37
|
+
['up-checkbox-group']: typeof import('./comps/checkboxGroup')['CheckboxGroup']
|
|
38
|
+
['up-radio']: typeof import('./comps/radio')['Radio']
|
|
39
|
+
['up-radio-group']: typeof import('./comps/radioGroup')['RadioGroup']
|
|
40
|
+
['up-switch']: typeof import('./comps/switch')['Switch']
|
|
41
|
+
['up-slider']: typeof import('./comps/slider')['Slider']
|
|
42
|
+
['up-album']: typeof import('./comps/album')['Album']
|
|
43
|
+
|
|
44
|
+
// 数据组件
|
|
45
|
+
['up-list']: typeof import('./comps/list')['List']
|
|
46
|
+
['up-list-item']: typeof import('./comps/listItem')['ListItem']
|
|
47
|
+
['up-line-progress']: typeof import('./comps/lineProgress')['LineProgress']
|
|
48
|
+
['up-count-down']: typeof import('./comps/countDown')['CountDown']
|
|
49
|
+
['up-count-to']: typeof import('./comps/countTo')['CountTo']
|
|
16
50
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
['up-textarea']: typeof import('./comps/textarea')['Textarea']
|
|
32
|
-
['up-checkbox']: typeof import('./comps/checkbox')['Checkbox']
|
|
33
|
-
['up-checkbox-group']: typeof import('./comps/checkboxGroup')['CheckboxGroup']
|
|
34
|
-
['up-radio']: typeof import('./comps/radio')['Radio']
|
|
35
|
-
['up-radio-group']: typeof import('./comps/radioGroup')['RadioGroup']
|
|
36
|
-
['up-switch']: typeof import('./comps/switch')['Switch']
|
|
37
|
-
['up-slider']: typeof import('./comps/slider')['Slider']
|
|
38
|
-
['up-album']: typeof import('./comps/album')['Album']
|
|
51
|
+
// 反馈组件
|
|
52
|
+
['up-tooltip']: typeof import('./comps/tooltip')['Tooltip']
|
|
53
|
+
['up-guide']: typeof import('./comps/guide')['Guide']
|
|
54
|
+
['up-action-sheet']: typeof import('./comps/actionSheet')['ActionSheet']
|
|
55
|
+
['up-alert']: typeof import('./comps/alert')['Alert']
|
|
56
|
+
['up-toast']: typeof import('./comps/toast')['Toast']
|
|
57
|
+
['up-notice-bar']: typeof import('./comps/noticeBar')['NoticeBar']
|
|
58
|
+
['up-notify']: typeof import('./comps/notify')['Notify']
|
|
59
|
+
['up-swipe-action']: typeof import('./comps/swipeAction')['SwipeAction']
|
|
60
|
+
['up-swipe-action-item']: typeof import('./comps/swipeActionItem')['SwipeActionItem']
|
|
61
|
+
['up-collapse']: typeof import('./comps/collapse')['Collapse']
|
|
62
|
+
['up-collapse-item']: typeof import('./comps/collapseItem')['CollapseItem']
|
|
63
|
+
['up-popup']: typeof import('./comps/popup')['Popup']
|
|
64
|
+
['up-modal']: typeof import('./comps/modal')['Modal']
|
|
39
65
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
66
|
+
// 布局组件
|
|
67
|
+
['up-scroll-list']: typeof import('./comps/scrollList')['ScrollList']
|
|
68
|
+
['up-line']: typeof import('./comps/line')['Line']
|
|
69
|
+
['up-overlay']: typeof import('./comps/overlay')['Overlay']
|
|
70
|
+
['up-no-network']: typeof import('./comps/noNetwork')['NoNetwork']
|
|
71
|
+
['up-grid']: typeof import('./comps/grid')['Grid']
|
|
72
|
+
['up-grid-item']: typeof import('./comps/gridItem')['GridItem']
|
|
73
|
+
['up-swiper']: typeof import('./comps/swiper')['Swiper']
|
|
74
|
+
['up-skeleton']: typeof import('./comps/skeleton')['Skeleton']
|
|
75
|
+
['up-sticky']: typeof import('./comps/sticky')['Sticky']
|
|
76
|
+
['up-divider']: typeof import('./comps/divider')['Divider']
|
|
46
77
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
['up-modal']: typeof import('./comps/modal')['Modal']
|
|
78
|
+
// 导航组件
|
|
79
|
+
['up-tabbar']: typeof import('./comps/tabbar')['Tabbar']
|
|
80
|
+
['up-tabbar-item']: typeof import('./comps/tabbarItem')['TabbarItem']
|
|
81
|
+
['up-back-top']: typeof import('./comps/backTop')['BackTop']
|
|
82
|
+
['up-navbar']: typeof import('./comps/navbar')['Navbar']
|
|
83
|
+
['up-tabs']: typeof import('./comps/tabs')['Tabs']
|
|
84
|
+
['up-subsection']: typeof import('./comps/subsection')['Subsection']
|
|
85
|
+
['up-index-list']: typeof import('./comps/indexList')['IndexList']
|
|
86
|
+
['up-index-item']: typeof import('./comps/indexItem')['IndexItem']
|
|
87
|
+
['up-index-anchor']: typeof import('./comps/indexAnchor')['IndexAnchor']
|
|
88
|
+
['up-steps']: typeof import('./comps/steps')['Steps']
|
|
89
|
+
['up-steps-item']: typeof import('./comps/stepsItem')['StepsItem']
|
|
90
|
+
['up-empty']: typeof import('./comps/empty')['Empty']
|
|
61
91
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
92
|
+
// 其他组件
|
|
93
|
+
['up-parse']: typeof import('./comps/parse')['Parse']
|
|
94
|
+
['up-code-input']: typeof import('./comps/codeInput')['CodeInput']
|
|
95
|
+
['up-loadmore']: typeof import('./comps/loadMore')['LoadMore']
|
|
96
|
+
['up-read-more']: typeof import('./comps/readMore')['ReadMore']
|
|
97
|
+
['up-gap']: typeof import('./comps/gap')['Gap']
|
|
98
|
+
['up-avatar']: typeof import('./comps/avatar')['Avatar']
|
|
99
|
+
['up-avatar-group']: typeof import('./comps/avatarGroup')['AvatarGroup']
|
|
100
|
+
['up-link']: typeof import('./comps/link')['Link']
|
|
101
|
+
['up-transition']: typeof import('./comps/transition')['Transition']
|
|
102
|
+
['up-status-bar']: typeof import('./comps/statusBar')['StatusBar']
|
|
103
|
+
['up-safe-bottom']: typeof import('./comps/safeBottom')['SafeBottom']
|
|
104
|
+
['up-qrcode']: typeof import('./comps/qrcode')['Qrcode']
|
|
105
|
+
}
|
|
73
106
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
['up-subsection']: typeof import('./comps/subsection')['Subsection']
|
|
81
|
-
['up-index-list']: typeof import('./comps/indexList')['IndexList']
|
|
82
|
-
['up-index-item']: typeof import('./comps/indexItem')['IndexItem']
|
|
83
|
-
['up-index-anchor']: typeof import('./comps/indexAnchor')['IndexAnchor']
|
|
84
|
-
['up-steps']: typeof import('./comps/steps')['Steps']
|
|
85
|
-
['up-steps-item']: typeof import('./comps/stepsItem')['StepsItem']
|
|
86
|
-
['up-empty']: typeof import('./comps/empty')['Empty']
|
|
107
|
+
/** 把 `up-xxx` 键改写成 `${P}xxx` 键 */
|
|
108
|
+
type UviewPlusAliasComponents<P extends string> = {
|
|
109
|
+
[K in keyof UviewPlusComponents & string as K extends `up-${infer Name}`
|
|
110
|
+
? `${P}${Name}`
|
|
111
|
+
: never]: UviewPlusComponents[K]
|
|
112
|
+
}
|
|
87
113
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
['up-gap']: typeof import('./comps/gap')['Gap']
|
|
94
|
-
['up-avatar']: typeof import('./comps/avatar')['Avatar']
|
|
95
|
-
['up-avatar-group']: typeof import('./comps/avatarGroup')['AvatarGroup']
|
|
96
|
-
['up-link']: typeof import('./comps/link')['Link']
|
|
97
|
-
['up-transition']: typeof import('./comps/transition')['Transition']
|
|
98
|
-
['up-status-bar']: typeof import('./comps/statusBar')['StatusBar']
|
|
99
|
-
['up-safe-bottom']: typeof import('./comps/safeBottom')['SafeBottom']
|
|
100
|
-
['up-qrcode']: typeof import('./comps/qrcode')['Qrcode']
|
|
101
|
-
}
|
|
114
|
+
declare module 'vue' {
|
|
115
|
+
export interface GlobalComponents
|
|
116
|
+
extends UviewPlusComponents,
|
|
117
|
+
UviewPlusAliasComponents<'u-'>,
|
|
118
|
+
UviewPlusAliasComponents<'u--'> {}
|
|
102
119
|
}
|
|
103
120
|
|
|
104
121
|
export {}
|
package/types/index.d.ts
CHANGED
|
@@ -165,6 +165,135 @@ declare module 'uview-plus' {
|
|
|
165
165
|
export const colorToRgba: $u['colorToRgba']
|
|
166
166
|
export const route: $u['route']
|
|
167
167
|
|
|
168
|
+
// ---- 组件类型:与 types/comps/*.d.ts 同步,勿手工增删 ----
|
|
169
|
+
export type ActionSheetProps = import('./comps/actionSheet')['ActionSheetProps']
|
|
170
|
+
export type AlbumProps = import('./comps/album')['AlbumProps']
|
|
171
|
+
export type AlertProps = import('./comps/alert')['AlertProps']
|
|
172
|
+
export type AvatarProps = import('./comps/avatar')['AvatarProps']
|
|
173
|
+
export type AvatarGroupProps = import('./comps/avatarGroup')['AvatarGroupProps']
|
|
174
|
+
export type BackTopProps = import('./comps/backTop')['BackTopProps']
|
|
175
|
+
export type BackTopSlots = import('./comps/backTop')['BackTopSlots']
|
|
176
|
+
export type BadgeProps = import('./comps/badge')['BadgeProps']
|
|
177
|
+
export type ButtonProps = import('./comps/button')['ButtonProps']
|
|
178
|
+
export type CalendarProps = import('./comps/calendar')['CalendarProps']
|
|
179
|
+
export type CalendarRef = typeof import('./comps/calendar')['CalendarRef']
|
|
180
|
+
export type CalendarStripPayload = import('./comps/calendarStrip')['CalendarStripPayload']
|
|
181
|
+
export type CalendarStripProps = import('./comps/calendarStrip')['CalendarStripProps']
|
|
182
|
+
export type CalendarStripRef = typeof import('./comps/calendarStrip')['CalendarStripRef']
|
|
183
|
+
export type CellProps = import('./comps/cell')['CellProps']
|
|
184
|
+
export type CellSlots = import('./comps/cell')['CellSlots']
|
|
185
|
+
export type CellGroupProps = import('./comps/cellGroup')['CellGroupProps']
|
|
186
|
+
export type CheckboxProps = import('./comps/checkbox')['CheckboxProps']
|
|
187
|
+
export type CheckboxSlots = import('./comps/checkbox')['CheckboxSlots']
|
|
188
|
+
export type CheckboxGroupProps = import('./comps/checkboxGroup')['CheckboxGroupProps']
|
|
189
|
+
export type CodeProps = import('./comps/code')['CodeProps']
|
|
190
|
+
export type CodeRef = typeof import('./comps/code')['CodeRef']
|
|
191
|
+
export type CodeInputProps = import('./comps/codeInput')['CodeInputProps']
|
|
192
|
+
export type ColProps = import('./comps/col')['ColProps']
|
|
193
|
+
export type CollapseProps = import('./comps/collapse')['CollapseProps']
|
|
194
|
+
export type CollapseRef = typeof import('./comps/collapse')['CollapseRef']
|
|
195
|
+
export type CollapseItemProps = import('./comps/collapseItem')['CollapseItemProps']
|
|
196
|
+
export type CollapseItemSlots = import('./comps/collapseItem')['CollapseItemSlots']
|
|
197
|
+
export type CountDownProps = import('./comps/countDown')['CountDownProps']
|
|
198
|
+
export type CountDownRef = typeof import('./comps/countDown')['CountDownRef']
|
|
199
|
+
export type CountToProps = import('./comps/countTo')['CountToProps']
|
|
200
|
+
export type CountToRef = typeof import('./comps/countTo')['CountToRef']
|
|
201
|
+
export type DatetimePickerProps = import('./comps/datetimePicker')['DatetimePickerProps']
|
|
202
|
+
export type DatetimePickerRef = typeof import('./comps/datetimePicker')['DatetimePickerRef']
|
|
203
|
+
export type DividerProps = import('./comps/divider')['DividerProps']
|
|
204
|
+
export type EmptyProps = import('./comps/empty')['EmptyProps']
|
|
205
|
+
export type EmptySlots = import('./comps/empty')['EmptySlots']
|
|
206
|
+
export type FormProps = import('./comps/form')['FormProps']
|
|
207
|
+
export type FormRef = typeof import('./comps/form')['FormRef']
|
|
208
|
+
export type FormItemProps = import('./comps/formItem')['FormItemProps']
|
|
209
|
+
export type FormItemSlots = import('./comps/formItem')['FormItemSlots']
|
|
210
|
+
export type GapProps = import('./comps/gap')['GapProps']
|
|
211
|
+
export type GridProps = import('./comps/grid')['GridProps']
|
|
212
|
+
export type GridItemProps = import('./comps/gridItem')['GridItemProps']
|
|
213
|
+
export type GuideItem = import('./comps/guide')['GuideItem']
|
|
214
|
+
export type GuideProps = import('./comps/guide')['GuideProps']
|
|
215
|
+
export type GuideRef = typeof import('./comps/guide')['GuideRef']
|
|
216
|
+
export type IconProps = import('./comps/icon')['IconProps']
|
|
217
|
+
export type ImageProps = import('./comps/image')['ImageProps']
|
|
218
|
+
export type ImageSlots = import('./comps/image')['ImageSlots']
|
|
219
|
+
export type IndexAnchorProps = import('./comps/indexAnchor')['IndexAnchorProps']
|
|
220
|
+
export type IndexItemSlots = import('./comps/indexItem')['IndexItemSlots']
|
|
221
|
+
export type IndexListProps = import('./comps/indexList')['IndexListProps']
|
|
222
|
+
export type InputProps = import('./comps/input')['InputProps']
|
|
223
|
+
export type InputSlots = import('./comps/input')['InputSlots']
|
|
224
|
+
export type InputRef = typeof import('./comps/input')['InputRef']
|
|
225
|
+
export type KeyboardProps = import('./comps/keyboard')['KeyboardProps']
|
|
226
|
+
export type KeyboardSlots = import('./comps/keyboard')['KeyboardSlots']
|
|
227
|
+
export type LineProps = import('./comps/line')['LineProps']
|
|
228
|
+
export type LineProgressProps = import('./comps/lineProgress')['LineProgressProps']
|
|
229
|
+
export type LineProgressSlots = import('./comps/lineProgress')['LineProgressSlots']
|
|
230
|
+
export type LinkProps = import('./comps/link')['LinkProps']
|
|
231
|
+
export type LinkSlots = import('./comps/link')['LinkSlots']
|
|
232
|
+
export type ListProps = import('./comps/list')['ListProps']
|
|
233
|
+
export type ListItemProps = import('./comps/listItem')['ListItemProps']
|
|
234
|
+
export type LoadMoreProps = import('./comps/loadMore')['LoadMoreProps']
|
|
235
|
+
export type LoadingIconProps = import('./comps/loadingIcon')['LoadingIconProps']
|
|
236
|
+
export type LoadingPageProps = import('./comps/loadingPage')['LoadingPageProps']
|
|
237
|
+
export type ModalProps = import('./comps/modal')['ModalProps']
|
|
238
|
+
export type ModalSlots = import('./comps/modal')['ModalSlots']
|
|
239
|
+
export type NavbarProps = import('./comps/navbar')['NavbarProps']
|
|
240
|
+
export type NavbarSlots = import('./comps/navbar')['NavbarSlots']
|
|
241
|
+
export type NoNetworkProps = import('./comps/noNetwork')['NoNetworkProps']
|
|
242
|
+
export type NoticeBarProps = import('./comps/noticeBar')['NoticeBarProps']
|
|
243
|
+
export type NotifyProps = import('./comps/notify')['NotifyProps']
|
|
244
|
+
export type NotifySlots = import('./comps/notify')['NotifySlots']
|
|
245
|
+
export type NotifyRef = typeof import('./comps/notify')['NotifyRef']
|
|
246
|
+
export type NumberBoxProps = import('./comps/numberBox')['NumberBoxProps']
|
|
247
|
+
export type NumberBoxSlots = import('./comps/numberBox')['NumberBoxSlots']
|
|
248
|
+
export type OverlayProps = import('./comps/overlay')['OverlayProps']
|
|
249
|
+
export type OverlaySlots = import('./comps/overlay')['OverlaySlots']
|
|
250
|
+
export type ParseProps = import('./comps/parse')['ParseProps']
|
|
251
|
+
export type PickerProps = import('./comps/picker')['PickerProps']
|
|
252
|
+
export type PickerRef = typeof import('./comps/picker')['PickerRef']
|
|
253
|
+
export type PopupProps = import('./comps/popup')['PopupProps']
|
|
254
|
+
export type PopupSlots = import('./comps/popup')['PopupSlots']
|
|
255
|
+
export type QrcodeProps = import('./comps/qrcode')['QrcodeProps']
|
|
256
|
+
export type RadioProps = import('./comps/radio')['RadioProps']
|
|
257
|
+
export type RadioSlots = import('./comps/radio')['RadioSlots']
|
|
258
|
+
export type RadioGroupProps = import('./comps/radioGroup')['RadioGroupProps']
|
|
259
|
+
export type RateProps = import('./comps/rate')['RateProps']
|
|
260
|
+
export type ReadMoreProps = import('./comps/readMore')['ReadMoreProps']
|
|
261
|
+
export type ReadMoreRef = typeof import('./comps/readMore')['ReadMoreRef']
|
|
262
|
+
export type RowProps = import('./comps/row')['RowProps']
|
|
263
|
+
export type SafeBottomProps = import('./comps/safeBottom')['SafeBottomProps']
|
|
264
|
+
export type ScrollListProps = import('./comps/scrollList')['ScrollListProps']
|
|
265
|
+
export type SearchProps = import('./comps/search')['SearchProps']
|
|
266
|
+
export type SearchSlots = import('./comps/search')['SearchSlots']
|
|
267
|
+
export type SkeletonProps = import('./comps/skeleton')['SkeletonProps']
|
|
268
|
+
export type SliderProps = import('./comps/slider')['SliderProps']
|
|
269
|
+
export type StatusBarProps = import('./comps/statusBar')['StatusBarProps']
|
|
270
|
+
export type StepsProps = import('./comps/steps')['StepsProps']
|
|
271
|
+
export type StepsItemProps = import('./comps/stepsItem')['StepsItemProps']
|
|
272
|
+
export type StepsItemSlots = import('./comps/stepsItem')['StepsItemSlots']
|
|
273
|
+
export type StickyProps = import('./comps/sticky')['StickyProps']
|
|
274
|
+
export type StickySlots = import('./comps/sticky')['StickySlots']
|
|
275
|
+
export type SubsectionProps = import('./comps/subsection')['SubsectionProps']
|
|
276
|
+
export type SwipeActionProps = import('./comps/swipeAction')['SwipeActionProps']
|
|
277
|
+
export type SwipeActionItemProps = import('./comps/swipeActionItem')['SwipeActionItemProps']
|
|
278
|
+
export type SwiperProps = import('./comps/swiper')['SwiperProps']
|
|
279
|
+
export type SwiperIndicatorProps = import('./comps/swiperIndicator')['SwiperIndicatorProps']
|
|
280
|
+
export type SwitchProps = import('./comps/switch')['SwitchProps']
|
|
281
|
+
export type TabbarProps = import('./comps/tabbar')['TabbarProps']
|
|
282
|
+
export type TabbarItemProps = import('./comps/tabbarItem')['TabbarItemProps']
|
|
283
|
+
export type TabsProps = import('./comps/tabs')['TabsProps']
|
|
284
|
+
export type TagProps = import('./comps/tag')['TagProps']
|
|
285
|
+
export type TextProps = import('./comps/text')['TextProps']
|
|
286
|
+
export type TextareaProps = import('./comps/textarea')['TextareaProps']
|
|
287
|
+
export type TextareaRef = typeof import('./comps/textarea')['TextareaRef']
|
|
288
|
+
export type ToastProps = import('./comps/toast')['ToastProps']
|
|
289
|
+
export type ToastRef = typeof import('./comps/toast')['ToastRef']
|
|
290
|
+
export type TooltipProps = import('./comps/tooltip')['TooltipProps']
|
|
291
|
+
export type TransitionProps = import('./comps/transition')['TransitionProps']
|
|
292
|
+
export type UploadProps = import('./comps/upload')['UploadProps']
|
|
293
|
+
export type UploadSlots = import('./comps/upload')['UploadSlots']
|
|
294
|
+
export type UploadRef = typeof import('./comps/upload')['UploadRef']
|
|
295
|
+
// ---- 组件类型结束 ----
|
|
296
|
+
|
|
168
297
|
global {
|
|
169
298
|
interface Uni {
|
|
170
299
|
$u: $u
|