cc1-form 1.3.7 → 1.3.8

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.
@@ -84,8 +84,8 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
84
84
  onChange?: ((...args: any[]) => any) | undefined;
85
85
  }>, {
86
86
  label: string;
87
- row: any;
88
87
  value: string;
88
+ row: any;
89
89
  field: string;
90
90
  itemFields: any[];
91
91
  inputWidth: string;
@@ -148,8 +148,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
148
148
  onChange?: ((...args: any[]) => any) | undefined;
149
149
  }>, {
150
150
  label: string;
151
- row: any;
152
151
  value: string;
152
+ row: any;
153
153
  field: string;
154
154
  itemFields: any[];
155
155
  inputWidth: string;
@@ -1,6 +1,6 @@
1
1
  import type { CurdConfigColumn } from '../indexType';
2
2
  import type { CurdConfGetter, CurdProps, CurdRefs } from './types';
3
- export declare const createTableModule: (getConf: CurdConfGetter, props: CurdProps, refs: CurdRefs) => {
3
+ export declare const createTableModule: (_getConf: CurdConfGetter, props: CurdProps, refs: CurdRefs) => {
4
4
  table: {
5
5
  op: {
6
6
  width: (...bool: any[]) => number;
@@ -20,13 +20,121 @@ export declare const createTableModule: (getConf: CurdConfGetter, props: CurdPro
20
20
  list: any[];
21
21
  };
22
22
  };
23
+ sortable: {
24
+ mode: boolean;
25
+ actionLoading: boolean;
26
+ instance: {
27
+ destroy: () => void;
28
+ } | undefined;
29
+ modulePromise: Promise<any> | undefined;
30
+ getOption: () => Partial<{
31
+ [key: string]: any;
32
+ show: boolean;
33
+ button: boolean;
34
+ saveButton: boolean;
35
+ width: any;
36
+ label: string;
37
+ fixed: "left" | "right";
38
+ page: boolean;
39
+ scroll: boolean;
40
+ field: string;
41
+ onEnd: (data: any[]) => any;
42
+ rule: "index" | "value";
43
+ api: Partial<{
44
+ list: (param?: any, type?: "sortable") => any;
45
+ update?: ((param?: any[] | undefined, type?: "sortable") => any) | undefined;
46
+ }>;
47
+ }>;
48
+ showTriggerButton: () => boolean | undefined;
49
+ showActionButton: () => boolean | undefined;
50
+ showSaveButton: () => boolean | undefined;
51
+ isActive: () => boolean;
52
+ showPagination: () => boolean | undefined;
53
+ disableScroll: () => boolean;
54
+ getTableBindOption: () => {
55
+ height?: undefined;
56
+ maxHeight?: undefined;
57
+ editMode?: boolean | undefined;
58
+ rowKey?: string | undefined;
59
+ border?: boolean | undefined;
60
+ index?: boolean | Partial<{
61
+ [key: string]: any;
62
+ show: boolean | ((data: any) => boolean);
63
+ on: any;
64
+ }> | ((data: any) => boolean) | undefined;
65
+ sortable?: Partial<{
66
+ [key: string]: any;
67
+ show: boolean;
68
+ button: boolean;
69
+ saveButton: boolean;
70
+ width: any;
71
+ label: string;
72
+ fixed: "left" | "right";
73
+ page: boolean;
74
+ scroll: boolean;
75
+ field: string;
76
+ onEnd: (data: any[]) => any;
77
+ rule: "index" | "value";
78
+ api: Partial<{
79
+ list: (param?: any, type?: "sortable") => any;
80
+ update?: ((param?: any[] | undefined, type?: "sortable") => any) | undefined;
81
+ }>;
82
+ }> | undefined;
83
+ selectable?: boolean | Partial<{
84
+ [key: string]: any;
85
+ show: boolean | ((data: any) => boolean);
86
+ on: any;
87
+ }> | ((data: any) => boolean) | undefined;
88
+ column?: CurdConfigColumn<any>[] | undefined;
89
+ showOverflowTooltip?: boolean | undefined;
90
+ showSummary?: boolean | undefined;
91
+ summaryMethod?: ((data: {
92
+ columns: any[];
93
+ data: any[];
94
+ }) => any[]) | undefined;
95
+ inlineEdit?: boolean | undefined;
96
+ operate?: {
97
+ [key: string]: any;
98
+ width?: any;
99
+ } | undefined;
100
+ add?: boolean | ((data: any) => boolean) | undefined;
101
+ update?: boolean | ((data: any) => boolean) | undefined;
102
+ delete?: boolean | ((data: any) => boolean) | undefined;
103
+ view?: boolean | ((data: any) => boolean) | undefined;
104
+ on?: Record<string, any> | undefined;
105
+ fitHeight?: boolean | undefined;
106
+ };
107
+ getColumnBind: () => {
108
+ [x: string]: any;
109
+ };
110
+ destroy: () => void;
111
+ getBody: () => HTMLElement | null;
112
+ loadModule: () => Promise<any>;
113
+ applyRule: (data: any[], field: string, rule: "index" | "value", values: any[]) => void;
114
+ sync: () => Promise<void>;
115
+ refreshList: () => Promise<void>;
116
+ /** 临时保存fitHeight,用于排序时临时关闭 */
117
+ fitHeight: boolean;
118
+ start: () => Promise<void>;
119
+ exit: () => Promise<void>;
120
+ save: () => Promise<void>;
121
+ command: (command: "save" | "exit") => Promise<void>;
122
+ };
23
123
  header: {
24
124
  group: {
25
125
  expand: boolean;
26
126
  toggleExpandAll: () => void;
27
127
  };
28
128
  };
29
- getList: () => Promise<void>;
129
+ parseListResult: (res: any) => Promise<{
130
+ data: any;
131
+ total: any;
132
+ }>;
133
+ applyListResult: (res: any, total?: number) => Promise<{
134
+ data: any;
135
+ total: any;
136
+ }>;
137
+ getList: (type?: "sortable") => Promise<void>;
30
138
  selection: {
31
139
  list: any[];
32
140
  change: (selection: any[]) => void;
@@ -1362,13 +1362,125 @@ export declare const curdConf: (props: CurdProps) => {
1362
1362
  list: any[];
1363
1363
  };
1364
1364
  };
1365
+ sortable: {
1366
+ mode: boolean;
1367
+ actionLoading: boolean;
1368
+ instance: {
1369
+ destroy: () => void;
1370
+ } | undefined;
1371
+ modulePromise: {
1372
+ then: <TResult1 = any, TResult2 = never>(onfulfilled?: ((value: any) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
1373
+ catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<any>;
1374
+ finally: (onfinally?: (() => void) | null | undefined) => Promise<any>;
1375
+ readonly [Symbol.toStringTag]: string;
1376
+ } | undefined;
1377
+ getOption: () => Partial<{
1378
+ [key: string]: any;
1379
+ show: boolean;
1380
+ button: boolean;
1381
+ saveButton: boolean;
1382
+ width: any;
1383
+ label: string;
1384
+ fixed: "left" | "right";
1385
+ page: boolean;
1386
+ scroll: boolean;
1387
+ field: string;
1388
+ onEnd: (data: any[]) => any;
1389
+ rule: "index" | "value";
1390
+ api: Partial<{
1391
+ list: (param?: any, type?: "sortable") => any;
1392
+ update?: ((param?: any[] | undefined, type?: "sortable") => any) | undefined;
1393
+ }>;
1394
+ }>;
1395
+ showTriggerButton: () => boolean | undefined;
1396
+ showActionButton: () => boolean | undefined;
1397
+ showSaveButton: () => boolean | undefined;
1398
+ isActive: () => boolean;
1399
+ showPagination: () => boolean | undefined;
1400
+ disableScroll: () => boolean;
1401
+ getTableBindOption: () => {
1402
+ height?: undefined;
1403
+ maxHeight?: undefined;
1404
+ editMode?: boolean | undefined;
1405
+ rowKey?: string | undefined;
1406
+ border?: boolean | undefined;
1407
+ index?: boolean | Partial<{
1408
+ [key: string]: any;
1409
+ show: boolean | ((data: any) => boolean);
1410
+ on: any;
1411
+ }> | ((data: any) => boolean) | undefined;
1412
+ sortable?: Partial<{
1413
+ [key: string]: any;
1414
+ show: boolean;
1415
+ button: boolean;
1416
+ saveButton: boolean;
1417
+ width: any;
1418
+ label: string;
1419
+ fixed: "left" | "right";
1420
+ page: boolean;
1421
+ scroll: boolean;
1422
+ field: string;
1423
+ onEnd: (data: any[]) => any;
1424
+ rule: "index" | "value";
1425
+ api: Partial<{
1426
+ list: (param?: any, type?: "sortable") => any;
1427
+ update?: ((param?: any[] | undefined, type?: "sortable") => any) | undefined;
1428
+ }>;
1429
+ }> | undefined;
1430
+ selectable?: boolean | Partial<{
1431
+ [key: string]: any;
1432
+ show: boolean | ((data: any) => boolean);
1433
+ on: any;
1434
+ }> | ((data: any) => boolean) | undefined;
1435
+ column?: import("./indexType").CurdConfigColumn<any>[] | undefined;
1436
+ showOverflowTooltip?: boolean | undefined;
1437
+ showSummary?: boolean | undefined;
1438
+ summaryMethod?: ((data: {
1439
+ columns: any[];
1440
+ data: any[];
1441
+ }) => any[]) | undefined;
1442
+ inlineEdit?: boolean | undefined;
1443
+ operate?: {
1444
+ [key: string]: any;
1445
+ width?: any;
1446
+ } | undefined;
1447
+ add?: boolean | ((data: any) => boolean) | undefined;
1448
+ update?: boolean | ((data: any) => boolean) | undefined;
1449
+ delete?: boolean | ((data: any) => boolean) | undefined;
1450
+ view?: boolean | ((data: any) => boolean) | undefined;
1451
+ on?: Record<string, any> | undefined;
1452
+ fitHeight?: boolean | undefined;
1453
+ };
1454
+ getColumnBind: () => {
1455
+ [x: string]: any;
1456
+ };
1457
+ destroy: () => void;
1458
+ getBody: () => HTMLElement | null;
1459
+ loadModule: () => Promise<any>;
1460
+ applyRule: (data: any[], field: string, rule: "index" | "value", values: any[]) => void;
1461
+ sync: () => Promise<void>;
1462
+ refreshList: () => Promise<void>;
1463
+ fitHeight: boolean;
1464
+ start: () => Promise<void>;
1465
+ exit: () => Promise<void>;
1466
+ save: () => Promise<void>;
1467
+ command: (command: "save" | "exit") => Promise<void>;
1468
+ };
1365
1469
  header: {
1366
1470
  group: {
1367
1471
  expand: boolean;
1368
1472
  toggleExpandAll: () => void;
1369
1473
  };
1370
1474
  };
1371
- getList: () => Promise<void>;
1475
+ parseListResult: (res: any) => Promise<{
1476
+ data: any;
1477
+ total: any;
1478
+ }>;
1479
+ applyListResult: (res: any, total?: number) => Promise<{
1480
+ data: any;
1481
+ total: any;
1482
+ }>;
1483
+ getList: (type?: "sortable") => Promise<void>;
1372
1484
  selection: {
1373
1485
  list: any[];
1374
1486
  change: (selection: any[]) => void;
@@ -1874,6 +1986,24 @@ export declare const curdConf: (props: CurdProps) => {
1874
1986
  show?: boolean | ((data: any) => boolean) | undefined;
1875
1987
  on?: any;
1876
1988
  } | undefined;
1989
+ sortable?: {
1990
+ [x: string]: any;
1991
+ show?: boolean | undefined;
1992
+ button?: boolean | undefined;
1993
+ saveButton?: boolean | undefined;
1994
+ width?: any;
1995
+ label?: string | undefined;
1996
+ fixed?: "left" | "right" | undefined;
1997
+ page?: boolean | undefined;
1998
+ scroll?: boolean | undefined;
1999
+ field?: string | undefined;
2000
+ onEnd?: ((data: any[]) => any) | undefined;
2001
+ rule?: "index" | "value" | undefined;
2002
+ api?: {
2003
+ list?: ((param?: any, type?: "sortable") => any) | undefined;
2004
+ update?: ((param?: any[] | undefined, type?: "sortable") => any) | undefined;
2005
+ } | undefined;
2006
+ } | undefined;
1877
2007
  selectable?: boolean | ((data: any) => boolean) | {
1878
2008
  [x: string]: any;
1879
2009
  show?: boolean | ((data: any) => boolean) | undefined;
@@ -2779,9 +2909,9 @@ export declare const curdConf: (props: CurdProps) => {
2779
2909
  } | undefined;
2780
2910
  }[];
2781
2911
  api: {
2782
- list: (param?: any) => any;
2912
+ list: (param?: any, type?: "sortable") => any;
2783
2913
  create?: ((param?: any) => any) | undefined;
2784
- update?: ((param?: any, type?: "switch") => any) | undefined;
2914
+ update?: ((param?: any, type?: "switch" | "sortable") => any) | undefined;
2785
2915
  delete?: ((param?: ({
2786
2916
  items: any[];
2787
2917
  } & Record<string, any>) | undefined) => any) | undefined;