@fox-js/fox 3.0.1-3 → 3.0.1-4
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/libs/index.cjs.js +3 -1
- package/libs/{index.d.ts → index.esm.d.ts} +1404 -1880
- package/libs/index.esm.js +4275 -1
- package/libs/index.umd.js +3 -0
- package/libs/style.css +1 -0
- package/package.json +10 -7
- package/READEME.md +0 -58
- package/libs/index.amd.js +0 -1
- package/libs/index.css +0 -144
|
@@ -1,1880 +1,1404 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
*
|
|
98
|
-
*/
|
|
99
|
-
interface
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
*
|
|
118
|
-
*/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
*
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
*
|
|
151
|
-
*/
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
*
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
*
|
|
161
|
-
* @param
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
*
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
*
|
|
209
|
-
*/
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
*
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
*
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
*
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
*
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
*
|
|
281
|
-
*/
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
*
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
*
|
|
301
|
-
*/
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
*
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
*
|
|
334
|
-
*/
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
*
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
*
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
*
|
|
449
|
-
*/
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
*
|
|
469
|
-
*/
|
|
470
|
-
[
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
*
|
|
480
|
-
*/
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
/**
|
|
538
|
-
*
|
|
539
|
-
*/
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
*
|
|
624
|
-
*/
|
|
625
|
-
|
|
626
|
-
/**
|
|
627
|
-
*
|
|
628
|
-
*/
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
*
|
|
632
|
-
*/
|
|
633
|
-
|
|
634
|
-
/**
|
|
635
|
-
*
|
|
636
|
-
*/
|
|
637
|
-
|
|
638
|
-
/**
|
|
639
|
-
*
|
|
640
|
-
*/
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
*
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
*
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
*
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
*
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
*
|
|
683
|
-
* @param
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
*
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
*
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
*
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
*
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
/**
|
|
753
|
-
*
|
|
754
|
-
*/
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
*
|
|
758
|
-
*/
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
/**
|
|
769
|
-
*
|
|
770
|
-
*/
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
*
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
*
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
*
|
|
796
|
-
*/
|
|
797
|
-
|
|
798
|
-
/**
|
|
799
|
-
*
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
*
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
*
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
*
|
|
817
|
-
* @param
|
|
818
|
-
* @
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
*
|
|
824
|
-
* @
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
*
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
*
|
|
848
|
-
*/
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
*
|
|
886
|
-
*/
|
|
887
|
-
|
|
888
|
-
/**
|
|
889
|
-
*
|
|
890
|
-
*/
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
/**
|
|
906
|
-
*
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
*
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
/**
|
|
927
|
-
*
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
*
|
|
949
|
-
*/
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
*
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
*
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
*
|
|
982
|
-
* @
|
|
983
|
-
*/
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
*
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
*
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
*
|
|
1018
|
-
*/
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
/**
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
(
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
declare
|
|
1087
|
-
/**
|
|
1088
|
-
*
|
|
1089
|
-
*/
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
*
|
|
1093
|
-
*/
|
|
1094
|
-
|
|
1095
|
-
/**
|
|
1096
|
-
*
|
|
1097
|
-
*/
|
|
1098
|
-
|
|
1099
|
-
/**
|
|
1100
|
-
*
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
*
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
*
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
*
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
*
|
|
1198
|
-
* @
|
|
1199
|
-
*/
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
*
|
|
1219
|
-
*/
|
|
1220
|
-
|
|
1221
|
-
/**
|
|
1222
|
-
*
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
*
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
*
|
|
1241
|
-
*/
|
|
1242
|
-
|
|
1243
|
-
/**
|
|
1244
|
-
*
|
|
1245
|
-
* @param
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
*
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
/**
|
|
1268
|
-
*
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
*
|
|
1281
|
-
*/
|
|
1282
|
-
|
|
1283
|
-
/**
|
|
1284
|
-
*
|
|
1285
|
-
* @param
|
|
1286
|
-
* @
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
/**
|
|
1320
|
-
*
|
|
1321
|
-
* @param
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
*
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
*
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
*
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
/**
|
|
1361
|
-
*
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
/**
|
|
1406
|
-
* 执行before事件
|
|
1407
|
-
* @param chain
|
|
1408
|
-
*/
|
|
1409
|
-
private [_before];
|
|
1410
|
-
/**
|
|
1411
|
-
* 执行after事件
|
|
1412
|
-
* @param chain
|
|
1413
|
-
*/
|
|
1414
|
-
private [_after];
|
|
1415
|
-
/**
|
|
1416
|
-
* 执行销毁事件
|
|
1417
|
-
*/
|
|
1418
|
-
private [_destroy];
|
|
1419
|
-
/**
|
|
1420
|
-
* 加载依赖模块
|
|
1421
|
-
* @param chain
|
|
1422
|
-
* @param depencies
|
|
1423
|
-
*/
|
|
1424
|
-
private [_loadDependency];
|
|
1425
|
-
/**
|
|
1426
|
-
* 加载路由
|
|
1427
|
-
* @param route
|
|
1428
|
-
*/
|
|
1429
|
-
private [_load];
|
|
1430
|
-
/**
|
|
1431
|
-
* 卸载(只能用于卸载多视图上的view)
|
|
1432
|
-
*
|
|
1433
|
-
* @param routes
|
|
1434
|
-
*/
|
|
1435
|
-
private [_unload];
|
|
1436
|
-
/**
|
|
1437
|
-
* 查找root view索引
|
|
1438
|
-
* @param route
|
|
1439
|
-
*/
|
|
1440
|
-
private [_findRootView];
|
|
1441
|
-
/**
|
|
1442
|
-
* 查找first view
|
|
1443
|
-
* @param route
|
|
1444
|
-
*/
|
|
1445
|
-
private [_getFirstView];
|
|
1446
|
-
/**
|
|
1447
|
-
* 移除view
|
|
1448
|
-
* @param page
|
|
1449
|
-
* @param pos
|
|
1450
|
-
* @param indexs
|
|
1451
|
-
* @param under
|
|
1452
|
-
*/
|
|
1453
|
-
private [_removeView];
|
|
1454
|
-
/**
|
|
1455
|
-
* 恢复
|
|
1456
|
-
* @param routes
|
|
1457
|
-
*
|
|
1458
|
-
* @returns
|
|
1459
|
-
*/
|
|
1460
|
-
restore(routes?: Route[]): Promise<void>;
|
|
1461
|
-
/**
|
|
1462
|
-
* build page
|
|
1463
|
-
* @param route
|
|
1464
|
-
* @param routeModel
|
|
1465
|
-
* @returns
|
|
1466
|
-
*/
|
|
1467
|
-
private [_buildPage];
|
|
1468
|
-
/**
|
|
1469
|
-
* 解析组件
|
|
1470
|
-
*/
|
|
1471
|
-
private [_resolveComponent];
|
|
1472
|
-
/**
|
|
1473
|
-
* 更新页面
|
|
1474
|
-
* @param routeModel
|
|
1475
|
-
* @param route
|
|
1476
|
-
* @param session
|
|
1477
|
-
* @param updateType
|
|
1478
|
-
* @returns
|
|
1479
|
-
*/
|
|
1480
|
-
private [_update];
|
|
1481
|
-
/**
|
|
1482
|
-
* 合并view
|
|
1483
|
-
* @param page
|
|
1484
|
-
* @param startViewLevel
|
|
1485
|
-
* @param routeModel
|
|
1486
|
-
* @param startModelLevel
|
|
1487
|
-
* @param rootNodeRef
|
|
1488
|
-
*/
|
|
1489
|
-
[_merge](page: Page, startViewLevel: number, routeModel: RouteModel, startModelLevel: number, rootNodeRef: ViewPlace): void;
|
|
1490
|
-
/**
|
|
1491
|
-
* router view与view同步数据
|
|
1492
|
-
* @param name
|
|
1493
|
-
* @param level
|
|
1494
|
-
* @param rootView
|
|
1495
|
-
* @param rootViewIndex
|
|
1496
|
-
* @param parentView
|
|
1497
|
-
* @param parentViewIndex
|
|
1498
|
-
* @returns
|
|
1499
|
-
*/
|
|
1500
|
-
[sync](name: string, level: number, rootView: View | null, rootViewIndex: number, parentView: View | null, parentViewIndex: number): View | null;
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
declare const registerKey: unique symbol;
|
|
1504
|
-
/**
|
|
1505
|
-
* callback function
|
|
1506
|
-
*/
|
|
1507
|
-
interface Callback {
|
|
1508
|
-
(...args: any[]): void;
|
|
1509
|
-
}
|
|
1510
|
-
/**
|
|
1511
|
-
* 事件代理
|
|
1512
|
-
*/
|
|
1513
|
-
declare class EventProxy {
|
|
1514
|
-
/**
|
|
1515
|
-
* 注册表
|
|
1516
|
-
*/
|
|
1517
|
-
private [registerKey];
|
|
1518
|
-
/**
|
|
1519
|
-
* 构造函数
|
|
1520
|
-
*/
|
|
1521
|
-
constructor();
|
|
1522
|
-
/**
|
|
1523
|
-
* 绑定事件
|
|
1524
|
-
* @param key
|
|
1525
|
-
* @param callback
|
|
1526
|
-
* @param once
|
|
1527
|
-
* @returns
|
|
1528
|
-
*/
|
|
1529
|
-
on(key: string, callback: Callback, once?: boolean): EventProxy;
|
|
1530
|
-
/**
|
|
1531
|
-
* 解除绑定
|
|
1532
|
-
* @param key
|
|
1533
|
-
* @param callback
|
|
1534
|
-
* @returns
|
|
1535
|
-
*/
|
|
1536
|
-
off(key: string, callback: Callback): EventProxy;
|
|
1537
|
-
/**
|
|
1538
|
-
* 绑定事件
|
|
1539
|
-
* @param key
|
|
1540
|
-
* @param callback
|
|
1541
|
-
* @param once
|
|
1542
|
-
* @returns
|
|
1543
|
-
*/
|
|
1544
|
-
bind(key: string, callback: Callback, once?: boolean): EventProxy;
|
|
1545
|
-
/**
|
|
1546
|
-
* 解除绑定
|
|
1547
|
-
* @param key
|
|
1548
|
-
* @param callback
|
|
1549
|
-
* @returns
|
|
1550
|
-
*/
|
|
1551
|
-
unbind(key: string, callback: Callback): EventProxy;
|
|
1552
|
-
/**
|
|
1553
|
-
* 绑定一次性触发函数
|
|
1554
|
-
* @param key
|
|
1555
|
-
* @param callback
|
|
1556
|
-
* @returns
|
|
1557
|
-
*/
|
|
1558
|
-
once(key: string, callback: Callback): EventProxy;
|
|
1559
|
-
/**
|
|
1560
|
-
* 绑定多条件触发函数
|
|
1561
|
-
* @param args
|
|
1562
|
-
*/
|
|
1563
|
-
all(...args: any[]): this;
|
|
1564
|
-
/**
|
|
1565
|
-
* 触发函数
|
|
1566
|
-
* @param key
|
|
1567
|
-
* @param value
|
|
1568
|
-
*/
|
|
1569
|
-
emit(key: string, ...value: any[]): this;
|
|
1570
|
-
/**
|
|
1571
|
-
* 触发函数
|
|
1572
|
-
* @param key
|
|
1573
|
-
* @param value
|
|
1574
|
-
* @returns
|
|
1575
|
-
*/
|
|
1576
|
-
trigger(key: string, ...value: any[]): EventProxy;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
/**
|
|
1580
|
-
* 是否数组
|
|
1581
|
-
*/
|
|
1582
|
-
declare const isArray: (arg: any) => arg is any[];
|
|
1583
|
-
/**
|
|
1584
|
-
* 是否为Map
|
|
1585
|
-
* @param val
|
|
1586
|
-
* @returns
|
|
1587
|
-
*/
|
|
1588
|
-
declare const isMap: (val: unknown) => val is Map<any, any>;
|
|
1589
|
-
/**
|
|
1590
|
-
* 是否为Set
|
|
1591
|
-
* @param val
|
|
1592
|
-
* @returns
|
|
1593
|
-
*/
|
|
1594
|
-
declare const isSet: (val: unknown) => val is Set<any>;
|
|
1595
|
-
/**
|
|
1596
|
-
* 是否为Date
|
|
1597
|
-
* @param val
|
|
1598
|
-
* @returns
|
|
1599
|
-
*/
|
|
1600
|
-
declare const isDate: (val: unknown) => val is Date;
|
|
1601
|
-
/**
|
|
1602
|
-
* 是否为函数
|
|
1603
|
-
* @param val
|
|
1604
|
-
* @returns
|
|
1605
|
-
*/
|
|
1606
|
-
declare const isFunction: (val: unknown) => val is Function;
|
|
1607
|
-
/**
|
|
1608
|
-
* 是否为字符串
|
|
1609
|
-
* @param val
|
|
1610
|
-
* @returns
|
|
1611
|
-
*/
|
|
1612
|
-
declare const isString: (val: unknown) => val is string;
|
|
1613
|
-
/**
|
|
1614
|
-
* 是否为symbol
|
|
1615
|
-
* @param val
|
|
1616
|
-
* @returns
|
|
1617
|
-
*/
|
|
1618
|
-
declare const isSymbol: (val: unknown) => val is symbol;
|
|
1619
|
-
/**
|
|
1620
|
-
* 是否为object
|
|
1621
|
-
*/
|
|
1622
|
-
declare const isObject: (val: unknown) => val is Record<any, any>;
|
|
1623
|
-
/**
|
|
1624
|
-
* 是否为promise
|
|
1625
|
-
* @param val
|
|
1626
|
-
* @returns
|
|
1627
|
-
*/
|
|
1628
|
-
declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
|
|
1629
|
-
declare const toTypeString: (value: unknown) => string;
|
|
1630
|
-
/**
|
|
1631
|
-
* 是否为plain对象
|
|
1632
|
-
* @param val
|
|
1633
|
-
* @returns
|
|
1634
|
-
*/
|
|
1635
|
-
declare const isPlainObject: (val: unknown) => val is object;
|
|
1636
|
-
/**
|
|
1637
|
-
* 是否为es module
|
|
1638
|
-
* @param obj
|
|
1639
|
-
* @returns
|
|
1640
|
-
*/
|
|
1641
|
-
declare function isESModule(obj: any): obj is Object;
|
|
1642
|
-
/**
|
|
1643
|
-
* 继承(是否深度拷贝,dest,src1,src2,src3...)
|
|
1644
|
-
*
|
|
1645
|
-
* @returns
|
|
1646
|
-
*/
|
|
1647
|
-
declare function extend(...args: any[]): any;
|
|
1648
|
-
/**
|
|
1649
|
-
* 克隆对象
|
|
1650
|
-
* @param target
|
|
1651
|
-
* @param source
|
|
1652
|
-
* @param plain
|
|
1653
|
-
*
|
|
1654
|
-
* @returns
|
|
1655
|
-
*/
|
|
1656
|
-
declare function clone(target: any, source: any, plain?: boolean): any;
|
|
1657
|
-
/**
|
|
1658
|
-
* 转换为boolean值
|
|
1659
|
-
* @param val
|
|
1660
|
-
* @returns
|
|
1661
|
-
*/
|
|
1662
|
-
declare function toBoolean(val: unknown): boolean;
|
|
1663
|
-
/**
|
|
1664
|
-
* 转换为number值
|
|
1665
|
-
* @param val
|
|
1666
|
-
* @returns
|
|
1667
|
-
*/
|
|
1668
|
-
declare function toNumber(val: unknown): number;
|
|
1669
|
-
/**
|
|
1670
|
-
* 判断两个对象是否一致
|
|
1671
|
-
* @param x
|
|
1672
|
-
* @param y
|
|
1673
|
-
* @returns {boolean}
|
|
1674
|
-
*/
|
|
1675
|
-
declare function isEqual(x: any, y: any): boolean;
|
|
1676
|
-
|
|
1677
|
-
/**
|
|
1678
|
-
* 发起请求
|
|
1679
|
-
* @param args
|
|
1680
|
-
* @returns
|
|
1681
|
-
*/
|
|
1682
|
-
declare function request(args: any): Promise<any>;
|
|
1683
|
-
/**
|
|
1684
|
-
* 取消ajax请求
|
|
1685
|
-
* @param id
|
|
1686
|
-
*/
|
|
1687
|
-
declare function cancel(id: any): boolean;
|
|
1688
|
-
|
|
1689
|
-
interface GenericFunction {
|
|
1690
|
-
(...args: any[]): any;
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
|
-
declare let onFoxActivated: (hook: GenericFunction) => void;
|
|
1694
|
-
declare let onFoxDeactivated: (hook: GenericFunction) => void;
|
|
1695
|
-
|
|
1696
|
-
/**
|
|
1697
|
-
* Tool工具集合接口
|
|
1698
|
-
*/
|
|
1699
|
-
interface Tools {
|
|
1700
|
-
get each(): Function;
|
|
1701
|
-
get type(): Function;
|
|
1702
|
-
get isFunction(): Function;
|
|
1703
|
-
get isArray(): Function;
|
|
1704
|
-
get isArrayLike(): Function;
|
|
1705
|
-
get makeArray(): Function;
|
|
1706
|
-
get merge(): Function;
|
|
1707
|
-
get isWindow(): Function;
|
|
1708
|
-
get isPlainObject(): Function;
|
|
1709
|
-
get isEqual(): Function;
|
|
1710
|
-
}
|
|
1711
|
-
|
|
1712
|
-
/**
|
|
1713
|
-
* storage
|
|
1714
|
-
*/
|
|
1715
|
-
interface Storage {
|
|
1716
|
-
/**
|
|
1717
|
-
* 获取item
|
|
1718
|
-
* @param key
|
|
1719
|
-
*/
|
|
1720
|
-
getItem(key: string): string | null;
|
|
1721
|
-
/**
|
|
1722
|
-
* 设置item
|
|
1723
|
-
* @param key
|
|
1724
|
-
* @param value
|
|
1725
|
-
*/
|
|
1726
|
-
setItem(key: string, value: string): void;
|
|
1727
|
-
/**
|
|
1728
|
-
* remove item
|
|
1729
|
-
* @param key
|
|
1730
|
-
*/
|
|
1731
|
-
removeItem(key: string): void;
|
|
1732
|
-
}
|
|
1733
|
-
/**
|
|
1734
|
-
* 创建web history
|
|
1735
|
-
* @param navigateFirstRoute
|
|
1736
|
-
* @param base
|
|
1737
|
-
* @param query
|
|
1738
|
-
* @param historyMonitor
|
|
1739
|
-
* @param traceless
|
|
1740
|
-
* @param storage
|
|
1741
|
-
* @returns
|
|
1742
|
-
*/
|
|
1743
|
-
declare function createWebHistory(navigateFirstRoute?: boolean, base?: string | null, query?: string, historyMonitor?: boolean, traceless?: boolean, storage?: Storage): RouterHistory;
|
|
1744
|
-
/**
|
|
1745
|
-
* 创建web hash history
|
|
1746
|
-
* @param navigateFirstRoute
|
|
1747
|
-
* @param query
|
|
1748
|
-
* @param historyMonitor
|
|
1749
|
-
* @param traceless
|
|
1750
|
-
* @param storage
|
|
1751
|
-
* @returns
|
|
1752
|
-
*/
|
|
1753
|
-
declare function createWebHashHistory(navigateFirstRoute?: boolean, query?: string, historyMonitor?: boolean, traceless?: boolean, storage?: Storage): RouterHistory;
|
|
1754
|
-
|
|
1755
|
-
/**
|
|
1756
|
-
* 创建memory history
|
|
1757
|
-
* @param base
|
|
1758
|
-
* @param maxHistoryRecorderSize
|
|
1759
|
-
* @returns
|
|
1760
|
-
*/
|
|
1761
|
-
declare function createMemoryHistory(base?: string, maxHistoryRecorderSize?: number): RouterHistory;
|
|
1762
|
-
|
|
1763
|
-
/**
|
|
1764
|
-
* 全局Fox
|
|
1765
|
-
*/
|
|
1766
|
-
declare const foxKey: InjectionKey<Fox>;
|
|
1767
|
-
/**
|
|
1768
|
-
* 全局Bus
|
|
1769
|
-
*/
|
|
1770
|
-
declare const foxBusKey: InjectionKey<Tree>;
|
|
1771
|
-
/**
|
|
1772
|
-
* 全局Event Proxy
|
|
1773
|
-
*/
|
|
1774
|
-
declare const foxEventProxyKey: InjectionKey<EventProxy>;
|
|
1775
|
-
/**
|
|
1776
|
-
* 参数
|
|
1777
|
-
*/
|
|
1778
|
-
interface FoxOptions extends RouterOptions {
|
|
1779
|
-
}
|
|
1780
|
-
/**
|
|
1781
|
-
* Fox接口
|
|
1782
|
-
*/
|
|
1783
|
-
interface Fox extends Tools {
|
|
1784
|
-
/**
|
|
1785
|
-
* 返回router
|
|
1786
|
-
*/
|
|
1787
|
-
get router(): Router;
|
|
1788
|
-
/**
|
|
1789
|
-
* 返回全局Bus
|
|
1790
|
-
*/
|
|
1791
|
-
get bus(): Tree;
|
|
1792
|
-
/**
|
|
1793
|
-
* 返回Bus类型
|
|
1794
|
-
*/
|
|
1795
|
-
get Bus(): typeof Bus;
|
|
1796
|
-
/**
|
|
1797
|
-
* 返回全局event proxy
|
|
1798
|
-
*/
|
|
1799
|
-
get eventproxy(): EventProxy;
|
|
1800
|
-
/**
|
|
1801
|
-
* 返回全局event proxy
|
|
1802
|
-
*/
|
|
1803
|
-
get EventProxy(): typeof EventProxy;
|
|
1804
|
-
/**
|
|
1805
|
-
* 返回event chain类型
|
|
1806
|
-
*/
|
|
1807
|
-
get EventChain(): typeof EventChain;
|
|
1808
|
-
/**
|
|
1809
|
-
* 返回require
|
|
1810
|
-
*/
|
|
1811
|
-
get require(): Require | null;
|
|
1812
|
-
/**
|
|
1813
|
-
* 返回fectch
|
|
1814
|
-
*/
|
|
1815
|
-
get request(): Function;
|
|
1816
|
-
/**
|
|
1817
|
-
* 返回extend
|
|
1818
|
-
*/
|
|
1819
|
-
get extend(): Function;
|
|
1820
|
-
/**
|
|
1821
|
-
* 返回clone
|
|
1822
|
-
*/
|
|
1823
|
-
get clone(): Function;
|
|
1824
|
-
/**
|
|
1825
|
-
* 安装
|
|
1826
|
-
* @param app
|
|
1827
|
-
*/
|
|
1828
|
-
install(app: App): void;
|
|
1829
|
-
}
|
|
1830
|
-
/**
|
|
1831
|
-
* 创建Fox
|
|
1832
|
-
* @param options
|
|
1833
|
-
* @returns
|
|
1834
|
-
*/
|
|
1835
|
-
declare function createFox(options?: FoxOptions): Fox;
|
|
1836
|
-
/**
|
|
1837
|
-
* Returns the current router
|
|
1838
|
-
* @returns
|
|
1839
|
-
*/
|
|
1840
|
-
declare function useRouter(proxy?: ComponentPublicInstance): Router;
|
|
1841
|
-
/**
|
|
1842
|
-
* Returns the current route
|
|
1843
|
-
* @param proxy
|
|
1844
|
-
* @returns
|
|
1845
|
-
*/
|
|
1846
|
-
declare function useRoute(proxy?: ComponentPublicInstance): Route | null;
|
|
1847
|
-
/**
|
|
1848
|
-
* Returns the current fox
|
|
1849
|
-
* @param proxy
|
|
1850
|
-
* @returns
|
|
1851
|
-
*/
|
|
1852
|
-
declare function useFox(proxy?: ComponentPublicInstance): Fox;
|
|
1853
|
-
/**
|
|
1854
|
-
* Returns the global bus
|
|
1855
|
-
* @param proxy
|
|
1856
|
-
* @returns
|
|
1857
|
-
*/
|
|
1858
|
-
declare function useBus(proxy?: ComponentPublicInstance): Tree;
|
|
1859
|
-
/**
|
|
1860
|
-
* Returns the global event proxy
|
|
1861
|
-
* @param proxy
|
|
1862
|
-
* @returns
|
|
1863
|
-
*/
|
|
1864
|
-
declare function useEventProxy(proxy?: ComponentPublicInstance): EventProxy;
|
|
1865
|
-
/**
|
|
1866
|
-
* 路由更新前执行
|
|
1867
|
-
* @param callback
|
|
1868
|
-
*/
|
|
1869
|
-
declare function onBeforeRouteUpdate(callback: {
|
|
1870
|
-
(to: Route, from?: Route): void;
|
|
1871
|
-
}): void;
|
|
1872
|
-
/**
|
|
1873
|
-
* 路由更新后执行
|
|
1874
|
-
* @param callback
|
|
1875
|
-
*/
|
|
1876
|
-
declare function onAfterRouteUpdate(callback: {
|
|
1877
|
-
(to: Route, from?: Route): void;
|
|
1878
|
-
}): void;
|
|
1879
|
-
|
|
1880
|
-
export { Bus, EventChain, EventProxy, Route, Router, cancel, clone, createFox, createMemoryHistory, createWebHashHistory, createWebHistory, extend, foxBusKey, foxEventProxyKey, foxKey, isArray, isDate, isESModule, isEqual, isFunction, isMap, isObject, isPlainObject, isPromise, isSet, isString, isSymbol, onAfterRouteUpdate, onBeforeRouteUpdate, onFoxActivated, onFoxDeactivated, request, toBoolean, toNumber, toTypeString, useBus, useEventProxy, useFox, useRoute, useRouter };
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { clone } from './util/commons';
|
|
3
|
+
import { ComponentPublicInstance } from 'vue';
|
|
4
|
+
import { extend } from './util/commons';
|
|
5
|
+
import { InjectionKey } from 'vue';
|
|
6
|
+
import { isArray } from './util/commons';
|
|
7
|
+
import { isDate } from './util/commons';
|
|
8
|
+
import { isEqual } from './util/commons';
|
|
9
|
+
import { isESModule } from './util/commons';
|
|
10
|
+
import { isFunction } from './util/commons';
|
|
11
|
+
import { isMap } from './util/commons';
|
|
12
|
+
import { isObject } from './util/commons';
|
|
13
|
+
import { isPlainObject } from './util/commons';
|
|
14
|
+
import { isPromise } from './util/commons';
|
|
15
|
+
import { isSet } from './util/commons';
|
|
16
|
+
import { isString } from './util/commons';
|
|
17
|
+
import { isSymbol } from './util/commons';
|
|
18
|
+
import { toBoolean } from './util/commons';
|
|
19
|
+
import { toNumber } from './util/commons';
|
|
20
|
+
import { toTypeString } from './util/commons';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* after route update filter
|
|
24
|
+
*/
|
|
25
|
+
declare interface AfterRouteFilter {
|
|
26
|
+
(to: Route, from: Route, session: Record<string | number | symbol, any>): void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* before route update filter
|
|
31
|
+
*/
|
|
32
|
+
declare interface BeforeRouteFilter {
|
|
33
|
+
(to: Route, from: Route, next: {
|
|
34
|
+
(pass?: boolean | Route): void;
|
|
35
|
+
}, session: Record<string | number | symbol, any>): void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 导出Bus
|
|
40
|
+
*/
|
|
41
|
+
export declare let Bus: any;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* callback function
|
|
45
|
+
*/
|
|
46
|
+
declare interface Callback {
|
|
47
|
+
(...args: any[]): void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 取消ajax请求
|
|
52
|
+
* @param id
|
|
53
|
+
*/
|
|
54
|
+
export declare function cancel(id: any): boolean;
|
|
55
|
+
|
|
56
|
+
export { clone }
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 创建Fox
|
|
60
|
+
* @param options
|
|
61
|
+
* @returns
|
|
62
|
+
*/
|
|
63
|
+
export declare function createFox(options?: FoxOptions): Fox;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 创建memory history
|
|
67
|
+
* @param base
|
|
68
|
+
* @param maxHistoryRecorderSize
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
export declare function createMemoryHistory(base?: string, maxHistoryRecorderSize?: number): RouterHistory;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 创建web hash history
|
|
75
|
+
* @param navigateFirstRoute
|
|
76
|
+
* @param query
|
|
77
|
+
* @param historyMonitor
|
|
78
|
+
* @param traceless
|
|
79
|
+
* @param storage
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
82
|
+
export declare function createWebHashHistory(navigateFirstRoute?: boolean, query?: string, historyMonitor?: boolean | IfFunction, traceless?: boolean | IfFunction, storage?: Storage_2): RouterHistory;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 创建web history
|
|
86
|
+
* @param navigateFirstRoute
|
|
87
|
+
* @param base
|
|
88
|
+
* @param query
|
|
89
|
+
* @param historyMonitor
|
|
90
|
+
* @param traceless
|
|
91
|
+
* @param storage
|
|
92
|
+
* @returns
|
|
93
|
+
*/
|
|
94
|
+
export declare function createWebHistory(navigateFirstRoute?: boolean, base?: string | null, query?: string, historyMonitor?: boolean | IfFunction, traceless?: boolean | IfFunction, storage?: Storage_2): RouterHistory;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* destroy route update filter
|
|
98
|
+
*/
|
|
99
|
+
declare interface DestroyRouteFilter {
|
|
100
|
+
(to: Route, session: Record<string | number | symbol, any>): void;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* 完成Task类型(Exception,Finish, Wait)
|
|
105
|
+
*/
|
|
106
|
+
declare interface EndTask {
|
|
107
|
+
(context: {
|
|
108
|
+
session: EventChainSession;
|
|
109
|
+
}, ...args: any[]): void;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* 任务链路
|
|
114
|
+
*/
|
|
115
|
+
export declare class EventChain {
|
|
116
|
+
/**
|
|
117
|
+
* 获取session
|
|
118
|
+
*/
|
|
119
|
+
get session(): EventChainSession | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* 构造函数
|
|
122
|
+
*
|
|
123
|
+
* @param session
|
|
124
|
+
* @param persistentMode
|
|
125
|
+
*/
|
|
126
|
+
constructor(session?: EventChainSession, persistentMode?: boolean);
|
|
127
|
+
/**
|
|
128
|
+
* 跳转
|
|
129
|
+
* @param step
|
|
130
|
+
* @param params
|
|
131
|
+
*/
|
|
132
|
+
go(step: number, ...params: any[]): EventChain;
|
|
133
|
+
/**
|
|
134
|
+
* 结束事件链调用,直接触发wait函数(success方法)
|
|
135
|
+
* @param params
|
|
136
|
+
*/
|
|
137
|
+
finish(...params: any[]): EventChain;
|
|
138
|
+
/**
|
|
139
|
+
* 结束事件链调用,直接触发wait函数(error方法)
|
|
140
|
+
* @param params
|
|
141
|
+
*/
|
|
142
|
+
reject(...params: any[]): EventChain;
|
|
143
|
+
/**
|
|
144
|
+
* 结束事件链调用,直接触发error函数
|
|
145
|
+
* @param params
|
|
146
|
+
*/
|
|
147
|
+
throw(...params: any[]): EventChain;
|
|
148
|
+
/**
|
|
149
|
+
* 重置事件链,直接触发wait函数
|
|
150
|
+
* @param params
|
|
151
|
+
*/
|
|
152
|
+
reset(...params: any[]): EventChain;
|
|
153
|
+
/**
|
|
154
|
+
* 加入任务
|
|
155
|
+
* @param task
|
|
156
|
+
* @returns {EventChain}
|
|
157
|
+
*/
|
|
158
|
+
post(task: Task): EventChain;
|
|
159
|
+
/**
|
|
160
|
+
* 加入等待任务
|
|
161
|
+
* @param successFn
|
|
162
|
+
* @param errorFn
|
|
163
|
+
* @returns
|
|
164
|
+
*/
|
|
165
|
+
wait(successFn: EndTask, errorFn: EndTask): EventChain;
|
|
166
|
+
/**
|
|
167
|
+
* 加入异常处理任务
|
|
168
|
+
* @param errorFn
|
|
169
|
+
* @returns
|
|
170
|
+
*/
|
|
171
|
+
exception(errorFn: EndTask): EventChain;
|
|
172
|
+
/**
|
|
173
|
+
* 判断事件链是否已经执行完成
|
|
174
|
+
* @returns {boolean}
|
|
175
|
+
*/
|
|
176
|
+
isFinish(): boolean;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* event chain 上下文
|
|
181
|
+
*/
|
|
182
|
+
declare interface EventChainContext {
|
|
183
|
+
/**
|
|
184
|
+
* 任务跳转
|
|
185
|
+
*/
|
|
186
|
+
go: {
|
|
187
|
+
(step: number, ...args: any[]): void;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* 触发链路
|
|
191
|
+
*/
|
|
192
|
+
resolve: {
|
|
193
|
+
(...args: any[]): void;
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* 中断链路
|
|
197
|
+
*/
|
|
198
|
+
reject: {
|
|
199
|
+
(...args: any[]): void;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* 插入任务
|
|
203
|
+
*/
|
|
204
|
+
insert: {
|
|
205
|
+
(...args: any[]): void;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* chain session
|
|
209
|
+
*/
|
|
210
|
+
session: EventChainSession;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Session类型
|
|
215
|
+
*/
|
|
216
|
+
declare interface EventChainSession {
|
|
217
|
+
[propName: string]: any;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* 事件代理
|
|
222
|
+
*/
|
|
223
|
+
export declare class EventProxy {
|
|
224
|
+
/**
|
|
225
|
+
* 构造函数
|
|
226
|
+
*/
|
|
227
|
+
constructor();
|
|
228
|
+
/**
|
|
229
|
+
* 绑定事件
|
|
230
|
+
* @param key
|
|
231
|
+
* @param callback
|
|
232
|
+
* @param once
|
|
233
|
+
* @returns
|
|
234
|
+
*/
|
|
235
|
+
on(key: string, callback: Callback, once?: boolean): EventProxy;
|
|
236
|
+
/**
|
|
237
|
+
* 解除绑定
|
|
238
|
+
* @param key
|
|
239
|
+
* @param callback
|
|
240
|
+
* @returns
|
|
241
|
+
*/
|
|
242
|
+
off(key: string, callback: Callback): EventProxy;
|
|
243
|
+
/**
|
|
244
|
+
* 绑定事件
|
|
245
|
+
* @param key
|
|
246
|
+
* @param callback
|
|
247
|
+
* @param once
|
|
248
|
+
* @returns
|
|
249
|
+
*/
|
|
250
|
+
bind(key: string, callback: Callback, once?: boolean): EventProxy;
|
|
251
|
+
/**
|
|
252
|
+
* 解除绑定
|
|
253
|
+
* @param key
|
|
254
|
+
* @param callback
|
|
255
|
+
* @returns
|
|
256
|
+
*/
|
|
257
|
+
unbind(key: string, callback: Callback): EventProxy;
|
|
258
|
+
/**
|
|
259
|
+
* 绑定一次性触发函数
|
|
260
|
+
* @param key
|
|
261
|
+
* @param callback
|
|
262
|
+
* @returns
|
|
263
|
+
*/
|
|
264
|
+
once(key: string, callback: Callback): EventProxy;
|
|
265
|
+
/**
|
|
266
|
+
* 绑定多条件触发函数
|
|
267
|
+
* @param args
|
|
268
|
+
*/
|
|
269
|
+
all(...args: any[]): this;
|
|
270
|
+
/**
|
|
271
|
+
* 触发函数
|
|
272
|
+
* @param key
|
|
273
|
+
* @param value
|
|
274
|
+
*/
|
|
275
|
+
emit(key: string, ...value: any[]): this;
|
|
276
|
+
/**
|
|
277
|
+
* 触发函数
|
|
278
|
+
* @param key
|
|
279
|
+
* @param value
|
|
280
|
+
* @returns
|
|
281
|
+
*/
|
|
282
|
+
trigger(key: string, ...value: any[]): EventProxy;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export { extend }
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Fox接口
|
|
289
|
+
*/
|
|
290
|
+
declare interface Fox extends Tools {
|
|
291
|
+
/**
|
|
292
|
+
* 返回router
|
|
293
|
+
*/
|
|
294
|
+
get router(): Router;
|
|
295
|
+
/**
|
|
296
|
+
* 返回全局Bus
|
|
297
|
+
*/
|
|
298
|
+
get bus(): Tree;
|
|
299
|
+
/**
|
|
300
|
+
* 返回Bus类型
|
|
301
|
+
*/
|
|
302
|
+
get Bus(): typeof Bus;
|
|
303
|
+
/**
|
|
304
|
+
* 返回全局event proxy
|
|
305
|
+
*/
|
|
306
|
+
get eventproxy(): EventProxy;
|
|
307
|
+
/**
|
|
308
|
+
* 返回全局event proxy
|
|
309
|
+
*/
|
|
310
|
+
get EventProxy(): typeof EventProxy;
|
|
311
|
+
/**
|
|
312
|
+
* 返回event chain类型
|
|
313
|
+
*/
|
|
314
|
+
get EventChain(): typeof EventChain;
|
|
315
|
+
/**
|
|
316
|
+
* 返回require
|
|
317
|
+
*/
|
|
318
|
+
get require(): Require | null;
|
|
319
|
+
/**
|
|
320
|
+
* 返回fectch
|
|
321
|
+
*/
|
|
322
|
+
get request(): Function;
|
|
323
|
+
/**
|
|
324
|
+
* 返回extend
|
|
325
|
+
*/
|
|
326
|
+
get extend(): Function;
|
|
327
|
+
/**
|
|
328
|
+
* 返回clone
|
|
329
|
+
*/
|
|
330
|
+
get clone(): Function;
|
|
331
|
+
/**
|
|
332
|
+
* 安装
|
|
333
|
+
* @param app
|
|
334
|
+
*/
|
|
335
|
+
install(app: App): void;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* 全局Bus
|
|
340
|
+
*/
|
|
341
|
+
export declare const foxBusKey: InjectionKey<Tree>;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* 全局Event Proxy
|
|
345
|
+
*/
|
|
346
|
+
export declare const foxEventProxyKey: InjectionKey<EventProxy>;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* 全局Fox
|
|
350
|
+
*/
|
|
351
|
+
export declare const foxKey: InjectionKey<Fox>;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* 参数
|
|
355
|
+
*/
|
|
356
|
+
declare interface FoxOptions extends RouterOptions {
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
declare interface GenericFunction {
|
|
360
|
+
(...args: any[]): any;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* history change handler
|
|
365
|
+
*/
|
|
366
|
+
declare interface HistoryChangeHandler {
|
|
367
|
+
(args: Array<Route> | string): void;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* If Function
|
|
372
|
+
*/
|
|
373
|
+
declare interface IfFunction {
|
|
374
|
+
(...args: any[]): boolean;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export { isArray }
|
|
378
|
+
|
|
379
|
+
export { isDate }
|
|
380
|
+
|
|
381
|
+
export { isEqual }
|
|
382
|
+
|
|
383
|
+
export { isESModule }
|
|
384
|
+
|
|
385
|
+
export { isFunction }
|
|
386
|
+
|
|
387
|
+
export { isMap }
|
|
388
|
+
|
|
389
|
+
export { isObject }
|
|
390
|
+
|
|
391
|
+
export { isPlainObject }
|
|
392
|
+
|
|
393
|
+
export { isPromise }
|
|
394
|
+
|
|
395
|
+
export { isSet }
|
|
396
|
+
|
|
397
|
+
export { isString }
|
|
398
|
+
|
|
399
|
+
export { isSymbol }
|
|
400
|
+
|
|
401
|
+
declare class MarkRecord {
|
|
402
|
+
currentRoute: Route;
|
|
403
|
+
routes: Array<Route>;
|
|
404
|
+
/**
|
|
405
|
+
* 构造函数
|
|
406
|
+
* @param currentRoute
|
|
407
|
+
* @param routes
|
|
408
|
+
*/
|
|
409
|
+
constructor(currentRoute: Route, routes: Array<Route>);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* model (RouteModel > ModelLayer > Model)
|
|
414
|
+
*/
|
|
415
|
+
declare class Model {
|
|
416
|
+
/**
|
|
417
|
+
* 唯一ID(用于区分model)
|
|
418
|
+
*/
|
|
419
|
+
id: number;
|
|
420
|
+
/**
|
|
421
|
+
* 名称
|
|
422
|
+
*/
|
|
423
|
+
name: string;
|
|
424
|
+
/**
|
|
425
|
+
* 属性
|
|
426
|
+
*/
|
|
427
|
+
props: Record<string | number | symbol, any> | boolean | {
|
|
428
|
+
(route: Route): any;
|
|
429
|
+
} | undefined;
|
|
430
|
+
/**
|
|
431
|
+
* 元数据
|
|
432
|
+
*/
|
|
433
|
+
meta?: Record<string | number | symbol, any>;
|
|
434
|
+
/**
|
|
435
|
+
* 原始组件数据
|
|
436
|
+
*/
|
|
437
|
+
src: any;
|
|
438
|
+
/**
|
|
439
|
+
* 组件(解析后组件)
|
|
440
|
+
*/
|
|
441
|
+
component: any;
|
|
442
|
+
/**
|
|
443
|
+
* 构造函数
|
|
444
|
+
*
|
|
445
|
+
* @param name
|
|
446
|
+
* @param src
|
|
447
|
+
* @param props
|
|
448
|
+
* @param meta
|
|
449
|
+
*/
|
|
450
|
+
constructor(name: string, src: any, props?: Record<string | number | symbol, any> | {
|
|
451
|
+
(route: Route): any;
|
|
452
|
+
} | boolean, meta?: Record<string | number | symbol, any>);
|
|
453
|
+
/**
|
|
454
|
+
* 是否已经解析完成
|
|
455
|
+
*/
|
|
456
|
+
get isResolved(): boolean;
|
|
457
|
+
/**
|
|
458
|
+
* 解析组件
|
|
459
|
+
*/
|
|
460
|
+
resolve(): Promise<void>;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* 层(RouteModel > ModelLayer > Model)
|
|
465
|
+
*/
|
|
466
|
+
declare class ModelLayer {
|
|
467
|
+
/**
|
|
468
|
+
* 节点
|
|
469
|
+
*/
|
|
470
|
+
models: Model[];
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* 操作类型
|
|
475
|
+
* @type {Enum}
|
|
476
|
+
*/
|
|
477
|
+
declare enum ModuleStatus {
|
|
478
|
+
/**
|
|
479
|
+
* 加载中
|
|
480
|
+
*/
|
|
481
|
+
Loading = 0,
|
|
482
|
+
/**
|
|
483
|
+
* 加载完成
|
|
484
|
+
*/
|
|
485
|
+
Loaded = 1,
|
|
486
|
+
/**
|
|
487
|
+
* 定义中状态
|
|
488
|
+
*/
|
|
489
|
+
Defining = 2,
|
|
490
|
+
/**
|
|
491
|
+
* 定义完成状态
|
|
492
|
+
*/
|
|
493
|
+
Defined = 3
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* 路由更新后执行
|
|
498
|
+
* @param callback
|
|
499
|
+
*/
|
|
500
|
+
export declare function onAfterRouteUpdate(callback: {
|
|
501
|
+
(to: Route, from?: Route): void;
|
|
502
|
+
}): void;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* 路由更新前执行
|
|
506
|
+
* @param callback
|
|
507
|
+
*/
|
|
508
|
+
export declare function onBeforeRouteUpdate(callback: {
|
|
509
|
+
(to: Route, from?: Route): void;
|
|
510
|
+
}): void;
|
|
511
|
+
|
|
512
|
+
export declare let onFoxActivated: (hook: GenericFunction) => void;
|
|
513
|
+
|
|
514
|
+
export declare let onFoxDeactivated: (hook: GenericFunction) => void;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* 操作类型
|
|
518
|
+
* @type {Enum}
|
|
519
|
+
*/
|
|
520
|
+
declare enum OperationType {
|
|
521
|
+
/**
|
|
522
|
+
* Push策略(生产历史记录)
|
|
523
|
+
*/
|
|
524
|
+
Push = 0,
|
|
525
|
+
/**
|
|
526
|
+
* 替换策略(替换当前历史记录)
|
|
527
|
+
*/
|
|
528
|
+
Replace = 1,
|
|
529
|
+
/**
|
|
530
|
+
* 修改策略(不影响历史记录)
|
|
531
|
+
*/
|
|
532
|
+
Put = 2,
|
|
533
|
+
/**
|
|
534
|
+
* 增加策略(生成历史记录)
|
|
535
|
+
*/
|
|
536
|
+
Append = 3,
|
|
537
|
+
/**
|
|
538
|
+
* 打开策略,如果不存在则打开,否则切换(生成历史记录)
|
|
539
|
+
*/
|
|
540
|
+
Open = 4
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* 进程
|
|
545
|
+
*/
|
|
546
|
+
declare class Progress {
|
|
547
|
+
/**
|
|
548
|
+
* 回调函数
|
|
549
|
+
*/
|
|
550
|
+
private callback;
|
|
551
|
+
/**
|
|
552
|
+
* values
|
|
553
|
+
*/
|
|
554
|
+
private values;
|
|
555
|
+
/**
|
|
556
|
+
* 状态
|
|
557
|
+
*/
|
|
558
|
+
private status;
|
|
559
|
+
/**
|
|
560
|
+
* 工作量
|
|
561
|
+
*/
|
|
562
|
+
private size;
|
|
563
|
+
/**
|
|
564
|
+
* 最新的index
|
|
565
|
+
*/
|
|
566
|
+
private lastIndex;
|
|
567
|
+
/**
|
|
568
|
+
* 构造函数
|
|
569
|
+
*/
|
|
570
|
+
constructor(size: number, callback: {
|
|
571
|
+
(status: ModuleStatus, values: any[]): void;
|
|
572
|
+
});
|
|
573
|
+
/**
|
|
574
|
+
* work
|
|
575
|
+
* @param status 工作状态(true/false)
|
|
576
|
+
* @param index
|
|
577
|
+
* @param value
|
|
578
|
+
*/
|
|
579
|
+
work(status: boolean, index: number, value: any): void;
|
|
580
|
+
/**
|
|
581
|
+
* 判断进程是否为正常状态
|
|
582
|
+
*/
|
|
583
|
+
isOK(): boolean;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* 发起请求
|
|
588
|
+
* @param args
|
|
589
|
+
* @returns
|
|
590
|
+
*/
|
|
591
|
+
export declare function request(args: any): Promise<any>;
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* AMD加载器
|
|
595
|
+
*/
|
|
596
|
+
declare class Require {
|
|
597
|
+
/**
|
|
598
|
+
* head对象
|
|
599
|
+
*/
|
|
600
|
+
private head;
|
|
601
|
+
/**
|
|
602
|
+
* 是否为老的webkit浏览器
|
|
603
|
+
*/
|
|
604
|
+
private isOldWebKit;
|
|
605
|
+
/**
|
|
606
|
+
* moudel manager
|
|
607
|
+
* @type {ModuleManager}
|
|
608
|
+
*/
|
|
609
|
+
private moduleManager;
|
|
610
|
+
/**
|
|
611
|
+
* resource
|
|
612
|
+
*/
|
|
613
|
+
private resource;
|
|
614
|
+
/**
|
|
615
|
+
* 参数配置
|
|
616
|
+
*/
|
|
617
|
+
private options;
|
|
618
|
+
/**
|
|
619
|
+
* 设置query
|
|
620
|
+
*/
|
|
621
|
+
private _query?;
|
|
622
|
+
/**
|
|
623
|
+
* 设置query
|
|
624
|
+
*/
|
|
625
|
+
set query(val: Record<string, string | number> | undefined);
|
|
626
|
+
/**
|
|
627
|
+
* 获取query
|
|
628
|
+
*/
|
|
629
|
+
get query(): Record<string, string | number> | undefined;
|
|
630
|
+
/**
|
|
631
|
+
* 构造函数
|
|
632
|
+
*/
|
|
633
|
+
constructor(options?: any);
|
|
634
|
+
/**
|
|
635
|
+
* 加载
|
|
636
|
+
*/
|
|
637
|
+
ensure(...args: any[]): Require;
|
|
638
|
+
/**
|
|
639
|
+
* 卸载
|
|
640
|
+
*/
|
|
641
|
+
remove(...args: any): Require;
|
|
642
|
+
/**
|
|
643
|
+
* 加载
|
|
644
|
+
*
|
|
645
|
+
* @param chain
|
|
646
|
+
* @param taskNode
|
|
647
|
+
*/
|
|
648
|
+
mount(chain: EventChain, taskNode: TaskNode): void;
|
|
649
|
+
/**
|
|
650
|
+
* 加载html
|
|
651
|
+
*
|
|
652
|
+
* @param chain
|
|
653
|
+
* @param task
|
|
654
|
+
* @param point
|
|
655
|
+
*/
|
|
656
|
+
private mountHTML;
|
|
657
|
+
/**
|
|
658
|
+
* 加载css
|
|
659
|
+
* @param chain
|
|
660
|
+
* @param task
|
|
661
|
+
* @param point
|
|
662
|
+
*/
|
|
663
|
+
private mountCSS;
|
|
664
|
+
/**
|
|
665
|
+
* 加载js
|
|
666
|
+
*
|
|
667
|
+
* @param chain
|
|
668
|
+
* @param task
|
|
669
|
+
* @param point
|
|
670
|
+
*/
|
|
671
|
+
private mountJS;
|
|
672
|
+
/**
|
|
673
|
+
* 卸载资源
|
|
674
|
+
*/
|
|
675
|
+
unmount(path: string, options?: any): void;
|
|
676
|
+
/**
|
|
677
|
+
* 去掉空元素
|
|
678
|
+
*/
|
|
679
|
+
private trimEmptyElement;
|
|
680
|
+
/**
|
|
681
|
+
* 创建define函数
|
|
682
|
+
* @param module
|
|
683
|
+
* @param task
|
|
684
|
+
* @returns {Function}
|
|
685
|
+
*/
|
|
686
|
+
private createDefine;
|
|
687
|
+
/**
|
|
688
|
+
* 解析路径
|
|
689
|
+
* @param uri
|
|
690
|
+
* @returns {string}
|
|
691
|
+
*/
|
|
692
|
+
private resolvePath;
|
|
693
|
+
/**
|
|
694
|
+
* 创建search字符串
|
|
695
|
+
*/
|
|
696
|
+
private createSearch;
|
|
697
|
+
/**
|
|
698
|
+
* 获取文件名后缀
|
|
699
|
+
* @param name
|
|
700
|
+
* @returns {string}
|
|
701
|
+
*/
|
|
702
|
+
getFileNamePostfix(name: string): string;
|
|
703
|
+
/**
|
|
704
|
+
* 是否为不处理的路径
|
|
705
|
+
* @param uri
|
|
706
|
+
* @param type
|
|
707
|
+
* @returns {boolean}
|
|
708
|
+
*/
|
|
709
|
+
private isNaturePath;
|
|
710
|
+
/**
|
|
711
|
+
* 解析路径
|
|
712
|
+
* @param uri
|
|
713
|
+
* @param replace
|
|
714
|
+
*/
|
|
715
|
+
private parserPath;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* 路由(跳转目标)
|
|
720
|
+
*/
|
|
721
|
+
export declare class Route {
|
|
722
|
+
/**
|
|
723
|
+
* 路径
|
|
724
|
+
*/
|
|
725
|
+
path?: string;
|
|
726
|
+
/**
|
|
727
|
+
* 返回full path
|
|
728
|
+
*/
|
|
729
|
+
get fullPath(): string;
|
|
730
|
+
/**
|
|
731
|
+
* 名称
|
|
732
|
+
*/
|
|
733
|
+
name?: string;
|
|
734
|
+
/**
|
|
735
|
+
* 嵌入root节点
|
|
736
|
+
*/
|
|
737
|
+
root?: string;
|
|
738
|
+
/**
|
|
739
|
+
* 参数
|
|
740
|
+
*/
|
|
741
|
+
params?: Record<string | number | symbol, any>;
|
|
742
|
+
/**
|
|
743
|
+
* 查询
|
|
744
|
+
*/
|
|
745
|
+
query?: any;
|
|
746
|
+
/**
|
|
747
|
+
* 获取匹配的元数组列表
|
|
748
|
+
*/
|
|
749
|
+
matched?: {
|
|
750
|
+
meta: Record<string | number | symbol, any>;
|
|
751
|
+
}[];
|
|
752
|
+
/**
|
|
753
|
+
* route本身的元数据
|
|
754
|
+
*/
|
|
755
|
+
meta?: Record<string | number | symbol, any>;
|
|
756
|
+
/**
|
|
757
|
+
* 成功回调函数
|
|
758
|
+
*/
|
|
759
|
+
success?: {
|
|
760
|
+
(...arg: any[]): void;
|
|
761
|
+
};
|
|
762
|
+
/**
|
|
763
|
+
* 失败回调函数
|
|
764
|
+
*/
|
|
765
|
+
error?: {
|
|
766
|
+
(...arg: any[]): void;
|
|
767
|
+
};
|
|
768
|
+
/**
|
|
769
|
+
* 页面销毁回答函数
|
|
770
|
+
*/
|
|
771
|
+
destroy?: {
|
|
772
|
+
(...arg: any[]): void;
|
|
773
|
+
};
|
|
774
|
+
/**
|
|
775
|
+
* 操作类型(Push, Replace, Put, Append)
|
|
776
|
+
*/
|
|
777
|
+
opsType?: OperationType;
|
|
778
|
+
/**
|
|
779
|
+
* 更新类型(All,Part)
|
|
780
|
+
*/
|
|
781
|
+
updateType?: UpdateType;
|
|
782
|
+
/**
|
|
783
|
+
* view属性集合(用于multi view的tab view属性)
|
|
784
|
+
*/
|
|
785
|
+
viewTagAttrs?: any;
|
|
786
|
+
/**
|
|
787
|
+
* 索引(用于opsType为Append的情况下,可以精确卸载的需求)
|
|
788
|
+
*/
|
|
789
|
+
index?: number;
|
|
790
|
+
/**
|
|
791
|
+
* 是否激活状态(用于多视图,Open操作的情况下,标志view是否为激活状态)
|
|
792
|
+
*/
|
|
793
|
+
active?: boolean;
|
|
794
|
+
/**
|
|
795
|
+
* 插槽(用于历史还原)
|
|
796
|
+
*/
|
|
797
|
+
slot?: Slot;
|
|
798
|
+
/**
|
|
799
|
+
* session(router执行链路session)
|
|
800
|
+
*/
|
|
801
|
+
session?: Session;
|
|
802
|
+
/**
|
|
803
|
+
* 克隆
|
|
804
|
+
* @param target
|
|
805
|
+
* @param plain 是否只克隆plain对象
|
|
806
|
+
*/
|
|
807
|
+
static clone(target: Route, plain: boolean): Route;
|
|
808
|
+
/**
|
|
809
|
+
* 判断路由是否相同
|
|
810
|
+
* @param x
|
|
811
|
+
* @param y
|
|
812
|
+
* @returns
|
|
813
|
+
*/
|
|
814
|
+
static isSame(x: Route, y: Route): boolean;
|
|
815
|
+
/**
|
|
816
|
+
* 判断路由对应的route model是否一致
|
|
817
|
+
* @param x
|
|
818
|
+
* @param y
|
|
819
|
+
* @returns
|
|
820
|
+
*/
|
|
821
|
+
static isSameForRouteModel(x: Route, y: Route): boolean;
|
|
822
|
+
/**
|
|
823
|
+
* 由对象生成路由
|
|
824
|
+
* @param obj
|
|
825
|
+
* @returns
|
|
826
|
+
*/
|
|
827
|
+
static from(obj: any): Route;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* 路由配置
|
|
832
|
+
*/
|
|
833
|
+
declare interface RouteConfig {
|
|
834
|
+
/**
|
|
835
|
+
* 路径
|
|
836
|
+
*/
|
|
837
|
+
path?: string;
|
|
838
|
+
/**
|
|
839
|
+
* 名称
|
|
840
|
+
*/
|
|
841
|
+
name?: string;
|
|
842
|
+
/**
|
|
843
|
+
* 转发路径
|
|
844
|
+
*/
|
|
845
|
+
redirect?: string;
|
|
846
|
+
/**
|
|
847
|
+
* 组件
|
|
848
|
+
*/
|
|
849
|
+
component?: any;
|
|
850
|
+
/**
|
|
851
|
+
* 组件映射
|
|
852
|
+
*/
|
|
853
|
+
components?: {
|
|
854
|
+
[propName: string]: any;
|
|
855
|
+
};
|
|
856
|
+
/**
|
|
857
|
+
* 孩子节点
|
|
858
|
+
*/
|
|
859
|
+
children?: any[];
|
|
860
|
+
/**
|
|
861
|
+
* 属性
|
|
862
|
+
*/
|
|
863
|
+
props?: Record<string | number | symbol, any> | boolean | {
|
|
864
|
+
(route: Route): any;
|
|
865
|
+
};
|
|
866
|
+
/**
|
|
867
|
+
* 元数据
|
|
868
|
+
*/
|
|
869
|
+
meta?: Record<string | number | symbol, any>;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* Route Model(RouteModel > ModelLayer > Model)
|
|
874
|
+
*/
|
|
875
|
+
declare class RouteModel {
|
|
876
|
+
/**
|
|
877
|
+
* 路径
|
|
878
|
+
*/
|
|
879
|
+
path?: string;
|
|
880
|
+
/**
|
|
881
|
+
* 路径match
|
|
882
|
+
*/
|
|
883
|
+
match: any;
|
|
884
|
+
/**
|
|
885
|
+
* 转发路径
|
|
886
|
+
*/
|
|
887
|
+
redirect?: string;
|
|
888
|
+
/**
|
|
889
|
+
* 名称
|
|
890
|
+
*/
|
|
891
|
+
name?: string;
|
|
892
|
+
/**
|
|
893
|
+
* layer集合
|
|
894
|
+
*/
|
|
895
|
+
layers: ModelLayer[];
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
export declare class Router {
|
|
899
|
+
get require(): any;
|
|
900
|
+
/**
|
|
901
|
+
* 获取当前最新route
|
|
902
|
+
*/
|
|
903
|
+
get current(): Route | null;
|
|
904
|
+
private options;
|
|
905
|
+
/**
|
|
906
|
+
* 构造函数
|
|
907
|
+
* @param options
|
|
908
|
+
*/
|
|
909
|
+
constructor(options: RouterOptions);
|
|
910
|
+
/**
|
|
911
|
+
* 初始化
|
|
912
|
+
*/
|
|
913
|
+
init(): void;
|
|
914
|
+
/**
|
|
915
|
+
* 第一次导航是否完成
|
|
916
|
+
*/
|
|
917
|
+
isReady(): Promise<void>;
|
|
918
|
+
/**
|
|
919
|
+
* 设置history monitor是否启动
|
|
920
|
+
*/
|
|
921
|
+
set historyMonitor(val: boolean | IfFunction);
|
|
922
|
+
/**
|
|
923
|
+
* 获取history monitor
|
|
924
|
+
*/
|
|
925
|
+
get historyMonitor(): boolean | IfFunction;
|
|
926
|
+
/**
|
|
927
|
+
* 设置无痕模式,不改变历史记录
|
|
928
|
+
*/
|
|
929
|
+
set traceless(val: boolean | IfFunction);
|
|
930
|
+
/**
|
|
931
|
+
* 获取无痕模式(不改变历史记录)
|
|
932
|
+
*/
|
|
933
|
+
get traceless(): boolean | IfFunction;
|
|
934
|
+
/**
|
|
935
|
+
* 设置还原点
|
|
936
|
+
*
|
|
937
|
+
*/
|
|
938
|
+
setRestorePoint(): void;
|
|
939
|
+
/**
|
|
940
|
+
* 注册route updated处理函数
|
|
941
|
+
* @param callback
|
|
942
|
+
*/
|
|
943
|
+
onRouteUpdated(callback: {
|
|
944
|
+
(route?: Route | null): void;
|
|
945
|
+
} | null): void;
|
|
946
|
+
/**
|
|
947
|
+
* 注册全局异常处理函数
|
|
948
|
+
* @param callback
|
|
949
|
+
*/
|
|
950
|
+
onError(callback: {
|
|
951
|
+
(...args: any[]): void;
|
|
952
|
+
} | null): void;
|
|
953
|
+
/**
|
|
954
|
+
* 添加before filter
|
|
955
|
+
* @param filter
|
|
956
|
+
*/
|
|
957
|
+
beforeEach(filter: BeforeRouteFilter): void;
|
|
958
|
+
/**
|
|
959
|
+
* 移除before filter
|
|
960
|
+
* @param filter
|
|
961
|
+
*/
|
|
962
|
+
removeBeforeEach(filter: BeforeRouteFilter): boolean;
|
|
963
|
+
/**
|
|
964
|
+
* 添加after filter
|
|
965
|
+
* @param filter
|
|
966
|
+
*/
|
|
967
|
+
afterEach(filter: AfterRouteFilter): void;
|
|
968
|
+
/**
|
|
969
|
+
* 移除after filter
|
|
970
|
+
* @param filter
|
|
971
|
+
* @returns
|
|
972
|
+
*/
|
|
973
|
+
removeAfterEach(filter: AfterRouteFilter): boolean;
|
|
974
|
+
/**
|
|
975
|
+
* 添加destroy filter
|
|
976
|
+
* @param filter
|
|
977
|
+
*/
|
|
978
|
+
destroyEach(filter: DestroyRouteFilter): void;
|
|
979
|
+
/**
|
|
980
|
+
* 移除after filter
|
|
981
|
+
* @param filter
|
|
982
|
+
* @returns
|
|
983
|
+
*/
|
|
984
|
+
removeDestroyEach(filter: DestroyRouteFilter): boolean;
|
|
985
|
+
/**
|
|
986
|
+
* 设置依赖模块解释函数
|
|
987
|
+
* @param resolveDependency
|
|
988
|
+
*/
|
|
989
|
+
setResolveDependency(resolveDependency: {
|
|
990
|
+
(route: Route): string;
|
|
991
|
+
}): void;
|
|
992
|
+
/**
|
|
993
|
+
* 加入路由配置列表
|
|
994
|
+
* @param routeConfigs
|
|
995
|
+
*/
|
|
996
|
+
addRoutes(routeConfigs: RouteConfig[]): void;
|
|
997
|
+
/**
|
|
998
|
+
* 加入路由配置
|
|
999
|
+
* @param routeConfig
|
|
1000
|
+
* @param index
|
|
1001
|
+
*/
|
|
1002
|
+
addRoute(routeConfig: RouteConfig, index?: number): void;
|
|
1003
|
+
/**
|
|
1004
|
+
* 移除路由
|
|
1005
|
+
*
|
|
1006
|
+
* @param route
|
|
1007
|
+
*/
|
|
1008
|
+
removeRoute(route: Route | string): boolean;
|
|
1009
|
+
/**
|
|
1010
|
+
* 判断路由是否存在
|
|
1011
|
+
*
|
|
1012
|
+
* @param route
|
|
1013
|
+
*/
|
|
1014
|
+
hasRoute(route: Route | string): boolean;
|
|
1015
|
+
/**
|
|
1016
|
+
* 配置not found路由路径
|
|
1017
|
+
* @param path
|
|
1018
|
+
*/
|
|
1019
|
+
setNotFoundPath(path: string): void;
|
|
1020
|
+
/**
|
|
1021
|
+
* 配置not found路由配置
|
|
1022
|
+
* @param routeConfig
|
|
1023
|
+
*/
|
|
1024
|
+
setNotFoundRoute(routeConfig: RouteConfig): void;
|
|
1025
|
+
/**
|
|
1026
|
+
* 返回目前加载的routes
|
|
1027
|
+
*/
|
|
1028
|
+
getRoutes(): RouteModel[];
|
|
1029
|
+
/**
|
|
1030
|
+
* 路由跳转(operation类型为Push)
|
|
1031
|
+
* @param args
|
|
1032
|
+
*/
|
|
1033
|
+
push(...args: any[]): Router;
|
|
1034
|
+
/**
|
|
1035
|
+
* 路由跳转(operation类型为Put)
|
|
1036
|
+
* @param args
|
|
1037
|
+
*/
|
|
1038
|
+
put(...args: any[]): Router;
|
|
1039
|
+
/**
|
|
1040
|
+
* 路由跳转(operation类型为Replace)
|
|
1041
|
+
* @param args
|
|
1042
|
+
*/
|
|
1043
|
+
replace(...args: any[]): Router;
|
|
1044
|
+
/**
|
|
1045
|
+
* 路由跳转(operation类型为Append)
|
|
1046
|
+
* @param args
|
|
1047
|
+
*/
|
|
1048
|
+
append(...args: any[]): Router;
|
|
1049
|
+
/**
|
|
1050
|
+
* 移除
|
|
1051
|
+
* @param term
|
|
1052
|
+
*/
|
|
1053
|
+
remove(term?: any): Promise<boolean>;
|
|
1054
|
+
/**
|
|
1055
|
+
* 路由跳转(operation类型为Open)
|
|
1056
|
+
* @param args
|
|
1057
|
+
*/
|
|
1058
|
+
open(...args: any[]): Router;
|
|
1059
|
+
/**
|
|
1060
|
+
* 关闭路由跳转的页面
|
|
1061
|
+
* @param args
|
|
1062
|
+
*/
|
|
1063
|
+
close(args: any): Router;
|
|
1064
|
+
/**
|
|
1065
|
+
* 路由跳转
|
|
1066
|
+
* @param args
|
|
1067
|
+
*/
|
|
1068
|
+
to(...args: any[]): Router;
|
|
1069
|
+
/**
|
|
1070
|
+
* 历史回退
|
|
1071
|
+
* @param delta
|
|
1072
|
+
*/
|
|
1073
|
+
back(delta?: number): void;
|
|
1074
|
+
/**
|
|
1075
|
+
* 恢复
|
|
1076
|
+
* @param routes
|
|
1077
|
+
*
|
|
1078
|
+
* @returns
|
|
1079
|
+
*/
|
|
1080
|
+
restore(routes?: Route[]): Promise<void>;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* Router History
|
|
1085
|
+
*/
|
|
1086
|
+
declare interface RouterHistory {
|
|
1087
|
+
/**
|
|
1088
|
+
* 基础路径
|
|
1089
|
+
*/
|
|
1090
|
+
base: string;
|
|
1091
|
+
/**
|
|
1092
|
+
* 是否监听history change
|
|
1093
|
+
*/
|
|
1094
|
+
historyMonitor: boolean | IfFunction;
|
|
1095
|
+
/**
|
|
1096
|
+
* 是否支持无痕模式
|
|
1097
|
+
*/
|
|
1098
|
+
traceless: boolean | IfFunction;
|
|
1099
|
+
/**
|
|
1100
|
+
* 初始化
|
|
1101
|
+
* @param firstNavigate
|
|
1102
|
+
* @returns
|
|
1103
|
+
*/
|
|
1104
|
+
init(firstNavigate: boolean): Promise<void>;
|
|
1105
|
+
/**
|
|
1106
|
+
* 销毁
|
|
1107
|
+
*/
|
|
1108
|
+
destroy(): void;
|
|
1109
|
+
/**
|
|
1110
|
+
* 监听历史记录改变
|
|
1111
|
+
* @param handler
|
|
1112
|
+
*/
|
|
1113
|
+
listen(handler: HistoryChangeHandler): void;
|
|
1114
|
+
/**
|
|
1115
|
+
* 跳转
|
|
1116
|
+
* @param delta
|
|
1117
|
+
* @param triggerEvent
|
|
1118
|
+
*/
|
|
1119
|
+
go(delta: number, triggerEvent?: boolean): void;
|
|
1120
|
+
/**
|
|
1121
|
+
* 加入记录
|
|
1122
|
+
* @param record
|
|
1123
|
+
*/
|
|
1124
|
+
push(record: MarkRecord): void;
|
|
1125
|
+
/**
|
|
1126
|
+
* 替换当前记录
|
|
1127
|
+
* @param record
|
|
1128
|
+
*/
|
|
1129
|
+
replace(record: MarkRecord): void;
|
|
1130
|
+
/**
|
|
1131
|
+
* 设置还原点
|
|
1132
|
+
*
|
|
1133
|
+
* @param routes 路由记录
|
|
1134
|
+
*/
|
|
1135
|
+
setRestorePoint(routes?: Array<Route>): void;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* router options
|
|
1140
|
+
*/
|
|
1141
|
+
declare interface RouterOptions {
|
|
1142
|
+
/**
|
|
1143
|
+
* 默认操作类型
|
|
1144
|
+
*/
|
|
1145
|
+
defaultOperationType?: OperationType;
|
|
1146
|
+
/**
|
|
1147
|
+
* 模块路径解释
|
|
1148
|
+
*/
|
|
1149
|
+
modulePathResolve?: {
|
|
1150
|
+
(route: Route): string;
|
|
1151
|
+
};
|
|
1152
|
+
/**
|
|
1153
|
+
* router history
|
|
1154
|
+
*/
|
|
1155
|
+
history?: RouterHistory;
|
|
1156
|
+
/**
|
|
1157
|
+
* 路由配置列表
|
|
1158
|
+
*/
|
|
1159
|
+
routes?: RouteConfig[];
|
|
1160
|
+
/**
|
|
1161
|
+
* not found 路由
|
|
1162
|
+
*/
|
|
1163
|
+
notFound?: RouteConfig;
|
|
1164
|
+
/**
|
|
1165
|
+
* not found 路由路径
|
|
1166
|
+
*/
|
|
1167
|
+
notFoundPath?: string;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
declare class Session {
|
|
1171
|
+
/**
|
|
1172
|
+
* 目标路由
|
|
1173
|
+
*/
|
|
1174
|
+
to?: Route;
|
|
1175
|
+
/**
|
|
1176
|
+
* 目标路由
|
|
1177
|
+
*/
|
|
1178
|
+
routeModel?: RouteModel;
|
|
1179
|
+
/**
|
|
1180
|
+
* 来源路由
|
|
1181
|
+
*/
|
|
1182
|
+
from?: Route;
|
|
1183
|
+
/**
|
|
1184
|
+
* 流程数据
|
|
1185
|
+
*/
|
|
1186
|
+
data: {
|
|
1187
|
+
[propName: string]: any;
|
|
1188
|
+
};
|
|
1189
|
+
/**
|
|
1190
|
+
* 构造函数
|
|
1191
|
+
* @param to
|
|
1192
|
+
* @param from
|
|
1193
|
+
*/
|
|
1194
|
+
constructor(to?: Route, from?: Route);
|
|
1195
|
+
/**
|
|
1196
|
+
* 转换为session
|
|
1197
|
+
* @param src
|
|
1198
|
+
* @returns
|
|
1199
|
+
*/
|
|
1200
|
+
static from(src: {
|
|
1201
|
+
[propName: string]: any;
|
|
1202
|
+
}): Session;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
/**
|
|
1206
|
+
* 插槽
|
|
1207
|
+
*/
|
|
1208
|
+
declare class Slot {
|
|
1209
|
+
/**
|
|
1210
|
+
* 插槽名称
|
|
1211
|
+
*/
|
|
1212
|
+
name: string;
|
|
1213
|
+
/**
|
|
1214
|
+
* 层次
|
|
1215
|
+
*/
|
|
1216
|
+
level: number;
|
|
1217
|
+
/**
|
|
1218
|
+
* root插槽节点名称
|
|
1219
|
+
*/
|
|
1220
|
+
rootName: string | undefined;
|
|
1221
|
+
/**
|
|
1222
|
+
* root插槽节点index
|
|
1223
|
+
*/
|
|
1224
|
+
rootIndex: number;
|
|
1225
|
+
/**
|
|
1226
|
+
* 构造函数
|
|
1227
|
+
* @param name
|
|
1228
|
+
* @param level
|
|
1229
|
+
* @param rootName
|
|
1230
|
+
*/
|
|
1231
|
+
constructor(name: string, level: number, rootName: string | undefined, rootIndex: number);
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* storage
|
|
1236
|
+
*/
|
|
1237
|
+
declare interface Storage_2 {
|
|
1238
|
+
/**
|
|
1239
|
+
* 获取item
|
|
1240
|
+
* @param key
|
|
1241
|
+
*/
|
|
1242
|
+
getItem(key: string): string | null;
|
|
1243
|
+
/**
|
|
1244
|
+
* 设置item
|
|
1245
|
+
* @param key
|
|
1246
|
+
* @param value
|
|
1247
|
+
*/
|
|
1248
|
+
setItem(key: string, value: string): void;
|
|
1249
|
+
/**
|
|
1250
|
+
* remove item
|
|
1251
|
+
* @param key
|
|
1252
|
+
*/
|
|
1253
|
+
removeItem(key: string): void;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* Task类型
|
|
1258
|
+
*/
|
|
1259
|
+
declare interface Task {
|
|
1260
|
+
(context: EventChainContext, ...args: any[]): void;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* 任务节点
|
|
1265
|
+
*/
|
|
1266
|
+
declare class TaskNode {
|
|
1267
|
+
/**
|
|
1268
|
+
* 索引
|
|
1269
|
+
*/
|
|
1270
|
+
index: number;
|
|
1271
|
+
/**
|
|
1272
|
+
* 来源
|
|
1273
|
+
*/
|
|
1274
|
+
src: string;
|
|
1275
|
+
/**
|
|
1276
|
+
* 参数
|
|
1277
|
+
*/
|
|
1278
|
+
params: any;
|
|
1279
|
+
/**
|
|
1280
|
+
* 进程
|
|
1281
|
+
*/
|
|
1282
|
+
progress: Progress;
|
|
1283
|
+
/**
|
|
1284
|
+
* 构造函数
|
|
1285
|
+
* @param index
|
|
1286
|
+
* @param src
|
|
1287
|
+
* @param params
|
|
1288
|
+
* @param progress
|
|
1289
|
+
*/
|
|
1290
|
+
constructor(index: number, src: string, params: any, progress: Progress);
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
export { toBoolean }
|
|
1294
|
+
|
|
1295
|
+
export { toNumber }
|
|
1296
|
+
|
|
1297
|
+
/**
|
|
1298
|
+
* Tool工具集合接口
|
|
1299
|
+
*/
|
|
1300
|
+
declare interface Tools {
|
|
1301
|
+
get each(): Function;
|
|
1302
|
+
get type(): Function;
|
|
1303
|
+
get isFunction(): Function;
|
|
1304
|
+
get isArray(): Function;
|
|
1305
|
+
get isArrayLike(): Function;
|
|
1306
|
+
get makeArray(): Function;
|
|
1307
|
+
get merge(): Function;
|
|
1308
|
+
get isWindow(): Function;
|
|
1309
|
+
get isPlainObject(): Function;
|
|
1310
|
+
get isEqual(): Function;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
export { toTypeString }
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* tree接口
|
|
1317
|
+
*/
|
|
1318
|
+
declare interface Tree extends TreeNode {
|
|
1319
|
+
/**
|
|
1320
|
+
* 加入数据
|
|
1321
|
+
* @param args
|
|
1322
|
+
* @returns {boolean}
|
|
1323
|
+
*/
|
|
1324
|
+
put(...args: any[]): boolean;
|
|
1325
|
+
/**
|
|
1326
|
+
* 获取内容
|
|
1327
|
+
* @param args
|
|
1328
|
+
* @returns {any}
|
|
1329
|
+
*/
|
|
1330
|
+
get(...args: any[]): any | undefined;
|
|
1331
|
+
/**
|
|
1332
|
+
* 移除数据
|
|
1333
|
+
* @param args
|
|
1334
|
+
* @returns {boolean}
|
|
1335
|
+
*/
|
|
1336
|
+
remove(...args: any[]): boolean;
|
|
1337
|
+
/**
|
|
1338
|
+
* 判断是否包含数据
|
|
1339
|
+
* @param args
|
|
1340
|
+
* @returns {boolean}
|
|
1341
|
+
*/
|
|
1342
|
+
contains(...args: any[]): boolean;
|
|
1343
|
+
/**
|
|
1344
|
+
* 清空所以数据
|
|
1345
|
+
*/
|
|
1346
|
+
clear(): void;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
* tree node
|
|
1351
|
+
*/
|
|
1352
|
+
declare interface TreeNode {
|
|
1353
|
+
[propName: string]: any;
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* 更新类型
|
|
1358
|
+
*/
|
|
1359
|
+
declare enum UpdateType {
|
|
1360
|
+
/**
|
|
1361
|
+
* 部分替换
|
|
1362
|
+
*/
|
|
1363
|
+
Part = 0,
|
|
1364
|
+
/**
|
|
1365
|
+
* 整体替换
|
|
1366
|
+
*/
|
|
1367
|
+
All = 1
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* Returns the global bus
|
|
1372
|
+
* @param proxy
|
|
1373
|
+
* @returns
|
|
1374
|
+
*/
|
|
1375
|
+
export declare function useBus(proxy?: ComponentPublicInstance): Tree;
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
* Returns the global event proxy
|
|
1379
|
+
* @param proxy
|
|
1380
|
+
* @returns
|
|
1381
|
+
*/
|
|
1382
|
+
export declare function useEventProxy(proxy?: ComponentPublicInstance): EventProxy;
|
|
1383
|
+
|
|
1384
|
+
/**
|
|
1385
|
+
* Returns the current fox
|
|
1386
|
+
* @param proxy
|
|
1387
|
+
* @returns
|
|
1388
|
+
*/
|
|
1389
|
+
export declare function useFox(proxy?: ComponentPublicInstance): Fox;
|
|
1390
|
+
|
|
1391
|
+
/**
|
|
1392
|
+
* Returns the current route
|
|
1393
|
+
* @param proxy
|
|
1394
|
+
* @returns
|
|
1395
|
+
*/
|
|
1396
|
+
export declare function useRoute(proxy?: ComponentPublicInstance): Route | null;
|
|
1397
|
+
|
|
1398
|
+
/**
|
|
1399
|
+
* Returns the current router
|
|
1400
|
+
* @returns
|
|
1401
|
+
*/
|
|
1402
|
+
export declare function useRouter(proxy?: ComponentPublicInstance): Router;
|
|
1403
|
+
|
|
1404
|
+
export { }
|