uview-ultra 4.5.75 → 4.5.78
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 +73 -0
- package/components/up-audio/audio-pool.js +2 -0
- package/components/up-audio/audio-pool.uts +2 -0
- package/components/up-audio/audio.js +19 -0
- package/components/up-audio/audio.uts +19 -0
- package/components/up-audio/props.js +43 -0
- package/components/up-audio/up-audio.uvue +418 -0
- package/components/up-audio/up-audio.vue +315 -0
- package/components/up-lottie/up-lottie.uvue +16 -2
- package/components/up-navbar/up-navbar.vue +7 -1
- package/components/up-parse/node/node.vue +21 -3
- package/components/up-tabs/up-tabs.vue +13 -1
- package/components/up-video/video.uts +1 -2
- package/libs/config/props.js +2 -0
- package/libs/function/index.js +14 -1
- package/package.json +4 -4
- package/types/comps/audio.d.ts +57 -0
- package/types/comps.d.ts +121 -120
- package/types/index.d.ts +383 -382
package/types/index.d.ts
CHANGED
|
@@ -1,382 +1,383 @@
|
|
|
1
|
-
/// <reference path="./comps.d.ts" />
|
|
2
|
-
declare module 'uview-ultra' {
|
|
3
|
-
export function install(): void //必要
|
|
4
|
-
export function t(value: string, params?: Record<string, string | number>): string;
|
|
5
|
-
export function registerLocale(locale: string, messages: Record<string, string>): void;
|
|
6
|
-
export function registerLocale(localeMap: Record<string, Record<string, string>>): void;
|
|
7
|
-
export function hasLocale(locale: string): boolean;
|
|
8
|
-
export function getLocale(): string;
|
|
9
|
-
export function setLocale(locale: string): string;
|
|
10
|
-
export const en: Record<string, string>;
|
|
11
|
-
export const es: Record<string, string>;
|
|
12
|
-
export const fr: Record<string, string>;
|
|
13
|
-
export const de: Record<string, string>;
|
|
14
|
-
export const ko: Record<string, string>;
|
|
15
|
-
export const ja: Record<string, string>;
|
|
16
|
-
export const ru: Record<string, string>;
|
|
17
|
-
export const th: Record<string, string>;
|
|
18
|
-
export const zhHans: Record<string, string>;
|
|
19
|
-
export const zhHant: Record<string, string>;
|
|
20
|
-
export const allLocales: Record<string, Record<string, string>>;
|
|
21
|
-
export const i18n: {
|
|
22
|
-
settings: {
|
|
23
|
-
lang: string;
|
|
24
|
-
locales: Record<string, Record<string, string>>;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
interface test {
|
|
28
|
-
/** 邮箱格式校验 */
|
|
29
|
-
email(email: string): boolean
|
|
30
|
-
/** 手机号校验 */
|
|
31
|
-
mobile(phone: number): boolean;
|
|
32
|
-
/** url路径验证 */
|
|
33
|
-
url(value: string): boolean;
|
|
34
|
-
/** 验证日期格式 */
|
|
35
|
-
date(value: string | number): boolean;
|
|
36
|
-
/** 验证ISO类型的日期格式 YYYY-MM-DD | YYYY/MM/DD */
|
|
37
|
-
dateISO(value: string): boolean;
|
|
38
|
-
/** 验证十进制数字 */
|
|
39
|
-
number(value: number): boolean;
|
|
40
|
-
/** 验证字符串 */
|
|
41
|
-
string(value: string): boolean;
|
|
42
|
-
/** 验证整数 */
|
|
43
|
-
digits(value: number): boolean;
|
|
44
|
-
/** 验证身份证号码 */
|
|
45
|
-
idCard(value: string | number): boolean;
|
|
46
|
-
/** 是否车牌号,空值直接返回false */
|
|
47
|
-
carNo(value: string | null): boolean;
|
|
48
|
-
/** 金额,只允许2位小数 */
|
|
49
|
-
amount(value: string | number): boolean;
|
|
50
|
-
/** 校验是否是中文 */
|
|
51
|
-
chinese(value: any): boolean;
|
|
52
|
-
/** 校验是否是字母 */
|
|
53
|
-
letter(value: any): boolean;
|
|
54
|
-
/** 校验字母或者数字 */
|
|
55
|
-
enOrNum(value: any): boolean;
|
|
56
|
-
/** 验证是否包含某个值 */
|
|
57
|
-
contains(source: string, value: string): boolean;
|
|
58
|
-
/** 验证一个值范围[min, max] */
|
|
59
|
-
range(value: string, between: number[]): boolean;
|
|
60
|
-
/** 验证一个长度范围[min, max] */
|
|
61
|
-
rangeLength(value: string, between: number[]): boolean;
|
|
62
|
-
/** 是否固定电话 */
|
|
63
|
-
landline(value: string | number): boolean;
|
|
64
|
-
/** 判断是否为空 */
|
|
65
|
-
empty(value: string | number | undefined | boolean | object | null): boolean;
|
|
66
|
-
/** 是否json字符串 */
|
|
67
|
-
jsonString(value: string): boolean;
|
|
68
|
-
/** 是否数组 */
|
|
69
|
-
array(value: any): boolean;
|
|
70
|
-
/** 是否对象 */
|
|
71
|
-
object(value: any): boolean;
|
|
72
|
-
/** 是否短信验证码 */
|
|
73
|
-
code(value: any, len: number): boolean;
|
|
74
|
-
/** 是否函数方法 */
|
|
75
|
-
func(value: any): boolean;
|
|
76
|
-
/** 是否promise对象 */
|
|
77
|
-
promise(value: any): boolean;
|
|
78
|
-
/** 是否图片格式 */
|
|
79
|
-
image(value: string): boolean;
|
|
80
|
-
/** 是否视频格式 */
|
|
81
|
-
video(value: string): boolean;
|
|
82
|
-
/** 是否为正则对象 */
|
|
83
|
-
regExp(value: any): boolean;
|
|
84
|
-
}
|
|
85
|
-
interface RouteParam {
|
|
86
|
-
type: 'navigateTo' | 'redirect' | 'switchTab' | 'reLaunch' | 'navigateBack';
|
|
87
|
-
/** 路由地址 */
|
|
88
|
-
url: string;
|
|
89
|
-
/** navigateBack页面后退时,回退的层数 */
|
|
90
|
-
delta?: number;
|
|
91
|
-
/** 传递的参数 */
|
|
92
|
-
params?: {};
|
|
93
|
-
/** 窗口动画,只在APP有效 */
|
|
94
|
-
animationType?: string;
|
|
95
|
-
/** 窗口动画持续时间,单位毫秒,只在APP有效 */
|
|
96
|
-
animationDuration?: number;
|
|
97
|
-
/** 是否需要拦截 */
|
|
98
|
-
intercept?: boolean;
|
|
99
|
-
}
|
|
100
|
-
interface Config {
|
|
101
|
-
v: string;
|
|
102
|
-
version: string;
|
|
103
|
-
color: Partial<Color>;
|
|
104
|
-
unit: 'px' | 'rpx';
|
|
105
|
-
nativeThemeSync: boolean;
|
|
106
|
-
iconUrl: string;
|
|
107
|
-
customIcon: {
|
|
108
|
-
family: string;
|
|
109
|
-
url: string;
|
|
110
|
-
};
|
|
111
|
-
customIcons: {
|
|
112
|
-
[key: string]: string;
|
|
113
|
-
};
|
|
114
|
-
loadFontOnce: boolean;
|
|
115
|
-
interceptor: {
|
|
116
|
-
navbarLeftClick: ((navbar: any) => void) | null;
|
|
117
|
-
};
|
|
118
|
-
themeMode?: 'light' | 'dark';
|
|
119
|
-
}
|
|
120
|
-
interface Color {
|
|
121
|
-
primary: string,
|
|
122
|
-
info: string,
|
|
123
|
-
default: string,
|
|
124
|
-
warning: string,
|
|
125
|
-
error: string,
|
|
126
|
-
success: string,
|
|
127
|
-
mainColor: string,
|
|
128
|
-
contentColor: string,
|
|
129
|
-
tipsColor: string,
|
|
130
|
-
lightColor: string,
|
|
131
|
-
borderColor: string,
|
|
132
|
-
bgColor?: string,
|
|
133
|
-
disabledColor?: string
|
|
134
|
-
}
|
|
135
|
-
interface GlobalConfig {
|
|
136
|
-
config: Partial<Config>;
|
|
137
|
-
props: {};
|
|
138
|
-
}
|
|
139
|
-
interface $u {
|
|
140
|
-
route: (url: string | RouteParam) => void;
|
|
141
|
-
/**
|
|
142
|
-
* 求两个颜色之间的渐变值
|
|
143
|
-
* @param {string} startColor 开始的颜色
|
|
144
|
-
* @param {string} endColor 结束的颜色
|
|
145
|
-
* @param {number} step 颜色等分的份额
|
|
146
|
-
*/
|
|
147
|
-
colorGradient: (startColor: string, endColor: string, step: number) => any[];
|
|
148
|
-
/**
|
|
149
|
-
* 将hex表示方式转换为rgb
|
|
150
|
-
* @param color "#000000"-> "rgb(0,0,0)" | "rgb(0,0,0)" -> "#000000"
|
|
151
|
-
* @param str 是否返回颜色数组 true -> 不返回
|
|
152
|
-
* @returns
|
|
153
|
-
*/
|
|
154
|
-
hexToRgb: (color: string, str?: boolean) => any[];
|
|
155
|
-
/**
|
|
156
|
-
* 将rgb表示方式转换为hex
|
|
157
|
-
*/
|
|
158
|
-
rgbToHex: (color: string) => string;
|
|
159
|
-
/**
|
|
160
|
-
* 十六进制转换为rgb或rgba
|
|
161
|
-
* @param color
|
|
162
|
-
* @param alpha 透明度
|
|
163
|
-
* @returns rgba(255,255,255,0.5)字符串
|
|
164
|
-
*/
|
|
165
|
-
colorToRgba: (color: string, alpha: number) => string;
|
|
166
|
-
test: test;
|
|
167
|
-
type: {},
|
|
168
|
-
http: {},
|
|
169
|
-
config: Config;
|
|
170
|
-
zIndex: {
|
|
171
|
-
toast: number;
|
|
172
|
-
noNetwork: number;
|
|
173
|
-
// popup包含popup,actionsheet,keyboard,picker的值
|
|
174
|
-
popup: number;
|
|
175
|
-
mask: number;
|
|
176
|
-
navbar: number;
|
|
177
|
-
topTips: number;
|
|
178
|
-
sticky: number;
|
|
179
|
-
indexListSticky: number;
|
|
180
|
-
},
|
|
181
|
-
debounce: (func, wait, immediate) => void;
|
|
182
|
-
throttle: (func, wait, immediate) => void;
|
|
183
|
-
calc: Record<string, (...args: any[]) => any>;
|
|
184
|
-
digit: Record<string, (...args: any[]) => any>;
|
|
185
|
-
i18n: {
|
|
186
|
-
settings: {
|
|
187
|
-
lang: string;
|
|
188
|
-
locales: Record<string, Record<string, string>>;
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
t: (value: string, params?: Record<string, string | number>) => string;
|
|
192
|
-
rootToast: (options?: string | { message?: string; title?: string; duration?: number; [key: string]: any }) => void;
|
|
193
|
-
setRootToastRef: (ref?: any) => void;
|
|
194
|
-
rootNotify: (options?: string | { message?: string; title?: string; duration?: number; [key: string]: any }) => void;
|
|
195
|
-
setRootNotifyRef: (ref?: any) => void;
|
|
196
|
-
props: {},
|
|
197
|
-
color: Color;
|
|
198
|
-
platform: string;
|
|
199
|
-
theme: {
|
|
200
|
-
preference: 'system' | 'light' | 'dark';
|
|
201
|
-
mode: 'light' | 'dark';
|
|
202
|
-
version: number;
|
|
203
|
-
vars: Record<string, string>;
|
|
204
|
-
};
|
|
205
|
-
setTheme: (mode?: 'light' | 'dark') => any;
|
|
206
|
-
setThemePreference: (mode?: 'system' | 'light' | 'dark') => any;
|
|
207
|
-
getThemePreference: () => 'system' | 'light' | 'dark';
|
|
208
|
-
getSystemTheme: () => 'light' | 'dark';
|
|
209
|
-
getThemeVars: (mode?: 'light' | 'dark') => Record<string, string>;
|
|
210
|
-
getThemeTabBarStyle: () => {
|
|
211
|
-
color: string;
|
|
212
|
-
selectedColor: string;
|
|
213
|
-
backgroundColor: string;
|
|
214
|
-
borderStyle: string;
|
|
215
|
-
};
|
|
216
|
-
applyNativeThemeUI: () => void;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
export function setConfig(config: Partial<GlobalConfig>): void;
|
|
220
|
-
|
|
221
|
-
// ---- 组件类型:与 types/comps/*.d.ts 同步,勿手工增删 ----
|
|
222
|
-
export type ActionSheetProps = import('./comps/actionSheet')['ActionSheetProps']
|
|
223
|
-
export type AlbumProps = import('./comps/album')['AlbumProps']
|
|
224
|
-
export type AlertProps = import('./comps/alert')['AlertProps']
|
|
225
|
-
export type
|
|
226
|
-
export type
|
|
227
|
-
export type
|
|
228
|
-
export type
|
|
229
|
-
export type
|
|
230
|
-
export type
|
|
231
|
-
export type
|
|
232
|
-
export type
|
|
233
|
-
export type
|
|
234
|
-
export type
|
|
235
|
-
export type
|
|
236
|
-
export type
|
|
237
|
-
export type
|
|
238
|
-
export type
|
|
239
|
-
export type
|
|
240
|
-
export type
|
|
241
|
-
export type
|
|
242
|
-
export type
|
|
243
|
-
export type
|
|
244
|
-
export type
|
|
245
|
-
export type
|
|
246
|
-
export type
|
|
247
|
-
export type
|
|
248
|
-
export type
|
|
249
|
-
export type
|
|
250
|
-
export type
|
|
251
|
-
export type
|
|
252
|
-
export type
|
|
253
|
-
export type
|
|
254
|
-
export type
|
|
255
|
-
export type
|
|
256
|
-
export type
|
|
257
|
-
export type
|
|
258
|
-
export type
|
|
259
|
-
export type
|
|
260
|
-
export type
|
|
261
|
-
export type
|
|
262
|
-
export type
|
|
263
|
-
export type
|
|
264
|
-
export type
|
|
265
|
-
export type
|
|
266
|
-
export type
|
|
267
|
-
export type
|
|
268
|
-
export type
|
|
269
|
-
export type
|
|
270
|
-
export type
|
|
271
|
-
export type
|
|
272
|
-
export type
|
|
273
|
-
export type
|
|
274
|
-
export type
|
|
275
|
-
export type
|
|
276
|
-
export type
|
|
277
|
-
export type
|
|
278
|
-
export type
|
|
279
|
-
export type
|
|
280
|
-
export type
|
|
281
|
-
export type
|
|
282
|
-
export type
|
|
283
|
-
export type
|
|
284
|
-
export type
|
|
285
|
-
export type
|
|
286
|
-
export type
|
|
287
|
-
export type
|
|
288
|
-
export type
|
|
289
|
-
export type
|
|
290
|
-
export type
|
|
291
|
-
export type
|
|
292
|
-
export type
|
|
293
|
-
export type
|
|
294
|
-
export type
|
|
295
|
-
export type
|
|
296
|
-
export type
|
|
297
|
-
export type
|
|
298
|
-
export type
|
|
299
|
-
export type
|
|
300
|
-
export type
|
|
301
|
-
export type
|
|
302
|
-
export type
|
|
303
|
-
export type
|
|
304
|
-
export type
|
|
305
|
-
export type
|
|
306
|
-
export type
|
|
307
|
-
export type
|
|
308
|
-
export type
|
|
309
|
-
export type
|
|
310
|
-
export type
|
|
311
|
-
export type
|
|
312
|
-
export type
|
|
313
|
-
export type
|
|
314
|
-
export type
|
|
315
|
-
export type
|
|
316
|
-
export type
|
|
317
|
-
export type
|
|
318
|
-
export type
|
|
319
|
-
export type
|
|
320
|
-
export type
|
|
321
|
-
export type
|
|
322
|
-
export type
|
|
323
|
-
export type
|
|
324
|
-
export type
|
|
325
|
-
export type
|
|
326
|
-
export type
|
|
327
|
-
export type
|
|
328
|
-
export type
|
|
329
|
-
export type
|
|
330
|
-
export type
|
|
331
|
-
export type
|
|
332
|
-
export type
|
|
333
|
-
export type
|
|
334
|
-
export type
|
|
335
|
-
export type
|
|
336
|
-
export type
|
|
337
|
-
export type
|
|
338
|
-
export type
|
|
339
|
-
export type
|
|
340
|
-
export type
|
|
341
|
-
export type
|
|
342
|
-
export type
|
|
343
|
-
export type
|
|
344
|
-
export type
|
|
345
|
-
export type
|
|
346
|
-
export type
|
|
347
|
-
export type
|
|
348
|
-
export type
|
|
349
|
-
export type
|
|
350
|
-
export type
|
|
351
|
-
export type
|
|
352
|
-
export type
|
|
353
|
-
export type
|
|
354
|
-
export type
|
|
355
|
-
export type
|
|
356
|
-
export type
|
|
357
|
-
export type
|
|
358
|
-
export type
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
declare type
|
|
369
|
-
declare type
|
|
370
|
-
declare type
|
|
371
|
-
declare type
|
|
372
|
-
declare type
|
|
373
|
-
declare type
|
|
374
|
-
declare type
|
|
375
|
-
declare type
|
|
376
|
-
declare type
|
|
377
|
-
declare type
|
|
378
|
-
declare type
|
|
379
|
-
declare type
|
|
380
|
-
declare type
|
|
381
|
-
declare type
|
|
382
|
-
declare type
|
|
1
|
+
/// <reference path="./comps.d.ts" />
|
|
2
|
+
declare module 'uview-ultra' {
|
|
3
|
+
export function install(): void //必要
|
|
4
|
+
export function t(value: string, params?: Record<string, string | number>): string;
|
|
5
|
+
export function registerLocale(locale: string, messages: Record<string, string>): void;
|
|
6
|
+
export function registerLocale(localeMap: Record<string, Record<string, string>>): void;
|
|
7
|
+
export function hasLocale(locale: string): boolean;
|
|
8
|
+
export function getLocale(): string;
|
|
9
|
+
export function setLocale(locale: string): string;
|
|
10
|
+
export const en: Record<string, string>;
|
|
11
|
+
export const es: Record<string, string>;
|
|
12
|
+
export const fr: Record<string, string>;
|
|
13
|
+
export const de: Record<string, string>;
|
|
14
|
+
export const ko: Record<string, string>;
|
|
15
|
+
export const ja: Record<string, string>;
|
|
16
|
+
export const ru: Record<string, string>;
|
|
17
|
+
export const th: Record<string, string>;
|
|
18
|
+
export const zhHans: Record<string, string>;
|
|
19
|
+
export const zhHant: Record<string, string>;
|
|
20
|
+
export const allLocales: Record<string, Record<string, string>>;
|
|
21
|
+
export const i18n: {
|
|
22
|
+
settings: {
|
|
23
|
+
lang: string;
|
|
24
|
+
locales: Record<string, Record<string, string>>;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
interface test {
|
|
28
|
+
/** 邮箱格式校验 */
|
|
29
|
+
email(email: string): boolean
|
|
30
|
+
/** 手机号校验 */
|
|
31
|
+
mobile(phone: number): boolean;
|
|
32
|
+
/** url路径验证 */
|
|
33
|
+
url(value: string): boolean;
|
|
34
|
+
/** 验证日期格式 */
|
|
35
|
+
date(value: string | number): boolean;
|
|
36
|
+
/** 验证ISO类型的日期格式 YYYY-MM-DD | YYYY/MM/DD */
|
|
37
|
+
dateISO(value: string): boolean;
|
|
38
|
+
/** 验证十进制数字 */
|
|
39
|
+
number(value: number): boolean;
|
|
40
|
+
/** 验证字符串 */
|
|
41
|
+
string(value: string): boolean;
|
|
42
|
+
/** 验证整数 */
|
|
43
|
+
digits(value: number): boolean;
|
|
44
|
+
/** 验证身份证号码 */
|
|
45
|
+
idCard(value: string | number): boolean;
|
|
46
|
+
/** 是否车牌号,空值直接返回false */
|
|
47
|
+
carNo(value: string | null): boolean;
|
|
48
|
+
/** 金额,只允许2位小数 */
|
|
49
|
+
amount(value: string | number): boolean;
|
|
50
|
+
/** 校验是否是中文 */
|
|
51
|
+
chinese(value: any): boolean;
|
|
52
|
+
/** 校验是否是字母 */
|
|
53
|
+
letter(value: any): boolean;
|
|
54
|
+
/** 校验字母或者数字 */
|
|
55
|
+
enOrNum(value: any): boolean;
|
|
56
|
+
/** 验证是否包含某个值 */
|
|
57
|
+
contains(source: string, value: string): boolean;
|
|
58
|
+
/** 验证一个值范围[min, max] */
|
|
59
|
+
range(value: string, between: number[]): boolean;
|
|
60
|
+
/** 验证一个长度范围[min, max] */
|
|
61
|
+
rangeLength(value: string, between: number[]): boolean;
|
|
62
|
+
/** 是否固定电话 */
|
|
63
|
+
landline(value: string | number): boolean;
|
|
64
|
+
/** 判断是否为空 */
|
|
65
|
+
empty(value: string | number | undefined | boolean | object | null): boolean;
|
|
66
|
+
/** 是否json字符串 */
|
|
67
|
+
jsonString(value: string): boolean;
|
|
68
|
+
/** 是否数组 */
|
|
69
|
+
array(value: any): boolean;
|
|
70
|
+
/** 是否对象 */
|
|
71
|
+
object(value: any): boolean;
|
|
72
|
+
/** 是否短信验证码 */
|
|
73
|
+
code(value: any, len: number): boolean;
|
|
74
|
+
/** 是否函数方法 */
|
|
75
|
+
func(value: any): boolean;
|
|
76
|
+
/** 是否promise对象 */
|
|
77
|
+
promise(value: any): boolean;
|
|
78
|
+
/** 是否图片格式 */
|
|
79
|
+
image(value: string): boolean;
|
|
80
|
+
/** 是否视频格式 */
|
|
81
|
+
video(value: string): boolean;
|
|
82
|
+
/** 是否为正则对象 */
|
|
83
|
+
regExp(value: any): boolean;
|
|
84
|
+
}
|
|
85
|
+
interface RouteParam {
|
|
86
|
+
type: 'navigateTo' | 'redirect' | 'switchTab' | 'reLaunch' | 'navigateBack';
|
|
87
|
+
/** 路由地址 */
|
|
88
|
+
url: string;
|
|
89
|
+
/** navigateBack页面后退时,回退的层数 */
|
|
90
|
+
delta?: number;
|
|
91
|
+
/** 传递的参数 */
|
|
92
|
+
params?: {};
|
|
93
|
+
/** 窗口动画,只在APP有效 */
|
|
94
|
+
animationType?: string;
|
|
95
|
+
/** 窗口动画持续时间,单位毫秒,只在APP有效 */
|
|
96
|
+
animationDuration?: number;
|
|
97
|
+
/** 是否需要拦截 */
|
|
98
|
+
intercept?: boolean;
|
|
99
|
+
}
|
|
100
|
+
interface Config {
|
|
101
|
+
v: string;
|
|
102
|
+
version: string;
|
|
103
|
+
color: Partial<Color>;
|
|
104
|
+
unit: 'px' | 'rpx';
|
|
105
|
+
nativeThemeSync: boolean;
|
|
106
|
+
iconUrl: string;
|
|
107
|
+
customIcon: {
|
|
108
|
+
family: string;
|
|
109
|
+
url: string;
|
|
110
|
+
};
|
|
111
|
+
customIcons: {
|
|
112
|
+
[key: string]: string;
|
|
113
|
+
};
|
|
114
|
+
loadFontOnce: boolean;
|
|
115
|
+
interceptor: {
|
|
116
|
+
navbarLeftClick: ((navbar: any) => void) | null;
|
|
117
|
+
};
|
|
118
|
+
themeMode?: 'light' | 'dark';
|
|
119
|
+
}
|
|
120
|
+
interface Color {
|
|
121
|
+
primary: string,
|
|
122
|
+
info: string,
|
|
123
|
+
default: string,
|
|
124
|
+
warning: string,
|
|
125
|
+
error: string,
|
|
126
|
+
success: string,
|
|
127
|
+
mainColor: string,
|
|
128
|
+
contentColor: string,
|
|
129
|
+
tipsColor: string,
|
|
130
|
+
lightColor: string,
|
|
131
|
+
borderColor: string,
|
|
132
|
+
bgColor?: string,
|
|
133
|
+
disabledColor?: string
|
|
134
|
+
}
|
|
135
|
+
interface GlobalConfig {
|
|
136
|
+
config: Partial<Config>;
|
|
137
|
+
props: {};
|
|
138
|
+
}
|
|
139
|
+
interface $u {
|
|
140
|
+
route: (url: string | RouteParam) => void;
|
|
141
|
+
/**
|
|
142
|
+
* 求两个颜色之间的渐变值
|
|
143
|
+
* @param {string} startColor 开始的颜色
|
|
144
|
+
* @param {string} endColor 结束的颜色
|
|
145
|
+
* @param {number} step 颜色等分的份额
|
|
146
|
+
*/
|
|
147
|
+
colorGradient: (startColor: string, endColor: string, step: number) => any[];
|
|
148
|
+
/**
|
|
149
|
+
* 将hex表示方式转换为rgb
|
|
150
|
+
* @param color "#000000"-> "rgb(0,0,0)" | "rgb(0,0,0)" -> "#000000"
|
|
151
|
+
* @param str 是否返回颜色数组 true -> 不返回
|
|
152
|
+
* @returns
|
|
153
|
+
*/
|
|
154
|
+
hexToRgb: (color: string, str?: boolean) => any[];
|
|
155
|
+
/**
|
|
156
|
+
* 将rgb表示方式转换为hex
|
|
157
|
+
*/
|
|
158
|
+
rgbToHex: (color: string) => string;
|
|
159
|
+
/**
|
|
160
|
+
* 十六进制转换为rgb或rgba
|
|
161
|
+
* @param color
|
|
162
|
+
* @param alpha 透明度
|
|
163
|
+
* @returns rgba(255,255,255,0.5)字符串
|
|
164
|
+
*/
|
|
165
|
+
colorToRgba: (color: string, alpha: number) => string;
|
|
166
|
+
test: test;
|
|
167
|
+
type: {},
|
|
168
|
+
http: {},
|
|
169
|
+
config: Config;
|
|
170
|
+
zIndex: {
|
|
171
|
+
toast: number;
|
|
172
|
+
noNetwork: number;
|
|
173
|
+
// popup包含popup,actionsheet,keyboard,picker的值
|
|
174
|
+
popup: number;
|
|
175
|
+
mask: number;
|
|
176
|
+
navbar: number;
|
|
177
|
+
topTips: number;
|
|
178
|
+
sticky: number;
|
|
179
|
+
indexListSticky: number;
|
|
180
|
+
},
|
|
181
|
+
debounce: (func, wait, immediate) => void;
|
|
182
|
+
throttle: (func, wait, immediate) => void;
|
|
183
|
+
calc: Record<string, (...args: any[]) => any>;
|
|
184
|
+
digit: Record<string, (...args: any[]) => any>;
|
|
185
|
+
i18n: {
|
|
186
|
+
settings: {
|
|
187
|
+
lang: string;
|
|
188
|
+
locales: Record<string, Record<string, string>>;
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
t: (value: string, params?: Record<string, string | number>) => string;
|
|
192
|
+
rootToast: (options?: string | { message?: string; title?: string; duration?: number; [key: string]: any }) => void;
|
|
193
|
+
setRootToastRef: (ref?: any) => void;
|
|
194
|
+
rootNotify: (options?: string | { message?: string; title?: string; duration?: number; [key: string]: any }) => void;
|
|
195
|
+
setRootNotifyRef: (ref?: any) => void;
|
|
196
|
+
props: {},
|
|
197
|
+
color: Color;
|
|
198
|
+
platform: string;
|
|
199
|
+
theme: {
|
|
200
|
+
preference: 'system' | 'light' | 'dark';
|
|
201
|
+
mode: 'light' | 'dark';
|
|
202
|
+
version: number;
|
|
203
|
+
vars: Record<string, string>;
|
|
204
|
+
};
|
|
205
|
+
setTheme: (mode?: 'light' | 'dark') => any;
|
|
206
|
+
setThemePreference: (mode?: 'system' | 'light' | 'dark') => any;
|
|
207
|
+
getThemePreference: () => 'system' | 'light' | 'dark';
|
|
208
|
+
getSystemTheme: () => 'light' | 'dark';
|
|
209
|
+
getThemeVars: (mode?: 'light' | 'dark') => Record<string, string>;
|
|
210
|
+
getThemeTabBarStyle: () => {
|
|
211
|
+
color: string;
|
|
212
|
+
selectedColor: string;
|
|
213
|
+
backgroundColor: string;
|
|
214
|
+
borderStyle: string;
|
|
215
|
+
};
|
|
216
|
+
applyNativeThemeUI: () => void;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function setConfig(config: Partial<GlobalConfig>): void;
|
|
220
|
+
|
|
221
|
+
// ---- 组件类型:与 types/comps/*.d.ts 同步,勿手工增删 ----
|
|
222
|
+
export type ActionSheetProps = import('./comps/actionSheet')['ActionSheetProps']
|
|
223
|
+
export type AlbumProps = import('./comps/album')['AlbumProps']
|
|
224
|
+
export type AlertProps = import('./comps/alert')['AlertProps']
|
|
225
|
+
export type AudioProps = import('./comps/audio')['AudioProps']
|
|
226
|
+
export type AvatarProps = import('./comps/avatar')['AvatarProps']
|
|
227
|
+
export type AvatarGroupProps = import('./comps/avatarGroup')['AvatarGroupProps']
|
|
228
|
+
export type BackTopProps = import('./comps/backTop')['BackTopProps']
|
|
229
|
+
export type BackTopSlots = import('./comps/backTop')['BackTopSlots']
|
|
230
|
+
export type BadgeProps = import('./comps/badge')['BadgeProps']
|
|
231
|
+
export type ButtonProps = import('./comps/button')['ButtonProps']
|
|
232
|
+
export type CalendarProps = import('./comps/calendar')['CalendarProps']
|
|
233
|
+
export type CalendarRef = typeof import('./comps/calendar')['CalendarRef']
|
|
234
|
+
export type CalendarStripPayload = import('./comps/calendarStrip')['CalendarStripPayload']
|
|
235
|
+
export type CalendarStripProps = import('./comps/calendarStrip')['CalendarStripProps']
|
|
236
|
+
export type CalendarStripRef = typeof import('./comps/calendarStrip')['CalendarStripRef']
|
|
237
|
+
export type CellProps = import('./comps/cell')['CellProps']
|
|
238
|
+
export type CellSlots = import('./comps/cell')['CellSlots']
|
|
239
|
+
export type CellGroupProps = import('./comps/cellGroup')['CellGroupProps']
|
|
240
|
+
export type CheckboxProps = import('./comps/checkbox')['CheckboxProps']
|
|
241
|
+
export type CheckboxSlots = import('./comps/checkbox')['CheckboxSlots']
|
|
242
|
+
export type CheckboxGroupProps = import('./comps/checkboxGroup')['CheckboxGroupProps']
|
|
243
|
+
export type CodeProps = import('./comps/code')['CodeProps']
|
|
244
|
+
export type CodeRef = typeof import('./comps/code')['CodeRef']
|
|
245
|
+
export type CodeInputProps = import('./comps/codeInput')['CodeInputProps']
|
|
246
|
+
export type ColProps = import('./comps/col')['ColProps']
|
|
247
|
+
export type CollapseProps = import('./comps/collapse')['CollapseProps']
|
|
248
|
+
export type CollapseRef = typeof import('./comps/collapse')['CollapseRef']
|
|
249
|
+
export type CollapseItemProps = import('./comps/collapseItem')['CollapseItemProps']
|
|
250
|
+
export type CollapseItemSlots = import('./comps/collapseItem')['CollapseItemSlots']
|
|
251
|
+
export type CountDownProps = import('./comps/countDown')['CountDownProps']
|
|
252
|
+
export type CountDownRef = typeof import('./comps/countDown')['CountDownRef']
|
|
253
|
+
export type CountToProps = import('./comps/countTo')['CountToProps']
|
|
254
|
+
export type CountToRef = typeof import('./comps/countTo')['CountToRef']
|
|
255
|
+
export type DatetimePickerProps = import('./comps/datetimePicker')['DatetimePickerProps']
|
|
256
|
+
export type DatetimePickerRef = typeof import('./comps/datetimePicker')['DatetimePickerRef']
|
|
257
|
+
export type DividerProps = import('./comps/divider')['DividerProps']
|
|
258
|
+
export type EmptyProps = import('./comps/empty')['EmptyProps']
|
|
259
|
+
export type EmptySlots = import('./comps/empty')['EmptySlots']
|
|
260
|
+
export type FormValidateError = import('./comps/form')['FormValidateError']
|
|
261
|
+
export type FormProps = import('./comps/form')['FormProps']
|
|
262
|
+
export type FormRef = typeof import('./comps/form')['FormRef']
|
|
263
|
+
export type FormItemProps = import('./comps/formItem')['FormItemProps']
|
|
264
|
+
export type FormItemSlots = import('./comps/formItem')['FormItemSlots']
|
|
265
|
+
export type GapProps = import('./comps/gap')['GapProps']
|
|
266
|
+
export type GridProps = import('./comps/grid')['GridProps']
|
|
267
|
+
export type GridItemProps = import('./comps/gridItem')['GridItemProps']
|
|
268
|
+
export type GuideItem = import('./comps/guide')['GuideItem']
|
|
269
|
+
export type GuideProps = import('./comps/guide')['GuideProps']
|
|
270
|
+
export type GuideRef = typeof import('./comps/guide')['GuideRef']
|
|
271
|
+
export type IconProps = import('./comps/icon')['IconProps']
|
|
272
|
+
export type ImageProps = import('./comps/image')['ImageProps']
|
|
273
|
+
export type ImageSlots = import('./comps/image')['ImageSlots']
|
|
274
|
+
export type IndexAnchorProps = import('./comps/indexAnchor')['IndexAnchorProps']
|
|
275
|
+
export type IndexItemSlots = import('./comps/indexItem')['IndexItemSlots']
|
|
276
|
+
export type IndexListProps = import('./comps/indexList')['IndexListProps']
|
|
277
|
+
export type InputProps = import('./comps/input')['InputProps']
|
|
278
|
+
export type InputSlots = import('./comps/input')['InputSlots']
|
|
279
|
+
export type InputRef = typeof import('./comps/input')['InputRef']
|
|
280
|
+
export type KeyboardProps = import('./comps/keyboard')['KeyboardProps']
|
|
281
|
+
export type KeyboardSlots = import('./comps/keyboard')['KeyboardSlots']
|
|
282
|
+
export type LineProps = import('./comps/line')['LineProps']
|
|
283
|
+
export type LineProgressProps = import('./comps/lineProgress')['LineProgressProps']
|
|
284
|
+
export type LineProgressSlots = import('./comps/lineProgress')['LineProgressSlots']
|
|
285
|
+
export type LinkProps = import('./comps/link')['LinkProps']
|
|
286
|
+
export type LinkSlots = import('./comps/link')['LinkSlots']
|
|
287
|
+
export type ListProps = import('./comps/list')['ListProps']
|
|
288
|
+
export type ListItemProps = import('./comps/listItem')['ListItemProps']
|
|
289
|
+
export type LoadMoreProps = import('./comps/loadMore')['LoadMoreProps']
|
|
290
|
+
export type LoadingIconProps = import('./comps/loadingIcon')['LoadingIconProps']
|
|
291
|
+
export type LoadingPageProps = import('./comps/loadingPage')['LoadingPageProps']
|
|
292
|
+
export type ModalProps = import('./comps/modal')['ModalProps']
|
|
293
|
+
export type ModalSlots = import('./comps/modal')['ModalSlots']
|
|
294
|
+
export type NavbarProps = import('./comps/navbar')['NavbarProps']
|
|
295
|
+
export type NavbarSlots = import('./comps/navbar')['NavbarSlots']
|
|
296
|
+
export type NavbarMiniProps = import('./comps/navbarMini')['NavbarMiniProps']
|
|
297
|
+
export type NavbarMiniSlots = import('./comps/navbarMini')['NavbarMiniSlots']
|
|
298
|
+
export type NoNetworkProps = import('./comps/noNetwork')['NoNetworkProps']
|
|
299
|
+
export type NoticeBarProps = import('./comps/noticeBar')['NoticeBarProps']
|
|
300
|
+
export type NotifyProps = import('./comps/notify')['NotifyProps']
|
|
301
|
+
export type NotifySlots = import('./comps/notify')['NotifySlots']
|
|
302
|
+
export type NotifyRef = typeof import('./comps/notify')['NotifyRef']
|
|
303
|
+
export type NovelReaderProps = import('./comps/novelReader')['NovelReaderProps']
|
|
304
|
+
export type NovelReaderSlots = import('./comps/novelReader')['NovelReaderSlots']
|
|
305
|
+
export type NumberBoxFocusPayload = import('./comps/numberBox')['NumberBoxFocusPayload']
|
|
306
|
+
export type NumberBoxChangePayload = import('./comps/numberBox')['NumberBoxChangePayload']
|
|
307
|
+
export type NumberBoxProps = import('./comps/numberBox')['NumberBoxProps']
|
|
308
|
+
export type NumberBoxSlots = import('./comps/numberBox')['NumberBoxSlots']
|
|
309
|
+
export type OverlayProps = import('./comps/overlay')['OverlayProps']
|
|
310
|
+
export type OverlaySlots = import('./comps/overlay')['OverlaySlots']
|
|
311
|
+
export type PaginationProps = import('./comps/pagination')['PaginationProps']
|
|
312
|
+
export type ParseProps = import('./comps/parse')['ParseProps']
|
|
313
|
+
export type PickerProps = import('./comps/picker')['PickerProps']
|
|
314
|
+
export type PickerRef = typeof import('./comps/picker')['PickerRef']
|
|
315
|
+
export type PopupProps = import('./comps/popup')['PopupProps']
|
|
316
|
+
export type PopupSlots = import('./comps/popup')['PopupSlots']
|
|
317
|
+
export type RadioProps = import('./comps/radio')['RadioProps']
|
|
318
|
+
export type RadioSlots = import('./comps/radio')['RadioSlots']
|
|
319
|
+
export type RadioGroupProps = import('./comps/radioGroup')['RadioGroupProps']
|
|
320
|
+
export type RateProps = import('./comps/rate')['RateProps']
|
|
321
|
+
export type ReadMoreProps = import('./comps/readMore')['ReadMoreProps']
|
|
322
|
+
export type ReadMoreRef = typeof import('./comps/readMore')['ReadMoreRef']
|
|
323
|
+
export type RowProps = import('./comps/row')['RowProps']
|
|
324
|
+
export type SafeBottomProps = import('./comps/safeBottom')['SafeBottomProps']
|
|
325
|
+
export type ScrollListProps = import('./comps/scrollList')['ScrollListProps']
|
|
326
|
+
export type SearchProps = import('./comps/search')['SearchProps']
|
|
327
|
+
export type SkeletonProps = import('./comps/skeleton')['SkeletonProps']
|
|
328
|
+
export type SliderProps = import('./comps/slider')['SliderProps']
|
|
329
|
+
export type StatusBarProps = import('./comps/statusBar')['StatusBarProps']
|
|
330
|
+
export type StepsProps = import('./comps/steps')['StepsProps']
|
|
331
|
+
export type StepsItemProps = import('./comps/stepsItem')['StepsItemProps']
|
|
332
|
+
export type StepsItemSlots = import('./comps/stepsItem')['StepsItemSlots']
|
|
333
|
+
export type StickyProps = import('./comps/sticky')['StickyProps']
|
|
334
|
+
export type StickySlots = import('./comps/sticky')['StickySlots']
|
|
335
|
+
export type SubsectionProps = import('./comps/subsection')['SubsectionProps']
|
|
336
|
+
export type SwipeActionProps = import('./comps/swipeAction')['SwipeActionProps']
|
|
337
|
+
export type SwipeActionItemProps = import('./comps/swipeActionItem')['SwipeActionItemProps']
|
|
338
|
+
export type SwiperProps = import('./comps/swiper')['SwiperProps']
|
|
339
|
+
export type SwiperIndicatorProps = import('./comps/swiperIndicator')['SwiperIndicatorProps']
|
|
340
|
+
export type SwitchProps = import('./comps/switch')['SwitchProps']
|
|
341
|
+
export type TabbarProps = import('./comps/tabbar')['TabbarProps']
|
|
342
|
+
export type TabbarItemProps = import('./comps/tabbarItem')['TabbarItemProps']
|
|
343
|
+
export type TabsProps = import('./comps/tabs')['TabsProps']
|
|
344
|
+
export type TabsProProps = import('./comps/tabsPro')['TabsProProps']
|
|
345
|
+
export type TagProps = import('./comps/tag')['TagProps']
|
|
346
|
+
export type TextProps = import('./comps/text')['TextProps']
|
|
347
|
+
export type TextareaProps = import('./comps/textarea')['TextareaProps']
|
|
348
|
+
export type TextareaRef = typeof import('./comps/textarea')['TextareaRef']
|
|
349
|
+
export type ToastProps = import('./comps/toast')['ToastProps']
|
|
350
|
+
export type ToastRef = typeof import('./comps/toast')['ToastRef']
|
|
351
|
+
export type TooltipProps = import('./comps/tooltip')['TooltipProps']
|
|
352
|
+
export type TransitionProps = import('./comps/transition')['TransitionProps']
|
|
353
|
+
export type UploadProps = import('./comps/upload')['UploadProps']
|
|
354
|
+
export type UploadSlots = import('./comps/upload')['UploadSlots']
|
|
355
|
+
export type UploadRef = typeof import('./comps/upload')['UploadRef']
|
|
356
|
+
export type VideoEpisode = import('./comps/video')['VideoEpisode']
|
|
357
|
+
export type VideoAd = import('./comps/video')['VideoAd']
|
|
358
|
+
export type VideoDanmu = import('./comps/video')['VideoDanmu']
|
|
359
|
+
export type VideoProps = import('./comps/video')['VideoProps']
|
|
360
|
+
// ---- 组件类型结束 ----
|
|
361
|
+
|
|
362
|
+
global {
|
|
363
|
+
interface Uni {
|
|
364
|
+
$u: $u
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
declare type UniCountDownRef = typeof import('./comps/countDown')['CountDownRef']
|
|
369
|
+
declare type UniCountToRef = typeof import('./comps/countTo')['CountToRef']
|
|
370
|
+
declare type UniReadMoreRef = typeof import('./comps/readMore')['ReadMoreRef']
|
|
371
|
+
declare type UniToastRef = typeof import('./comps/toast')['ToastRef']
|
|
372
|
+
declare type UniCollapseRef = typeof import('./comps/collapse')['CollapseRef']
|
|
373
|
+
declare type UniNotifyRef = typeof import('./comps/notify')['NotifyRef']
|
|
374
|
+
declare type UniCodeRef = typeof import('./comps/code')['CodeRef']
|
|
375
|
+
declare type UniInputRef = typeof import('./comps/input')['InputRef']
|
|
376
|
+
declare type UniUploadRef = typeof import('./comps/upload')['UploadRef']
|
|
377
|
+
declare type UniDatetimePickerRef = typeof import('./comps/datetimePicker')['DatetimePickerRef']
|
|
378
|
+
declare type UniPickerRef = typeof import('./comps/picker')['PickerRef']
|
|
379
|
+
declare type UniCalendarRef = typeof import('./comps/calendar')['CalendarRef']
|
|
380
|
+
declare type UniCalendarStripRef = typeof import('./comps/calendarStrip')['CalendarStripRef']
|
|
381
|
+
declare type UniGuideRef = typeof import('./comps/guide')['GuideRef']
|
|
382
|
+
declare type UniTextareaRef = typeof import('./comps/textarea')['TextareaRef']
|
|
383
|
+
declare type UniFormRef = typeof import('./comps/form')['FormRef']
|