cc1-form 1.0.4 → 1.0.6

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.
@@ -25,7 +25,10 @@ declare const conf: {
25
25
  } | undefined;
26
26
  options?: {
27
27
  [x: string]: any;
28
- input?: Record<string, any> | undefined;
28
+ input?: {
29
+ [x: string]: any;
30
+ on?: any;
31
+ } | undefined;
29
32
  switch?: {
30
33
  on?: Record<string, any> | undefined;
31
34
  activeValue?: any;
@@ -34,9 +37,18 @@ declare const conf: {
34
37
  inactiveLabel?: string | undefined;
35
38
  tableBeforeChange?: ((key: string, data: any) => any) | undefined;
36
39
  } | undefined;
37
- select?: Record<string, any> | undefined;
38
- treeSelect?: Record<string, any> | undefined;
39
- datetime?: Record<string, any> | undefined;
40
+ select?: {
41
+ [x: string]: any;
42
+ on?: any;
43
+ } | undefined;
44
+ treeSelect?: {
45
+ [x: string]: any;
46
+ on?: any;
47
+ } | undefined;
48
+ datetime?: {
49
+ [x: string]: any;
50
+ on?: any;
51
+ } | undefined;
40
52
  list?: {
41
53
  on?: Record<string, any> | undefined;
42
54
  label?: string | undefined;
@@ -110,7 +122,10 @@ declare const conf: {
110
122
  } | undefined;
111
123
  options?: {
112
124
  [x: string]: any;
113
- input?: Record<string, any> | undefined;
125
+ input?: {
126
+ [x: string]: any;
127
+ on?: any;
128
+ } | undefined;
114
129
  switch?: {
115
130
  on?: Record<string, any> | undefined;
116
131
  activeValue?: any;
@@ -119,9 +134,18 @@ declare const conf: {
119
134
  inactiveLabel?: string | undefined;
120
135
  tableBeforeChange?: ((key: string, data: any) => any) | undefined;
121
136
  } | undefined;
122
- select?: Record<string, any> | undefined;
123
- treeSelect?: Record<string, any> | undefined;
124
- datetime?: Record<string, any> | undefined;
137
+ select?: {
138
+ [x: string]: any;
139
+ on?: any;
140
+ } | undefined;
141
+ treeSelect?: {
142
+ [x: string]: any;
143
+ on?: any;
144
+ } | undefined;
145
+ datetime?: {
146
+ [x: string]: any;
147
+ on?: any;
148
+ } | undefined;
125
149
  list?: {
126
150
  on?: Record<string, any> | undefined;
127
151
  label?: string | undefined;
@@ -194,7 +218,10 @@ declare const conf: {
194
218
  } | undefined;
195
219
  options?: {
196
220
  [x: string]: any;
197
- input?: Record<string, any> | undefined;
221
+ input?: {
222
+ [x: string]: any;
223
+ on?: any;
224
+ } | undefined;
198
225
  switch?: {
199
226
  on?: Record<string, any> | undefined;
200
227
  activeValue?: any;
@@ -203,9 +230,18 @@ declare const conf: {
203
230
  inactiveLabel?: string | undefined;
204
231
  tableBeforeChange?: ((key: string, data: any) => any) | undefined;
205
232
  } | undefined;
206
- select?: Record<string, any> | undefined;
207
- treeSelect?: Record<string, any> | undefined;
208
- datetime?: Record<string, any> | undefined;
233
+ select?: {
234
+ [x: string]: any;
235
+ on?: any;
236
+ } | undefined;
237
+ treeSelect?: {
238
+ [x: string]: any;
239
+ on?: any;
240
+ } | undefined;
241
+ datetime?: {
242
+ [x: string]: any;
243
+ on?: any;
244
+ } | undefined;
209
245
  list?: {
210
246
  on?: Record<string, any> | undefined;
211
247
  label?: string | undefined;
@@ -291,7 +327,10 @@ declare var __VLS_1: {}, __VLS_7: {
291
327
  } | undefined;
292
328
  options?: {
293
329
  [x: string]: any;
294
- input?: Record<string, any> | undefined;
330
+ input?: {
331
+ [x: string]: any;
332
+ on?: any;
333
+ } | undefined;
295
334
  switch?: {
296
335
  on?: Record<string, any> | undefined;
297
336
  activeValue?: any;
@@ -300,9 +339,18 @@ declare var __VLS_1: {}, __VLS_7: {
300
339
  inactiveLabel?: string | undefined;
301
340
  tableBeforeChange?: ((key: string, data: any) => any) | undefined;
302
341
  } | undefined;
303
- select?: Record<string, any> | undefined;
304
- treeSelect?: Record<string, any> | undefined;
305
- datetime?: Record<string, any> | undefined;
342
+ select?: {
343
+ [x: string]: any;
344
+ on?: any;
345
+ } | undefined;
346
+ treeSelect?: {
347
+ [x: string]: any;
348
+ on?: any;
349
+ } | undefined;
350
+ datetime?: {
351
+ [x: string]: any;
352
+ on?: any;
353
+ } | undefined;
306
354
  list?: {
307
355
  on?: Record<string, any> | undefined;
308
356
  label?: string | undefined;
@@ -360,7 +408,10 @@ declare var __VLS_1: {}, __VLS_7: {
360
408
  } | undefined;
361
409
  options?: {
362
410
  [x: string]: any;
363
- input?: Record<string, any> | undefined;
411
+ input?: {
412
+ [x: string]: any;
413
+ on?: any;
414
+ } | undefined;
364
415
  switch?: {
365
416
  on?: Record<string, any> | undefined;
366
417
  activeValue?: any;
@@ -369,9 +420,18 @@ declare var __VLS_1: {}, __VLS_7: {
369
420
  inactiveLabel?: string | undefined;
370
421
  tableBeforeChange?: ((key: string, data: any) => any) | undefined;
371
422
  } | undefined;
372
- select?: Record<string, any> | undefined;
373
- treeSelect?: Record<string, any> | undefined;
374
- datetime?: Record<string, any> | undefined;
423
+ select?: {
424
+ [x: string]: any;
425
+ on?: any;
426
+ } | undefined;
427
+ treeSelect?: {
428
+ [x: string]: any;
429
+ on?: any;
430
+ } | undefined;
431
+ datetime?: {
432
+ [x: string]: any;
433
+ on?: any;
434
+ } | undefined;
375
435
  list?: {
376
436
  on?: Record<string, any> | undefined;
377
437
  label?: string | undefined;
@@ -423,7 +483,10 @@ declare var __VLS_1: {}, __VLS_7: {
423
483
  } | undefined;
424
484
  options?: {
425
485
  [x: string]: any;
426
- input?: Record<string, any> | undefined;
486
+ input?: {
487
+ [x: string]: any;
488
+ on?: any;
489
+ } | undefined;
427
490
  switch?: {
428
491
  on?: Record<string, any> | undefined;
429
492
  activeValue?: any;
@@ -432,9 +495,18 @@ declare var __VLS_1: {}, __VLS_7: {
432
495
  inactiveLabel?: string | undefined;
433
496
  tableBeforeChange?: ((key: string, data: any) => any) | undefined;
434
497
  } | undefined;
435
- select?: Record<string, any> | undefined;
436
- treeSelect?: Record<string, any> | undefined;
437
- datetime?: Record<string, any> | undefined;
498
+ select?: {
499
+ [x: string]: any;
500
+ on?: any;
501
+ } | undefined;
502
+ treeSelect?: {
503
+ [x: string]: any;
504
+ on?: any;
505
+ } | undefined;
506
+ datetime?: {
507
+ [x: string]: any;
508
+ on?: any;
509
+ } | undefined;
438
510
  list?: {
439
511
  on?: Record<string, any> | undefined;
440
512
  label?: string | undefined;
@@ -486,7 +558,10 @@ declare var __VLS_1: {}, __VLS_7: {
486
558
  } | undefined;
487
559
  options?: {
488
560
  [x: string]: any;
489
- input?: Record<string, any> | undefined;
561
+ input?: {
562
+ [x: string]: any;
563
+ on?: any;
564
+ } | undefined;
490
565
  switch?: {
491
566
  on?: Record<string, any> | undefined;
492
567
  activeValue?: any;
@@ -495,9 +570,18 @@ declare var __VLS_1: {}, __VLS_7: {
495
570
  inactiveLabel?: string | undefined;
496
571
  tableBeforeChange?: ((key: string, data: any) => any) | undefined;
497
572
  } | undefined;
498
- select?: Record<string, any> | undefined;
499
- treeSelect?: Record<string, any> | undefined;
500
- datetime?: Record<string, any> | undefined;
573
+ select?: {
574
+ [x: string]: any;
575
+ on?: any;
576
+ } | undefined;
577
+ treeSelect?: {
578
+ [x: string]: any;
579
+ on?: any;
580
+ } | undefined;
581
+ datetime?: {
582
+ [x: string]: any;
583
+ on?: any;
584
+ } | undefined;
501
585
  list?: {
502
586
  on?: Record<string, any> | undefined;
503
587
  label?: string | undefined;
@@ -636,7 +720,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
636
720
  } | undefined;
637
721
  options?: {
638
722
  [x: string]: any;
639
- input?: Record<string, any> | undefined;
723
+ input?: {
724
+ [x: string]: any;
725
+ on?: any;
726
+ } | undefined;
640
727
  switch?: {
641
728
  on?: Record<string, any> | undefined;
642
729
  activeValue?: any;
@@ -645,9 +732,18 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
645
732
  inactiveLabel?: string | undefined;
646
733
  tableBeforeChange?: ((key: string, data: any) => any) | undefined;
647
734
  } | undefined;
648
- select?: Record<string, any> | undefined;
649
- treeSelect?: Record<string, any> | undefined;
650
- datetime?: Record<string, any> | undefined;
735
+ select?: {
736
+ [x: string]: any;
737
+ on?: any;
738
+ } | undefined;
739
+ treeSelect?: {
740
+ [x: string]: any;
741
+ on?: any;
742
+ } | undefined;
743
+ datetime?: {
744
+ [x: string]: any;
745
+ on?: any;
746
+ } | undefined;
651
747
  list?: {
652
748
  on?: Record<string, any> | undefined;
653
749
  label?: string | undefined;
@@ -721,7 +817,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
721
817
  } | undefined;
722
818
  options?: {
723
819
  [x: string]: any;
724
- input?: Record<string, any> | undefined;
820
+ input?: {
821
+ [x: string]: any;
822
+ on?: any;
823
+ } | undefined;
725
824
  switch?: {
726
825
  on?: Record<string, any> | undefined;
727
826
  activeValue?: any;
@@ -730,9 +829,18 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
730
829
  inactiveLabel?: string | undefined;
731
830
  tableBeforeChange?: ((key: string, data: any) => any) | undefined;
732
831
  } | undefined;
733
- select?: Record<string, any> | undefined;
734
- treeSelect?: Record<string, any> | undefined;
735
- datetime?: Record<string, any> | undefined;
832
+ select?: {
833
+ [x: string]: any;
834
+ on?: any;
835
+ } | undefined;
836
+ treeSelect?: {
837
+ [x: string]: any;
838
+ on?: any;
839
+ } | undefined;
840
+ datetime?: {
841
+ [x: string]: any;
842
+ on?: any;
843
+ } | undefined;
736
844
  list?: {
737
845
  on?: Record<string, any> | undefined;
738
846
  label?: string | undefined;
@@ -805,7 +913,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
805
913
  } | undefined;
806
914
  options?: {
807
915
  [x: string]: any;
808
- input?: Record<string, any> | undefined;
916
+ input?: {
917
+ [x: string]: any;
918
+ on?: any;
919
+ } | undefined;
809
920
  switch?: {
810
921
  on?: Record<string, any> | undefined;
811
922
  activeValue?: any;
@@ -814,9 +925,18 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
814
925
  inactiveLabel?: string | undefined;
815
926
  tableBeforeChange?: ((key: string, data: any) => any) | undefined;
816
927
  } | undefined;
817
- select?: Record<string, any> | undefined;
818
- treeSelect?: Record<string, any> | undefined;
819
- datetime?: Record<string, any> | undefined;
928
+ select?: {
929
+ [x: string]: any;
930
+ on?: any;
931
+ } | undefined;
932
+ treeSelect?: {
933
+ [x: string]: any;
934
+ on?: any;
935
+ } | undefined;
936
+ datetime?: {
937
+ [x: string]: any;
938
+ on?: any;
939
+ } | undefined;
820
940
  list?: {
821
941
  on?: Record<string, any> | undefined;
822
942
  label?: string | undefined;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ import ArrUtil from './utils/ArrUtil';
8
8
  import ExcelUtil from './utils/ExcelUtil';
9
9
  import TForm from './utils/TForm';
10
10
  import TSys from './utils/TSys';
11
+ import TFile from './utils/TFile';
11
12
  export declare const install: (app: App, options?: {
12
13
  /**
13
14
  * 自定义组件
@@ -16,7 +17,7 @@ export declare const install: (app: App, options?: {
16
17
  [key: string]: any;
17
18
  };
18
19
  }) => void;
19
- export { ArrUtil, ExcelUtil, TColumn, TCurd, TForm, TFormList, TSys, type CurdConfig, type CurdConfigColumn, type CurdOption };
20
+ export { ArrUtil, ExcelUtil, TColumn, TCurd, TForm, TFormList, TSys, TFile, type CurdConfig, type CurdConfigColumn, type CurdOption };
20
21
 
21
22
  export {}
22
23
 
@@ -0,0 +1,20 @@
1
+ export default class TFile {
2
+ /**
3
+ * 通过文件远程地址下载文件
4
+ */
5
+ static download(href: string, name?: string): Promise<void>;
6
+ /**
7
+ * 将json对象或者json数组导出为json文件保存
8
+ * @param data
9
+ * @param name
10
+ */
11
+ static exportJSONFile: (data: any, name?: string) => void;
12
+ /**
13
+ * 导入文件内容,默认为json
14
+ * @param param
15
+ * @returns
16
+ */
17
+ static importFile: (param?: {
18
+ accept?: string;
19
+ }) => Promise<unknown>;
20
+ }
@@ -90,8 +90,4 @@ export default class TSys {
90
90
  windowWidth?: number;
91
91
  windowHeight?: number;
92
92
  }) => Promise<string>;
93
- /**
94
- * 下载文件
95
- */
96
- static download(content: string, name?: string): Promise<void>;
97
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc1-form",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "我来助你-表单组件库",
5
5
  "repository": {
6
6
  "type": "git",