@witlink/components 0.0.4 → 1.0.0

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/dist/index.d.ts CHANGED
@@ -6,6 +6,131 @@ import { ObjectDirective } from 'vue';
6
6
  import { PublicProps } from 'vue';
7
7
 
8
8
  declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
9
+ precision: {
10
+ type: NumberConstructor;
11
+ };
12
+ stringMode: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ customControls: {
17
+ type: BooleanConstructor;
18
+ default: boolean;
19
+ };
20
+ value: {
21
+ type: globalThis.PropType<any>;
22
+ };
23
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
24
+ change: (...args: any[]) => void;
25
+ "update:value": (value: any) => void;
26
+ }, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
27
+ precision: {
28
+ type: NumberConstructor;
29
+ };
30
+ stringMode: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ customControls: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ value: {
39
+ type: globalThis.PropType<any>;
40
+ };
41
+ }>> & Readonly<{
42
+ onChange?: (...args: any[]) => any;
43
+ "onUpdate:value"?: (value: any) => any;
44
+ }>, {
45
+ stringMode: boolean;
46
+ customControls: boolean;
47
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
48
+
49
+ declare const __VLS_component_2: DefineComponent<globalThis.ExtractPropTypes<{
50
+ value: {};
51
+ max: {
52
+ type: NumberConstructor;
53
+ default: number;
54
+ };
55
+ maxUnit: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ min: {
60
+ type: NumberConstructor;
61
+ default: number;
62
+ };
63
+ minUnit: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ interval: {
68
+ type: NumberConstructor;
69
+ default: number;
70
+ };
71
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
72
+ change: (...args: any[]) => void;
73
+ "update:value": (...args: any[]) => void;
74
+ }, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
75
+ value: {};
76
+ max: {
77
+ type: NumberConstructor;
78
+ default: number;
79
+ };
80
+ maxUnit: {
81
+ type: StringConstructor;
82
+ default: string;
83
+ };
84
+ min: {
85
+ type: NumberConstructor;
86
+ default: number;
87
+ };
88
+ minUnit: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ };
92
+ interval: {
93
+ type: NumberConstructor;
94
+ default: number;
95
+ };
96
+ }>> & Readonly<{
97
+ onChange?: (...args: any[]) => any;
98
+ "onUpdate:value"?: (...args: any[]) => any;
99
+ }>, {
100
+ min: number;
101
+ max: number;
102
+ maxUnit: string;
103
+ minUnit: string;
104
+ interval: number;
105
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
106
+
107
+ declare const __VLS_component_3: DefineComponent<globalThis.ExtractPropTypes<{
108
+ loadData: {
109
+ type: FunctionConstructor;
110
+ required: true;
111
+ };
112
+ formatSortParams: {
113
+ type: BooleanConstructor;
114
+ default: boolean;
115
+ };
116
+ }>, {
117
+ loadData: typeof loadData;
118
+ refresh: typeof refresh;
119
+ reset: typeof reset;
120
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
121
+ loadData: {
122
+ type: FunctionConstructor;
123
+ required: true;
124
+ };
125
+ formatSortParams: {
126
+ type: BooleanConstructor;
127
+ default: boolean;
128
+ };
129
+ }>> & Readonly<{}>, {
130
+ formatSortParams: boolean;
131
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
132
+
133
+ declare const __VLS_component_4: DefineComponent<globalThis.ExtractPropTypes<{
9
134
  leftMin: {
10
135
  type: NumberConstructor;
11
136
  default: number;
@@ -14,6 +139,10 @@ leftMax: {
14
139
  type: NumberConstructor;
15
140
  default: number;
16
141
  };
142
+ bordered: {
143
+ type: BooleanConstructor;
144
+ default: boolean;
145
+ };
17
146
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
18
147
  leftMin: {
19
148
  type: NumberConstructor;
@@ -23,15 +152,31 @@ leftMax: {
23
152
  type: NumberConstructor;
24
153
  default: number;
25
154
  };
155
+ bordered: {
156
+ type: BooleanConstructor;
157
+ default: boolean;
158
+ };
26
159
  }>> & Readonly<{}>, {
27
160
  leftMin: number;
28
161
  leftMax: number;
162
+ bordered: boolean;
29
163
  }, {}, {}, {}, string, ComponentProvideOptions, true, {
30
164
  container: HTMLDivElement;
31
165
  spliter: HTMLDivElement;
32
166
  }, HTMLDivElement>;
33
167
 
34
- declare function __VLS_template(): {
168
+ declare function __VLS_template(): any;
169
+
170
+ declare function __VLS_template_2(): {
171
+ attrs: Partial<{}>;
172
+ slots: any;
173
+ refs: {};
174
+ rootEl: any;
175
+ };
176
+
177
+ declare function __VLS_template_3(): any;
178
+
179
+ declare function __VLS_template_4(): {
35
180
  attrs: Partial<{}>;
36
181
  slots: {
37
182
  left?(_: {}): any;
@@ -46,153 +191,284 @@ declare function __VLS_template(): {
46
191
 
47
192
  declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
48
193
 
194
+ declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
195
+
196
+ declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
197
+
198
+ declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
199
+
49
200
  declare type __VLS_WithTemplateSlots<T, S> = T & {
50
201
  new (): {
51
202
  $slots: S;
52
203
  };
53
204
  };
54
205
 
55
- declare const _default: {
56
- install: typeof install;
206
+ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
207
+ new (): {
208
+ $slots: S;
209
+ };
57
210
  };
58
- export default _default;
59
-
60
- /**
61
- * 下载文件
62
- */
63
- export declare function exportFile(options: {
64
- fileData: any;
65
- name: string;
66
- }): void;
67
-
68
- export declare function getButtonPermissions(): any;
69
-
70
- export declare function getLocale(): string | null;
71
211
 
72
- export declare function getMenuInfo(): any;
73
-
74
- export declare function getToken(): string | null;
75
-
76
- export declare function getUserCenterParams(): UserCenterParams;
77
-
78
- export declare function getUserCenterParamsByUrl(): Record<string, string>;
212
+ declare type __VLS_WithTemplateSlots_3<T, S> = T & {
213
+ new (): {
214
+ $slots: S;
215
+ };
216
+ };
79
217
 
80
- export declare function getUserInfo(key?: string | Array<string> | null): any;
218
+ declare type __VLS_WithTemplateSlots_4<T, S> = T & {
219
+ new (): {
220
+ $slots: S;
221
+ };
222
+ };
81
223
 
82
- export declare function hasPermission(id: string): boolean;
224
+ export declare const AInputNumberEx: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
83
225
 
84
- declare function install(app: App): void;
226
+ export declare const ARangePickerEx: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
85
227
 
86
- /**
87
- * @description: 判断值是否未某个类型
88
- */
89
- export declare function is(val: unknown, type: string): boolean;
228
+ export declare const ATableEx: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
90
229
 
91
230
  /**
92
- * @description: 是否为数组
93
- */
94
- export declare function isArray(val: any): val is Array<any>;
231
+ * 构造树型结构数据
232
+ * @param arr 数据源
233
+ * @param options { id: "id", parentId: "parentId", children: "children", root: "" }
234
+ */
235
+ export declare function buildTree(arr: any, options?: any): any;
95
236
 
96
- /**
97
- * @description: 是否为AsyncFunction
98
- */
99
- export declare function isAsyncFunction<T = any>(val: unknown): val is Promise<T>;
237
+ /**
238
+ * a-col的指令版
239
+ */
240
+ export declare const col: ObjectDirective;
100
241
 
101
- /**
102
- * @description: 是否为boolean类型
103
- */
104
- export declare function isBoolean(val: unknown): val is boolean;
242
+ /**
243
+ * useClipboard的指令版
244
+ */
245
+ export declare const copy: ObjectDirective;
105
246
 
106
- /**
107
- * @description: 是否客户端
108
- */
109
- export declare const isClient: () => boolean;
247
+ declare const _default: {
248
+ install: typeof install;
249
+ };
250
+ export default _default;
110
251
 
111
- /**
112
- * @description: 是否为时间
113
- */
114
- export declare function isDate(val: unknown): val is Date;
252
+ /**
253
+ * 下载文件
254
+ */
255
+ export declare function exportFile(fileData: any, fileName: string): void;
115
256
 
116
- /**
117
- * @description: 是否已定义
118
- */
119
- export declare const isDef: <T = unknown>(val?: T) => val is T;
257
+ /**
258
+ * 遍历树结构数据
259
+ * @param treeData 树型数据
260
+ * @param fn 回调方法
261
+ */
262
+ export declare function forEachTree<T>(treeData: Array<T>, fn: (item: T) => void): void;
120
263
 
121
- export declare const isElement: (val: unknown) => val is Element;
264
+ export declare function getButtonPermissions(): any;
122
265
 
123
- /**
124
- * @description: 是否为函数
125
- */
126
- export declare function isFunction<T = Function>(val: unknown): val is T;
266
+ export declare function getLocale(): string | null;
127
267
 
128
- export declare function isImageDom(o: Element): boolean;
268
+ export declare function getMenuInfo(): any;
129
269
 
130
- export declare function isNull(val: unknown): val is null;
270
+ export declare function getToken(): string | null;
131
271
 
132
- export declare function isNullOrUndef(val: unknown): val is null | undefined;
272
+ export declare function getUserCenterParams(): UserCenterParams;
133
273
 
134
- /**
135
- * @description: 是否为数值
136
- */
137
- export declare function isNumber(val: unknown): val is number;
274
+ export declare function getUserCenterParamsByUrl(): Record<string, string>;
138
275
 
139
- /**
140
- * @description: 是否为对象
141
- */
142
- export declare const isObject: (val: any) => val is Record<any, any>;
276
+ export declare function getUserInfo(key?: string | Array<string> | null): any;
143
277
 
144
- /**
145
- * @description: 是否为promise
146
- */
147
- export declare function isPromise<T = any>(val: any): val is Promise<T>;
278
+ export declare function hasPermission(id: string): boolean;
148
279
 
149
- export declare const isServer: boolean;
280
+ /**
281
+ * input限制输入,v-inputlimit:letterNumber 或者 v-inputlimit="/^\w$/"
282
+ */
283
+ export declare const inputlimit: ObjectDirective;
150
284
 
151
- /**
152
- * @description: 是否为字符串
153
- */
154
- export declare function isString(val: unknown): val is string;
285
+ declare function install(app: App): void;
155
286
 
156
- export declare const isUndef: <T = unknown>(val?: T) => val is T;
287
+ /**
288
+ * @description: 判断值是否未某个类型
289
+ */
290
+ export declare function is(val: unknown, type: string): boolean;
157
291
 
158
- /**
159
- * @description: 是否为浏览器
160
- */
161
- export declare const isWindow: (val: any) => val is Window;
292
+ /**
293
+ * @description: 是否为数组
294
+ */
295
+ export declare function isArray(val: any): val is Array<any>;
162
296
 
163
- export declare function logoutToUserCenter(): void;
297
+ /**
298
+ * @description: 是否为AsyncFunction
299
+ */
300
+ export declare function isAsyncFunction<T = any>(val: unknown): val is Promise<T>;
164
301
 
165
- /**
166
- * 按钮级权限控制指令
167
- */
168
- export declare const permission: ObjectDirective;
302
+ /**
303
+ * @description: 是否为boolean类型
304
+ */
305
+ export declare function isBoolean(val: unknown): val is boolean;
169
306
 
170
- export declare function removeAll(): void;
307
+ /**
308
+ * @description: 是否客户端
309
+ */
310
+ export declare const isClient: () => boolean;
171
311
 
172
- export declare function removeLocale(): void;
312
+ /**
313
+ * @description: 是否为时间
314
+ */
315
+ export declare function isDate(val: unknown): val is Date;
173
316
 
174
- export declare function removeToken(): void;
317
+ /**
318
+ * @description: 是否已定义
319
+ */
320
+ export declare const isDef: <T = unknown>(val?: T) => val is T;
175
321
 
176
- export declare function setLocale(locale: string): void;
322
+ export declare const isElement: (val: unknown) => val is Element;
177
323
 
178
- export declare function setMenuInfo(menuInfo: any): void;
324
+ /**
325
+ * @description: 是否为函数
326
+ */
327
+ export declare function isFunction<T = Function>(val: unknown): val is T;
179
328
 
180
- export declare function setToken(token: string): void;
329
+ export declare function isImageDom(o: Element): boolean;
181
330
 
182
- export declare function setUserCenterParams(params: UserCenterParams): void;
331
+ export declare function isNull(val: unknown): val is null;
183
332
 
184
- export declare function setUserInfo(userInfo?: any): void;
333
+ export declare function isNullOrUndef(val: unknown): val is null | undefined;
185
334
 
186
- export declare function toUserCenterConsole(): void;
335
+ /**
336
+ * @description: 是否为数值
337
+ */
338
+ export declare function isNumber(val: unknown): val is number;
187
339
 
188
- export declare const UserCenterKey = "Witlink-Usercenter";
340
+ /**
341
+ * @description: 是否为对象
342
+ */
343
+ export declare const isObject: (val: any) => val is Record<any, any>;
189
344
 
190
- export declare type UserCenterParams = {
191
- token?: string;
192
- lang?: string;
193
- usercenterUrl?: string;
194
- };
345
+ /**
346
+ * @description: 是否为promise
347
+ */
348
+ export declare function isPromise<T = any>(val: any): val is Promise<T>;
195
349
 
196
- export declare const WlSplitter: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
350
+ export declare const isServer: boolean;
197
351
 
198
- export { }
352
+ /**
353
+ * @description: 是否为字符串
354
+ */
355
+ export declare function isString(val: unknown): val is string;
356
+
357
+ export declare const isUndef: <T = unknown>(val?: T) => val is T;
358
+
359
+ /**
360
+ * @description: 是否为浏览器
361
+ */
362
+ export declare const isWindow: (val: any) => val is Window;
363
+
364
+ declare function loadData(): void;
365
+
366
+ export declare function logoutToUserCenter(): void;
367
+
368
+ /**
369
+ * 按钮级权限控制指令
370
+ */
371
+ export declare const permission: ObjectDirective;
372
+
373
+ declare function refresh(): void;
374
+
375
+ export declare function removeAll(): void;
376
+
377
+ export declare function removeLocale(): void;
378
+
379
+ export declare function removeToken(): void;
380
+
381
+ declare function reset(): void;
382
+
383
+ /**
384
+ * a-row的指令版
385
+ */
386
+ export declare const row: ObjectDirective;
387
+
388
+ export declare function setLocale(locale: string): void;
389
+
390
+ export declare function setMenuInfo(menuInfo: any): void;
391
+
392
+ export declare function setToken(token: string): void;
393
+
394
+ export declare function setUserCenterParams(params: UserCenterParams): void;
395
+
396
+ export declare function setUserInfo(userInfo?: any): void;
397
+
398
+ /**
399
+ * a-tooltip指令版,
400
+ * v-tooltip="'测试'", 一般用法
401
+ * v-tooltip.exceed="'测试'", 当内容超出绑定元素的宽度时显示
402
+ * v-tooltip="{enabled: true, content: '测试'}", 受控的是否启用
403
+ */
404
+ export declare const tooltip: ObjectDirective;
405
+
406
+ export declare function toUserCenterConsole(): void;
407
+
408
+ export declare const UserCenterKey = "Witlink-Usercenter";
409
+
410
+ export declare type UserCenterParams = {
411
+ token?: string;
412
+ lang?: string;
413
+ usercenterUrl?: string;
414
+ };
415
+
416
+ export declare const WlNumberKeyboard: DefineComponent<globalThis.ExtractPropTypes<{
417
+ quickNums: {
418
+ type: ArrayConstructor;
419
+ default: () => number[];
420
+ };
421
+ min: {
422
+ type: NumberConstructor;
423
+ default: number;
424
+ };
425
+ max: {
426
+ type: NumberConstructor;
427
+ default: number;
428
+ };
429
+ precision: {
430
+ type: NumberConstructor;
431
+ default: number;
432
+ };
433
+ value: {
434
+ type: globalThis.PropType<string>;
435
+ };
436
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
437
+ enter: (...args: any[]) => void;
438
+ "update:value": (value: string) => void;
439
+ }, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
440
+ quickNums: {
441
+ type: ArrayConstructor;
442
+ default: () => number[];
443
+ };
444
+ min: {
445
+ type: NumberConstructor;
446
+ default: number;
447
+ };
448
+ max: {
449
+ type: NumberConstructor;
450
+ default: number;
451
+ };
452
+ precision: {
453
+ type: NumberConstructor;
454
+ default: number;
455
+ };
456
+ value: {
457
+ type: globalThis.PropType<string>;
458
+ };
459
+ }>> & Readonly<{
460
+ "onUpdate:value"?: (value: string) => any;
461
+ onEnter?: (...args: any[]) => any;
462
+ }>, {
463
+ precision: number;
464
+ min: number;
465
+ max: number;
466
+ quickNums: unknown[];
467
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {
468
+ numberKeyboard: HTMLDivElement;
469
+ inputRef: unknown;
470
+ }, any>;
471
+
472
+ export declare const WlSplitter: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
473
+
474
+ export { }