cc1-form 1.3.7 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cc1-form.css +1 -1
- package/dist/cc1-form.js +1955 -1668
- package/dist/cc1-form.umd.cjs +1 -1
- package/dist/components/TCurd/com/form/list.vue.d.ts +2 -2
- package/dist/components/TCurd/core/table.d.ts +112 -2
- package/dist/components/TCurd/index.d.ts +136 -3
- package/dist/components/TCurd/index.vue.d.ts +293 -23
- package/dist/components/TCurd/indexType.d.ts +41 -2
- package/dist/utils/TFormConfig.d.ts +13 -0
- package/dist/utils/TFormI18n.d.ts +12 -0
- package/dist/utils/TSys.d.ts +5 -0
- package/package.json +3 -1
|
@@ -10,6 +10,7 @@ import Expand from './icon/Expand.vue';
|
|
|
10
10
|
import IconRefresh from './icon/refresh.vue';
|
|
11
11
|
import type { CurdConfig } from './indexType';
|
|
12
12
|
import TableColumn from './tableColumn.vue';
|
|
13
|
+
import questionFilled from './icon/questionFilled.vue';
|
|
13
14
|
declare const EDialog: {
|
|
14
15
|
Add: any;
|
|
15
16
|
Update: any;
|
|
@@ -1378,13 +1379,127 @@ declare const conf: {
|
|
|
1378
1379
|
list: any[];
|
|
1379
1380
|
};
|
|
1380
1381
|
};
|
|
1382
|
+
sortable: {
|
|
1383
|
+
mode: boolean;
|
|
1384
|
+
actionLoading: boolean;
|
|
1385
|
+
instance: {
|
|
1386
|
+
destroy: () => void;
|
|
1387
|
+
} | undefined;
|
|
1388
|
+
modulePromise: {
|
|
1389
|
+
then: <TResult1 = any, TResult2 = never>(onfulfilled?: ((value: any) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
|
|
1390
|
+
catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<any>;
|
|
1391
|
+
finally: (onfinally?: (() => void) | null | undefined) => Promise<any>;
|
|
1392
|
+
readonly [Symbol.toStringTag]: string;
|
|
1393
|
+
} | undefined;
|
|
1394
|
+
getOption: () => Partial<{
|
|
1395
|
+
[key: string]: any;
|
|
1396
|
+
show: boolean;
|
|
1397
|
+
button: boolean;
|
|
1398
|
+
saveButton: boolean;
|
|
1399
|
+
tipText: string;
|
|
1400
|
+
width: any;
|
|
1401
|
+
label: string;
|
|
1402
|
+
fixed: "left" | "right";
|
|
1403
|
+
page: boolean;
|
|
1404
|
+
scroll: boolean;
|
|
1405
|
+
field: string;
|
|
1406
|
+
onEnd: (data: any[]) => any;
|
|
1407
|
+
rule: "index" | "value";
|
|
1408
|
+
api: Partial<{
|
|
1409
|
+
list: (param?: any, type?: "sortable") => any;
|
|
1410
|
+
update?: ((param?: any[] | undefined, type?: "sortable") => any) | undefined;
|
|
1411
|
+
}>;
|
|
1412
|
+
}>;
|
|
1413
|
+
showTriggerButton: () => boolean | undefined;
|
|
1414
|
+
showActionButton: () => boolean | undefined;
|
|
1415
|
+
showSaveButton: () => boolean | undefined;
|
|
1416
|
+
isActive: () => boolean;
|
|
1417
|
+
showPagination: () => boolean | undefined;
|
|
1418
|
+
disableScroll: () => boolean;
|
|
1419
|
+
getTableBindOption: () => {
|
|
1420
|
+
height?: undefined;
|
|
1421
|
+
maxHeight?: undefined;
|
|
1422
|
+
editMode?: boolean | undefined;
|
|
1423
|
+
rowKey?: string | undefined;
|
|
1424
|
+
border?: boolean | undefined;
|
|
1425
|
+
index?: boolean | Partial<{
|
|
1426
|
+
[key: string]: any;
|
|
1427
|
+
show: boolean | ((data: any) => boolean);
|
|
1428
|
+
on: any;
|
|
1429
|
+
}> | ((data: any) => boolean) | undefined;
|
|
1430
|
+
sortable?: Partial<{
|
|
1431
|
+
[key: string]: any;
|
|
1432
|
+
show: boolean;
|
|
1433
|
+
button: boolean;
|
|
1434
|
+
saveButton: boolean;
|
|
1435
|
+
tipText: string;
|
|
1436
|
+
width: any;
|
|
1437
|
+
label: string;
|
|
1438
|
+
fixed: "left" | "right";
|
|
1439
|
+
page: boolean;
|
|
1440
|
+
scroll: boolean;
|
|
1441
|
+
field: string;
|
|
1442
|
+
onEnd: (data: any[]) => any;
|
|
1443
|
+
rule: "index" | "value";
|
|
1444
|
+
api: Partial<{
|
|
1445
|
+
list: (param?: any, type?: "sortable") => any;
|
|
1446
|
+
update?: ((param?: any[] | undefined, type?: "sortable") => any) | undefined;
|
|
1447
|
+
}>;
|
|
1448
|
+
}> | undefined;
|
|
1449
|
+
selectable?: boolean | Partial<{
|
|
1450
|
+
[key: string]: any;
|
|
1451
|
+
show: boolean | ((data: any) => boolean);
|
|
1452
|
+
on: any;
|
|
1453
|
+
}> | ((data: any) => boolean) | undefined;
|
|
1454
|
+
column?: import("./indexType").CurdConfigColumn<any>[] | undefined;
|
|
1455
|
+
showOverflowTooltip?: boolean | undefined;
|
|
1456
|
+
showSummary?: boolean | undefined;
|
|
1457
|
+
summaryMethod?: ((data: {
|
|
1458
|
+
columns: any[];
|
|
1459
|
+
data: any[];
|
|
1460
|
+
}) => any[]) | undefined;
|
|
1461
|
+
inlineEdit?: boolean | undefined;
|
|
1462
|
+
operate?: {
|
|
1463
|
+
[key: string]: any;
|
|
1464
|
+
width?: any;
|
|
1465
|
+
} | undefined;
|
|
1466
|
+
add?: boolean | ((data: any) => boolean) | undefined;
|
|
1467
|
+
update?: boolean | ((data: any) => boolean) | undefined;
|
|
1468
|
+
delete?: boolean | ((data: any) => boolean) | undefined;
|
|
1469
|
+
view?: boolean | ((data: any) => boolean) | undefined;
|
|
1470
|
+
on?: Record<string, any> | undefined;
|
|
1471
|
+
fitHeight?: boolean | undefined;
|
|
1472
|
+
};
|
|
1473
|
+
getColumnBind: () => {
|
|
1474
|
+
[x: string]: any;
|
|
1475
|
+
};
|
|
1476
|
+
destroy: () => void;
|
|
1477
|
+
getBody: () => HTMLElement | null;
|
|
1478
|
+
loadModule: () => Promise<any>;
|
|
1479
|
+
applyRule: (data: any[], field: string, rule: "index" | "value", values: any[]) => void;
|
|
1480
|
+
sync: () => Promise<void>;
|
|
1481
|
+
refreshList: () => Promise<void>;
|
|
1482
|
+
fitHeight: boolean;
|
|
1483
|
+
start: () => Promise<void>;
|
|
1484
|
+
exit: () => Promise<void>;
|
|
1485
|
+
save: () => Promise<void>;
|
|
1486
|
+
command: (command: "save" | "exit") => Promise<void>;
|
|
1487
|
+
};
|
|
1381
1488
|
header: {
|
|
1382
1489
|
group: {
|
|
1383
1490
|
expand: boolean;
|
|
1384
1491
|
toggleExpandAll: () => void;
|
|
1385
1492
|
};
|
|
1386
1493
|
};
|
|
1387
|
-
|
|
1494
|
+
parseListResult: (res: any) => Promise<{
|
|
1495
|
+
data: any;
|
|
1496
|
+
total: any;
|
|
1497
|
+
}>;
|
|
1498
|
+
applyListResult: (res: any, total?: number) => Promise<{
|
|
1499
|
+
data: any;
|
|
1500
|
+
total: any;
|
|
1501
|
+
}>;
|
|
1502
|
+
getList: (type?: "sortable") => Promise<void>;
|
|
1388
1503
|
selection: {
|
|
1389
1504
|
list: any[];
|
|
1390
1505
|
change: (selection: any[]) => void;
|
|
@@ -1890,6 +2005,25 @@ declare const conf: {
|
|
|
1890
2005
|
show?: boolean | ((data: any) => boolean) | undefined;
|
|
1891
2006
|
on?: any;
|
|
1892
2007
|
} | undefined;
|
|
2008
|
+
sortable?: {
|
|
2009
|
+
[x: string]: any;
|
|
2010
|
+
show?: boolean | undefined;
|
|
2011
|
+
button?: boolean | undefined;
|
|
2012
|
+
saveButton?: boolean | undefined;
|
|
2013
|
+
tipText?: string | undefined;
|
|
2014
|
+
width?: any;
|
|
2015
|
+
label?: string | undefined;
|
|
2016
|
+
fixed?: "left" | "right" | undefined;
|
|
2017
|
+
page?: boolean | undefined;
|
|
2018
|
+
scroll?: boolean | undefined;
|
|
2019
|
+
field?: string | undefined;
|
|
2020
|
+
onEnd?: ((data: any[]) => any) | undefined;
|
|
2021
|
+
rule?: "index" | "value" | undefined;
|
|
2022
|
+
api?: {
|
|
2023
|
+
list?: ((param?: any, type?: "sortable") => any) | undefined;
|
|
2024
|
+
update?: ((param?: any[] | undefined, type?: "sortable") => any) | undefined;
|
|
2025
|
+
} | undefined;
|
|
2026
|
+
} | undefined;
|
|
1893
2027
|
selectable?: boolean | ((data: any) => boolean) | {
|
|
1894
2028
|
[x: string]: any;
|
|
1895
2029
|
show?: boolean | ((data: any) => boolean) | undefined;
|
|
@@ -2795,9 +2929,9 @@ declare const conf: {
|
|
|
2795
2929
|
} | undefined;
|
|
2796
2930
|
}[];
|
|
2797
2931
|
api: {
|
|
2798
|
-
list: (param?: any) => any;
|
|
2932
|
+
list: (param?: any, type?: "sortable") => any;
|
|
2799
2933
|
create?: ((param?: any) => any) | undefined;
|
|
2800
|
-
update?: ((param?: any, type?: "switch") => any) | undefined;
|
|
2934
|
+
update?: ((param?: any, type?: "switch" | "sortable") => any) | undefined;
|
|
2801
2935
|
delete?: ((param?: ({
|
|
2802
2936
|
items: any[];
|
|
2803
2937
|
} & Record<string, any>) | undefined) => any) | undefined;
|
|
@@ -2832,13 +2966,13 @@ declare var __VLS_1: {}, __VLS_7: {
|
|
|
2832
2966
|
row: Record<string, any>;
|
|
2833
2967
|
}, __VLS_61: {
|
|
2834
2968
|
row: Record<string, any>;
|
|
2835
|
-
}, __VLS_123: {}, __VLS_125: {},
|
|
2969
|
+
}, __VLS_123: {}, __VLS_125: {}, __VLS_213: {}, __VLS_226: string | number, __VLS_227: any, __VLS_233: {}, __VLS_239: {
|
|
2836
2970
|
row: any;
|
|
2837
|
-
},
|
|
2971
|
+
}, __VLS_257: {
|
|
2838
2972
|
row: any;
|
|
2839
|
-
},
|
|
2973
|
+
}, __VLS_291: {
|
|
2840
2974
|
row: any;
|
|
2841
|
-
},
|
|
2975
|
+
}, __VLS_302: {}, __VLS_308: {
|
|
2842
2976
|
row: {
|
|
2843
2977
|
title: string;
|
|
2844
2978
|
rules: any;
|
|
@@ -3728,10 +3862,10 @@ declare var __VLS_1: {}, __VLS_7: {
|
|
|
3728
3862
|
submit: () => Promise<void>;
|
|
3729
3863
|
close: () => void;
|
|
3730
3864
|
};
|
|
3731
|
-
},
|
|
3865
|
+
}, __VLS_320: string | number, __VLS_321: {
|
|
3732
3866
|
row: Record<string, any>;
|
|
3733
3867
|
item: import("./indexType").CurdConfigColumn<any>;
|
|
3734
|
-
},
|
|
3868
|
+
}, __VLS_323: {
|
|
3735
3869
|
row: {
|
|
3736
3870
|
title: string;
|
|
3737
3871
|
rules: any;
|
|
@@ -4621,7 +4755,7 @@ declare var __VLS_1: {}, __VLS_7: {
|
|
|
4621
4755
|
submit: () => Promise<void>;
|
|
4622
4756
|
close: () => void;
|
|
4623
4757
|
};
|
|
4624
|
-
},
|
|
4758
|
+
}, __VLS_329: {
|
|
4625
4759
|
row: {
|
|
4626
4760
|
title: string;
|
|
4627
4761
|
rules: any;
|
|
@@ -5523,9 +5657,9 @@ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$
|
|
|
5523
5657
|
} & {
|
|
5524
5658
|
[K in NonNullable<typeof __VLS_36>]?: (props: typeof __VLS_37) => any;
|
|
5525
5659
|
} & {
|
|
5526
|
-
[K in NonNullable<typeof
|
|
5660
|
+
[K in NonNullable<typeof __VLS_226>]?: (props: typeof __VLS_227) => any;
|
|
5527
5661
|
} & {
|
|
5528
|
-
[K in NonNullable<typeof
|
|
5662
|
+
[K in NonNullable<typeof __VLS_320>]?: (props: typeof __VLS_321) => any;
|
|
5529
5663
|
} & {
|
|
5530
5664
|
'box-left'?: (props: typeof __VLS_1) => any;
|
|
5531
5665
|
} & {
|
|
@@ -5539,21 +5673,23 @@ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$
|
|
|
5539
5673
|
} & {
|
|
5540
5674
|
'tools-right'?: (props: typeof __VLS_125) => any;
|
|
5541
5675
|
} & {
|
|
5542
|
-
'table-header-
|
|
5676
|
+
'table-header-sortable'?: (props: typeof __VLS_213) => any;
|
|
5543
5677
|
} & {
|
|
5544
|
-
'table-op
|
|
5678
|
+
'table-header-op'?: (props: typeof __VLS_233) => any;
|
|
5545
5679
|
} & {
|
|
5546
|
-
'table-op-
|
|
5680
|
+
'table-op-left'?: (props: typeof __VLS_239) => any;
|
|
5547
5681
|
} & {
|
|
5548
|
-
'table-op-right'?: (props: typeof
|
|
5682
|
+
'table-op-edit-right'?: (props: typeof __VLS_257) => any;
|
|
5549
5683
|
} & {
|
|
5550
|
-
'
|
|
5684
|
+
'table-op-right'?: (props: typeof __VLS_291) => any;
|
|
5551
5685
|
} & {
|
|
5552
|
-
'
|
|
5686
|
+
'box-right'?: (props: typeof __VLS_302) => any;
|
|
5553
5687
|
} & {
|
|
5554
|
-
'dialog-
|
|
5688
|
+
'dialog-start'?: (props: typeof __VLS_308) => any;
|
|
5555
5689
|
} & {
|
|
5556
|
-
'dialog-
|
|
5690
|
+
'dialog-end'?: (props: typeof __VLS_323) => any;
|
|
5691
|
+
} & {
|
|
5692
|
+
'dialog-footer'?: (props: typeof __VLS_329) => any;
|
|
5557
5693
|
}>;
|
|
5558
5694
|
declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5559
5695
|
/**
|
|
@@ -5594,6 +5730,7 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
5594
5730
|
Expand: typeof Expand;
|
|
5595
5731
|
IconRefresh: typeof IconRefresh;
|
|
5596
5732
|
TableColumn: typeof TableColumn;
|
|
5733
|
+
questionFilled: typeof questionFilled;
|
|
5597
5734
|
EDialog: typeof EDialog;
|
|
5598
5735
|
isFun: typeof isFun;
|
|
5599
5736
|
conf: typeof conf;
|
|
@@ -7005,13 +7142,127 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
7005
7142
|
list: any[];
|
|
7006
7143
|
};
|
|
7007
7144
|
};
|
|
7145
|
+
sortable: {
|
|
7146
|
+
mode: boolean;
|
|
7147
|
+
actionLoading: boolean;
|
|
7148
|
+
instance: {
|
|
7149
|
+
destroy: () => void;
|
|
7150
|
+
} | undefined;
|
|
7151
|
+
modulePromise: {
|
|
7152
|
+
then: <TResult1 = any, TResult2 = never>(onfulfilled?: ((value: any) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
|
|
7153
|
+
catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<any>;
|
|
7154
|
+
finally: (onfinally?: (() => void) | null | undefined) => Promise<any>;
|
|
7155
|
+
readonly [Symbol.toStringTag]: string;
|
|
7156
|
+
} | undefined;
|
|
7157
|
+
getOption: () => Partial<{
|
|
7158
|
+
[key: string]: any;
|
|
7159
|
+
show: boolean;
|
|
7160
|
+
button: boolean;
|
|
7161
|
+
saveButton: boolean;
|
|
7162
|
+
tipText: string;
|
|
7163
|
+
width: any;
|
|
7164
|
+
label: string;
|
|
7165
|
+
fixed: "left" | "right";
|
|
7166
|
+
page: boolean;
|
|
7167
|
+
scroll: boolean;
|
|
7168
|
+
field: string;
|
|
7169
|
+
onEnd: (data: any[]) => any;
|
|
7170
|
+
rule: "index" | "value";
|
|
7171
|
+
api: Partial<{
|
|
7172
|
+
list: (param?: any, type?: "sortable") => any;
|
|
7173
|
+
update?: ((param?: any[] | undefined, type?: "sortable") => any) | undefined;
|
|
7174
|
+
}>;
|
|
7175
|
+
}>;
|
|
7176
|
+
showTriggerButton: () => boolean | undefined;
|
|
7177
|
+
showActionButton: () => boolean | undefined;
|
|
7178
|
+
showSaveButton: () => boolean | undefined;
|
|
7179
|
+
isActive: () => boolean;
|
|
7180
|
+
showPagination: () => boolean | undefined;
|
|
7181
|
+
disableScroll: () => boolean;
|
|
7182
|
+
getTableBindOption: () => {
|
|
7183
|
+
height?: undefined;
|
|
7184
|
+
maxHeight?: undefined;
|
|
7185
|
+
editMode?: boolean | undefined;
|
|
7186
|
+
rowKey?: string | undefined;
|
|
7187
|
+
border?: boolean | undefined;
|
|
7188
|
+
index?: boolean | Partial<{
|
|
7189
|
+
[key: string]: any;
|
|
7190
|
+
show: boolean | ((data: any) => boolean);
|
|
7191
|
+
on: any;
|
|
7192
|
+
}> | ((data: any) => boolean) | undefined;
|
|
7193
|
+
sortable?: Partial<{
|
|
7194
|
+
[key: string]: any;
|
|
7195
|
+
show: boolean;
|
|
7196
|
+
button: boolean;
|
|
7197
|
+
saveButton: boolean;
|
|
7198
|
+
tipText: string;
|
|
7199
|
+
width: any;
|
|
7200
|
+
label: string;
|
|
7201
|
+
fixed: "left" | "right";
|
|
7202
|
+
page: boolean;
|
|
7203
|
+
scroll: boolean;
|
|
7204
|
+
field: string;
|
|
7205
|
+
onEnd: (data: any[]) => any;
|
|
7206
|
+
rule: "index" | "value";
|
|
7207
|
+
api: Partial<{
|
|
7208
|
+
list: (param?: any, type?: "sortable") => any;
|
|
7209
|
+
update?: ((param?: any[] | undefined, type?: "sortable") => any) | undefined;
|
|
7210
|
+
}>;
|
|
7211
|
+
}> | undefined;
|
|
7212
|
+
selectable?: boolean | Partial<{
|
|
7213
|
+
[key: string]: any;
|
|
7214
|
+
show: boolean | ((data: any) => boolean);
|
|
7215
|
+
on: any;
|
|
7216
|
+
}> | ((data: any) => boolean) | undefined;
|
|
7217
|
+
column?: import("./indexType").CurdConfigColumn<any>[] | undefined;
|
|
7218
|
+
showOverflowTooltip?: boolean | undefined;
|
|
7219
|
+
showSummary?: boolean | undefined;
|
|
7220
|
+
summaryMethod?: ((data: {
|
|
7221
|
+
columns: any[];
|
|
7222
|
+
data: any[];
|
|
7223
|
+
}) => any[]) | undefined;
|
|
7224
|
+
inlineEdit?: boolean | undefined;
|
|
7225
|
+
operate?: {
|
|
7226
|
+
[key: string]: any;
|
|
7227
|
+
width?: any;
|
|
7228
|
+
} | undefined;
|
|
7229
|
+
add?: boolean | ((data: any) => boolean) | undefined;
|
|
7230
|
+
update?: boolean | ((data: any) => boolean) | undefined;
|
|
7231
|
+
delete?: boolean | ((data: any) => boolean) | undefined;
|
|
7232
|
+
view?: boolean | ((data: any) => boolean) | undefined;
|
|
7233
|
+
on?: Record<string, any> | undefined;
|
|
7234
|
+
fitHeight?: boolean | undefined;
|
|
7235
|
+
};
|
|
7236
|
+
getColumnBind: () => {
|
|
7237
|
+
[x: string]: any;
|
|
7238
|
+
};
|
|
7239
|
+
destroy: () => void;
|
|
7240
|
+
getBody: () => HTMLElement | null;
|
|
7241
|
+
loadModule: () => Promise<any>;
|
|
7242
|
+
applyRule: (data: any[], field: string, rule: "index" | "value", values: any[]) => void;
|
|
7243
|
+
sync: () => Promise<void>;
|
|
7244
|
+
refreshList: () => Promise<void>;
|
|
7245
|
+
fitHeight: boolean;
|
|
7246
|
+
start: () => Promise<void>;
|
|
7247
|
+
exit: () => Promise<void>;
|
|
7248
|
+
save: () => Promise<void>;
|
|
7249
|
+
command: (command: "save" | "exit") => Promise<void>;
|
|
7250
|
+
};
|
|
7008
7251
|
header: {
|
|
7009
7252
|
group: {
|
|
7010
7253
|
expand: boolean;
|
|
7011
7254
|
toggleExpandAll: () => void;
|
|
7012
7255
|
};
|
|
7013
7256
|
};
|
|
7014
|
-
|
|
7257
|
+
parseListResult: (res: any) => Promise<{
|
|
7258
|
+
data: any;
|
|
7259
|
+
total: any;
|
|
7260
|
+
}>;
|
|
7261
|
+
applyListResult: (res: any, total?: number) => Promise<{
|
|
7262
|
+
data: any;
|
|
7263
|
+
total: any;
|
|
7264
|
+
}>;
|
|
7265
|
+
getList: (type?: "sortable") => Promise<void>;
|
|
7015
7266
|
selection: {
|
|
7016
7267
|
list: any[];
|
|
7017
7268
|
change: (selection: any[]) => void;
|
|
@@ -7517,6 +7768,25 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
7517
7768
|
show?: boolean | ((data: any) => boolean) | undefined;
|
|
7518
7769
|
on?: any;
|
|
7519
7770
|
} | undefined;
|
|
7771
|
+
sortable?: {
|
|
7772
|
+
[x: string]: any;
|
|
7773
|
+
show?: boolean | undefined;
|
|
7774
|
+
button?: boolean | undefined;
|
|
7775
|
+
saveButton?: boolean | undefined;
|
|
7776
|
+
tipText?: string | undefined;
|
|
7777
|
+
width?: any;
|
|
7778
|
+
label?: string | undefined;
|
|
7779
|
+
fixed?: "left" | "right" | undefined;
|
|
7780
|
+
page?: boolean | undefined;
|
|
7781
|
+
scroll?: boolean | undefined;
|
|
7782
|
+
field?: string | undefined;
|
|
7783
|
+
onEnd?: ((data: any[]) => any) | undefined;
|
|
7784
|
+
rule?: "index" | "value" | undefined;
|
|
7785
|
+
api?: {
|
|
7786
|
+
list?: ((param?: any, type?: "sortable") => any) | undefined;
|
|
7787
|
+
update?: ((param?: any[] | undefined, type?: "sortable") => any) | undefined;
|
|
7788
|
+
} | undefined;
|
|
7789
|
+
} | undefined;
|
|
7520
7790
|
selectable?: boolean | ((data: any) => boolean) | {
|
|
7521
7791
|
[x: string]: any;
|
|
7522
7792
|
show?: boolean | ((data: any) => boolean) | undefined;
|
|
@@ -8422,9 +8692,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
8422
8692
|
} | undefined;
|
|
8423
8693
|
}[];
|
|
8424
8694
|
api: {
|
|
8425
|
-
list: (param?: any) => any;
|
|
8695
|
+
list: (param?: any, type?: "sortable") => any;
|
|
8426
8696
|
create?: ((param?: any) => any) | undefined;
|
|
8427
|
-
update?: ((param?: any, type?: "switch") => any) | undefined;
|
|
8697
|
+
update?: ((param?: any, type?: "switch" | "sortable") => any) | undefined;
|
|
8428
8698
|
delete?: ((param?: ({
|
|
8429
8699
|
items: any[];
|
|
8430
8700
|
} & Record<string, any>) | undefined) => any) | undefined;
|
|
@@ -185,6 +185,45 @@ export interface CurdConfig<T = any> {
|
|
|
185
185
|
/** 选择事件 */
|
|
186
186
|
on: any;
|
|
187
187
|
}> | ((data: T) => boolean) | boolean;
|
|
188
|
+
/**
|
|
189
|
+
* 是否显示拖动排序列
|
|
190
|
+
* 开启后会按需加载 Sortable,并支持拖动调整当前表格数据顺序
|
|
191
|
+
* 默认不显示
|
|
192
|
+
*/
|
|
193
|
+
sortable: Partial<{
|
|
194
|
+
[key: string]: any;
|
|
195
|
+
/** 是否显示拖拽排序列 */
|
|
196
|
+
show: boolean;
|
|
197
|
+
/** 是否显示操作排序按钮,如果显示,使show属性失效,则默认不显示拖拽排序列,也不会直接加载sortablejs,点击排序按钮后才开始加载sortablejs */
|
|
198
|
+
button: boolean;
|
|
199
|
+
/** 是否显示保存排序按钮 - 默认开启 当button关闭时使用 */
|
|
200
|
+
saveButton: boolean;
|
|
201
|
+
/** 拖拽列提示文本 */
|
|
202
|
+
tipText: string;
|
|
203
|
+
/** 拖拽列宽度,默认54 */
|
|
204
|
+
width: any;
|
|
205
|
+
/** 拖拽列标题 */
|
|
206
|
+
label: string;
|
|
207
|
+
/** 拖拽列固定位置,默认left */
|
|
208
|
+
fixed: 'left' | 'right';
|
|
209
|
+
/** 排序时是否显示分页 - 默认不显示 */
|
|
210
|
+
page: boolean;
|
|
211
|
+
/** 没有分页时是否需要滚动条 - 默认没有 */
|
|
212
|
+
scroll: boolean;
|
|
213
|
+
/** 排序字段名 - 默认sortNo */
|
|
214
|
+
field: string;
|
|
215
|
+
/** 拖拽排序结束自定义排序,使rule字段失效 */
|
|
216
|
+
onEnd: (data: T[]) => any;
|
|
217
|
+
/** 排序规则 - index:按照当前索引自动从1开始排序 value:按照原有值重新分配排序 默认按照索引排序 */
|
|
218
|
+
rule: 'index' | 'value';
|
|
219
|
+
/** 操作的api */
|
|
220
|
+
api: Partial<{
|
|
221
|
+
/** 获取操作的列表数据 - 默认调用api.list,调用后会覆盖当前显示表格列表数据,会传入额外参数类型 */
|
|
222
|
+
list: (param?: T & Record<string, any>, type?: 'sortable') => any;
|
|
223
|
+
/** 更新操作的列表数据 - 仅在启用button时会调用 - 默认取api.update,调用后会覆盖当前显示表格列表数据,会传入额外参数类型 */
|
|
224
|
+
update?: (param?: T[], type?: 'sortable') => any;
|
|
225
|
+
}>;
|
|
226
|
+
}>;
|
|
188
227
|
/**
|
|
189
228
|
* 是否可多选 - 通过conf.table.selection.list获取已选数据
|
|
190
229
|
* 默认不显示
|
|
@@ -389,7 +428,7 @@ export interface CurdConfig<T = any> {
|
|
|
389
428
|
* @param param 搜索参数-分页和搜索参数
|
|
390
429
|
* @returns 列表数据
|
|
391
430
|
*/
|
|
392
|
-
list: (param?: T & Record<string, any
|
|
431
|
+
list: (param?: T & Record<string, any>, type?: 'sortable') => any;
|
|
393
432
|
/**
|
|
394
433
|
* 新增
|
|
395
434
|
*/
|
|
@@ -397,7 +436,7 @@ export interface CurdConfig<T = any> {
|
|
|
397
436
|
/**
|
|
398
437
|
* 编辑 - 如果有switch类型可以在table中直接修改并没有传入api接口,默认调用更新接口,会传入第二个参数type: 'switch'
|
|
399
438
|
*/
|
|
400
|
-
update?: (param?: T, type?: 'switch') => any;
|
|
439
|
+
update?: (param?: T | T[], type?: 'switch' | 'sortable') => any;
|
|
401
440
|
/**
|
|
402
441
|
* 删除
|
|
403
442
|
*/
|
|
@@ -251,6 +251,19 @@ export default class TFormConfig {
|
|
|
251
251
|
};
|
|
252
252
|
/** 是否填充剩余高度 默认填充 */
|
|
253
253
|
fitHeight: boolean;
|
|
254
|
+
sortable: {
|
|
255
|
+
show: boolean;
|
|
256
|
+
button: boolean;
|
|
257
|
+
saveButton: boolean;
|
|
258
|
+
width: number;
|
|
259
|
+
label: string;
|
|
260
|
+
fixed: string;
|
|
261
|
+
page: boolean;
|
|
262
|
+
scroll: boolean;
|
|
263
|
+
field: string;
|
|
264
|
+
rule: "index" | "value";
|
|
265
|
+
api: {};
|
|
266
|
+
};
|
|
254
267
|
};
|
|
255
268
|
columnConfig: {
|
|
256
269
|
type: any;
|
|
@@ -35,6 +35,12 @@ declare const curdI18n: {
|
|
|
35
35
|
confirmSwitchMessage: string;
|
|
36
36
|
mergeColumn: string;
|
|
37
37
|
expandColumn: string;
|
|
38
|
+
sortable: string;
|
|
39
|
+
sortableStart: string;
|
|
40
|
+
sortableAction: string;
|
|
41
|
+
sortableSave: string;
|
|
42
|
+
sortableExit: string;
|
|
43
|
+
sortableUpdateApiRequired: string;
|
|
38
44
|
};
|
|
39
45
|
/**
|
|
40
46
|
* 国际化管理,所有 TCurd 组件内部的文案均通过此类获取
|
|
@@ -113,6 +119,12 @@ export default class TFormI18n {
|
|
|
113
119
|
confirmSwitchMessage: string;
|
|
114
120
|
mergeColumn: string;
|
|
115
121
|
expandColumn: string;
|
|
122
|
+
sortable: string;
|
|
123
|
+
sortableStart: string;
|
|
124
|
+
sortableAction: string;
|
|
125
|
+
sortableSave: string;
|
|
126
|
+
sortableExit: string;
|
|
127
|
+
sortableUpdateApiRequired: string;
|
|
116
128
|
};
|
|
117
129
|
}
|
|
118
130
|
export {};
|
package/dist/utils/TSys.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc1-form",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
4
4
|
"description": "我来助你-表单组件库",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "22.15.2",
|
|
50
|
+
"@types/sortablejs": "^1.15.9",
|
|
50
51
|
"@vitejs/plugin-vue": "5.2.1",
|
|
51
52
|
"@vue/tsconfig": "0.7.0",
|
|
52
53
|
"cc1-js": "1.0.8",
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"element-plus": "2.9.7",
|
|
55
56
|
"less": "4.3.0",
|
|
56
57
|
"prettier": "3.2.5",
|
|
58
|
+
"sortablejs": "^1.15.7",
|
|
57
59
|
"tsc-alias": "1.8.11",
|
|
58
60
|
"tsx": "4.19.4",
|
|
59
61
|
"typescript": "5.8.2",
|