@next-bricks/advanced 0.8.0 → 0.9.1
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/bricks.json +1 -1
- package/dist/chunks/1303.f9a141a9.js +2 -0
- package/dist/chunks/1303.f9a141a9.js.map +1 -0
- package/dist/chunks/{1646.76ffff34.js → 1646.fb67fc33.js} +2 -2
- package/dist/chunks/1646.fb67fc33.js.map +1 -0
- package/dist/chunks/{2108.68af1eee.js → 2108.0d33f648.js} +2 -2
- package/dist/chunks/{2108.68af1eee.js.map → 2108.0d33f648.js.map} +1 -1
- package/dist/chunks/5163.0c1dddd9.js +2 -0
- package/dist/chunks/5163.0c1dddd9.js.map +1 -0
- package/dist/chunks/5381.7f5fc929.js +2 -0
- package/dist/chunks/5381.7f5fc929.js.map +1 -0
- package/dist/chunks/5491.da516674.js +2 -0
- package/dist/chunks/5491.da516674.js.map +1 -0
- package/dist/chunks/5636.90726873.js +2 -0
- package/dist/chunks/{5636.12dd2cb9.js.map → 5636.90726873.js.map} +1 -1
- package/dist/chunks/6653.215bb757.js +2 -0
- package/dist/chunks/6653.215bb757.js.map +1 -0
- package/dist/chunks/6660.af1b959a.js +2 -0
- package/dist/chunks/6660.af1b959a.js.map +1 -0
- package/dist/chunks/6805.82916868.js +2 -0
- package/dist/chunks/6805.82916868.js.map +1 -0
- package/dist/chunks/7067.9d9578ca.js +2 -0
- package/dist/chunks/7067.9d9578ca.js.map +1 -0
- package/dist/chunks/7089.b4f733fa.js +2 -0
- package/dist/chunks/7089.b4f733fa.js.map +1 -0
- package/dist/chunks/7746.46c6918e.js +2 -0
- package/dist/chunks/7746.46c6918e.js.map +1 -0
- package/dist/chunks/{8498.c282e08e.js → 8498.000d98f7.js} +2 -2
- package/dist/chunks/8498.000d98f7.js.map +1 -0
- package/dist/chunks/9703.675550a6.js +2 -0
- package/dist/chunks/9703.675550a6.js.map +1 -0
- package/dist/chunks/{eo-cascader.be17bc29.js → eo-cascader.eb32ddc2.js} +2 -2
- package/dist/chunks/{eo-cascader.be17bc29.js.map → eo-cascader.eb32ddc2.js.map} +1 -1
- package/dist/chunks/eo-next-table.11909b77.js +2 -0
- package/dist/chunks/eo-next-table.11909b77.js.map +1 -0
- package/dist/chunks/eo-table.280be9c5.js +2 -0
- package/dist/chunks/{eo-table.8d1c324b.js.map → eo-table.280be9c5.js.map} +1 -1
- package/dist/chunks/main.8c1e20c9.js +2 -0
- package/dist/chunks/main.8c1e20c9.js.map +1 -0
- package/dist/examples.json +1 -1
- package/dist/index.21798943.js +2 -0
- package/dist/index.21798943.js.map +1 -0
- package/dist/manifest.json +55 -0
- package/dist/types.json +383 -2
- package/dist-types/next-table/Table.d.ts +11 -1
- package/dist-types/next-table/index.d.ts +34 -1
- package/dist-types/next-table/interface.d.ts +19 -3
- package/dist-types/next-table/utils.d.ts +16 -0
- package/docs/eo-next-table.md +381 -0
- package/package.json +2 -2
- package/dist/chunks/1646.76ffff34.js.map +0 -1
- package/dist/chunks/3914.d7f14c10.js +0 -2
- package/dist/chunks/3914.d7f14c10.js.map +0 -1
- package/dist/chunks/4070.3ef77fb0.js +0 -2
- package/dist/chunks/4070.3ef77fb0.js.map +0 -1
- package/dist/chunks/5202.31f6c01a.js +0 -2
- package/dist/chunks/5202.31f6c01a.js.map +0 -1
- package/dist/chunks/5381.3beebdb0.js +0 -2
- package/dist/chunks/5381.3beebdb0.js.map +0 -1
- package/dist/chunks/5636.12dd2cb9.js +0 -2
- package/dist/chunks/6653.20094386.js +0 -2
- package/dist/chunks/6653.20094386.js.map +0 -1
- package/dist/chunks/6660.84288c37.js +0 -2
- package/dist/chunks/6660.84288c37.js.map +0 -1
- package/dist/chunks/7746.db8450a8.js +0 -2
- package/dist/chunks/7746.db8450a8.js.map +0 -1
- package/dist/chunks/7782.8fe619f8.js +0 -2
- package/dist/chunks/7782.8fe619f8.js.map +0 -1
- package/dist/chunks/834.02960bd3.js +0 -2
- package/dist/chunks/834.02960bd3.js.map +0 -1
- package/dist/chunks/8498.c282e08e.js.map +0 -1
- package/dist/chunks/eo-next-table.96f82966.js +0 -2
- package/dist/chunks/eo-next-table.96f82966.js.map +0 -1
- package/dist/chunks/eo-table.8d1c324b.js +0 -2
- package/dist/chunks/main.2bd0fbf4.js +0 -2
- package/dist/chunks/main.2bd0fbf4.js.map +0 -1
- package/dist/index.ec259aef.js +0 -2
- package/dist/index.ec259aef.js.map +0 -1
package/dist/manifest.json
CHANGED
|
@@ -457,12 +457,28 @@
|
|
|
457
457
|
"attribute": false,
|
|
458
458
|
"type": "DataSource"
|
|
459
459
|
},
|
|
460
|
+
{
|
|
461
|
+
"name": "frontSearch",
|
|
462
|
+
"description": "是否前端搜索",
|
|
463
|
+
"type": "boolean"
|
|
464
|
+
},
|
|
460
465
|
{
|
|
461
466
|
"name": "pagination",
|
|
462
467
|
"description": "分页配置",
|
|
463
468
|
"attribute": false,
|
|
464
469
|
"type": "PaginationType"
|
|
465
470
|
},
|
|
471
|
+
{
|
|
472
|
+
"name": "multiSort",
|
|
473
|
+
"description": "是否支持多列排序,前端搜索时需设置 column.sortPriority 优先级",
|
|
474
|
+
"type": "boolean"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"name": "sort",
|
|
478
|
+
"description": "排序信息",
|
|
479
|
+
"attribute": false,
|
|
480
|
+
"type": "Sort | Sort[]"
|
|
481
|
+
},
|
|
466
482
|
{
|
|
467
483
|
"name": "rowSelection",
|
|
468
484
|
"description": "表格行可选择配置",
|
|
@@ -493,6 +509,12 @@
|
|
|
493
509
|
"attribute": false,
|
|
494
510
|
"type": "(string | number)[]"
|
|
495
511
|
},
|
|
512
|
+
{
|
|
513
|
+
"name": "childrenColumnName",
|
|
514
|
+
"description": "树形结构的列名",
|
|
515
|
+
"default": "\"children\"",
|
|
516
|
+
"type": "string"
|
|
517
|
+
},
|
|
496
518
|
{
|
|
497
519
|
"name": "rowDraggable",
|
|
498
520
|
"description": "表格行拖拽配置",
|
|
@@ -503,6 +525,31 @@
|
|
|
503
525
|
"description": "进行前端搜索的字段,支持嵌套的写法。不配置的时候默认为对所有 column.dataIndex 进行前端搜索",
|
|
504
526
|
"attribute": false,
|
|
505
527
|
"type": "(string | string[])[]"
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
"name": "size",
|
|
531
|
+
"description": "表格大小",
|
|
532
|
+
"default": "\"large\"",
|
|
533
|
+
"type": "TableProps<RecordType>[\"size\"]"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"name": "showHeader",
|
|
537
|
+
"description": "是否显示表头",
|
|
538
|
+
"default": "true",
|
|
539
|
+
"type": "boolean"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"name": "scrollConfig",
|
|
543
|
+
"description": "滚动配置",
|
|
544
|
+
"default": "{ x: true }",
|
|
545
|
+
"attribute": false,
|
|
546
|
+
"type": "TableProps<RecordType>[\"scroll\"]"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"name": "optimizedColumns",
|
|
550
|
+
"description": "优化渲染的列(输入对应的 column.key)",
|
|
551
|
+
"attribute": false,
|
|
552
|
+
"type": "(string | number)[]"
|
|
506
553
|
}
|
|
507
554
|
],
|
|
508
555
|
"events": [
|
|
@@ -522,6 +569,14 @@
|
|
|
522
569
|
"type": "{\n page: number;\n pageSize: number;\n }"
|
|
523
570
|
}
|
|
524
571
|
},
|
|
572
|
+
{
|
|
573
|
+
"name": "sort.change",
|
|
574
|
+
"description": "排序变化的回调",
|
|
575
|
+
"detail": {
|
|
576
|
+
"description": "当前排序的信息",
|
|
577
|
+
"type": "Sort | Sort[] | undefined"
|
|
578
|
+
}
|
|
579
|
+
},
|
|
525
580
|
{
|
|
526
581
|
"name": "row.select",
|
|
527
582
|
"description": "行选中项发生变化时的回调",
|
package/dist/types.json
CHANGED
|
@@ -1228,6 +1228,13 @@
|
|
|
1228
1228
|
}
|
|
1229
1229
|
}
|
|
1230
1230
|
},
|
|
1231
|
+
{
|
|
1232
|
+
"name": "frontSearch",
|
|
1233
|
+
"annotation": {
|
|
1234
|
+
"type": "keyword",
|
|
1235
|
+
"value": "boolean"
|
|
1236
|
+
}
|
|
1237
|
+
},
|
|
1231
1238
|
{
|
|
1232
1239
|
"name": "pagination",
|
|
1233
1240
|
"annotation": {
|
|
@@ -1238,6 +1245,38 @@
|
|
|
1238
1245
|
}
|
|
1239
1246
|
}
|
|
1240
1247
|
},
|
|
1248
|
+
{
|
|
1249
|
+
"name": "multiSort",
|
|
1250
|
+
"annotation": {
|
|
1251
|
+
"type": "keyword",
|
|
1252
|
+
"value": "boolean"
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"name": "sort",
|
|
1257
|
+
"annotation": {
|
|
1258
|
+
"type": "union",
|
|
1259
|
+
"types": [
|
|
1260
|
+
{
|
|
1261
|
+
"type": "reference",
|
|
1262
|
+
"typeName": {
|
|
1263
|
+
"type": "identifier",
|
|
1264
|
+
"name": "Sort"
|
|
1265
|
+
}
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
"type": "array",
|
|
1269
|
+
"elementType": {
|
|
1270
|
+
"type": "reference",
|
|
1271
|
+
"typeName": {
|
|
1272
|
+
"type": "identifier",
|
|
1273
|
+
"name": "Sort"
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
]
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1241
1280
|
{
|
|
1242
1281
|
"name": "rowSelection",
|
|
1243
1282
|
"annotation": {
|
|
@@ -1324,6 +1363,13 @@
|
|
|
1324
1363
|
}
|
|
1325
1364
|
}
|
|
1326
1365
|
},
|
|
1366
|
+
{
|
|
1367
|
+
"name": "childrenColumnName",
|
|
1368
|
+
"annotation": {
|
|
1369
|
+
"type": "keyword",
|
|
1370
|
+
"value": "string"
|
|
1371
|
+
}
|
|
1372
|
+
},
|
|
1327
1373
|
{
|
|
1328
1374
|
"name": "rowDraggable",
|
|
1329
1375
|
"annotation": {
|
|
@@ -1355,6 +1401,93 @@
|
|
|
1355
1401
|
}
|
|
1356
1402
|
}
|
|
1357
1403
|
}
|
|
1404
|
+
},
|
|
1405
|
+
{
|
|
1406
|
+
"name": "size",
|
|
1407
|
+
"annotation": {
|
|
1408
|
+
"type": "indexedAccess",
|
|
1409
|
+
"objectType": {
|
|
1410
|
+
"type": "reference",
|
|
1411
|
+
"typeName": {
|
|
1412
|
+
"type": "identifier",
|
|
1413
|
+
"name": "TableProps"
|
|
1414
|
+
},
|
|
1415
|
+
"typeParameters": {
|
|
1416
|
+
"type": "typeParameterInstantiation",
|
|
1417
|
+
"params": [
|
|
1418
|
+
{
|
|
1419
|
+
"type": "reference",
|
|
1420
|
+
"typeName": {
|
|
1421
|
+
"type": "identifier",
|
|
1422
|
+
"name": "RecordType"
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
]
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
"indexType": {
|
|
1429
|
+
"type": "jsLiteral",
|
|
1430
|
+
"value": "size"
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
"name": "showHeader",
|
|
1436
|
+
"annotation": {
|
|
1437
|
+
"type": "keyword",
|
|
1438
|
+
"value": "boolean"
|
|
1439
|
+
}
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"name": "scrollConfig",
|
|
1443
|
+
"annotation": {
|
|
1444
|
+
"type": "indexedAccess",
|
|
1445
|
+
"objectType": {
|
|
1446
|
+
"type": "reference",
|
|
1447
|
+
"typeName": {
|
|
1448
|
+
"type": "identifier",
|
|
1449
|
+
"name": "TableProps"
|
|
1450
|
+
},
|
|
1451
|
+
"typeParameters": {
|
|
1452
|
+
"type": "typeParameterInstantiation",
|
|
1453
|
+
"params": [
|
|
1454
|
+
{
|
|
1455
|
+
"type": "reference",
|
|
1456
|
+
"typeName": {
|
|
1457
|
+
"type": "identifier",
|
|
1458
|
+
"name": "RecordType"
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
]
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
"indexType": {
|
|
1465
|
+
"type": "jsLiteral",
|
|
1466
|
+
"value": "scroll"
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
"name": "optimizedColumns",
|
|
1472
|
+
"annotation": {
|
|
1473
|
+
"type": "array",
|
|
1474
|
+
"elementType": {
|
|
1475
|
+
"type": "parenthesizedType",
|
|
1476
|
+
"annotation": {
|
|
1477
|
+
"type": "union",
|
|
1478
|
+
"types": [
|
|
1479
|
+
{
|
|
1480
|
+
"type": "keyword",
|
|
1481
|
+
"value": "string"
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"type": "keyword",
|
|
1485
|
+
"value": "number"
|
|
1486
|
+
}
|
|
1487
|
+
]
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1358
1491
|
}
|
|
1359
1492
|
],
|
|
1360
1493
|
"events": [
|
|
@@ -1426,6 +1559,37 @@
|
|
|
1426
1559
|
}
|
|
1427
1560
|
}
|
|
1428
1561
|
},
|
|
1562
|
+
{
|
|
1563
|
+
"name": "sort.change",
|
|
1564
|
+
"detail": {
|
|
1565
|
+
"annotation": {
|
|
1566
|
+
"type": "union",
|
|
1567
|
+
"types": [
|
|
1568
|
+
{
|
|
1569
|
+
"type": "reference",
|
|
1570
|
+
"typeName": {
|
|
1571
|
+
"type": "identifier",
|
|
1572
|
+
"name": "Sort"
|
|
1573
|
+
}
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"type": "array",
|
|
1577
|
+
"elementType": {
|
|
1578
|
+
"type": "reference",
|
|
1579
|
+
"typeName": {
|
|
1580
|
+
"type": "identifier",
|
|
1581
|
+
"name": "Sort"
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
"type": "keyword",
|
|
1587
|
+
"value": "undefined"
|
|
1588
|
+
}
|
|
1589
|
+
]
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1429
1593
|
{
|
|
1430
1594
|
"name": "row.select",
|
|
1431
1595
|
"detail": {
|
|
@@ -1736,6 +1900,92 @@
|
|
|
1736
1900
|
"optional": true,
|
|
1737
1901
|
"computed": false,
|
|
1738
1902
|
"description": "记录表格行合并的值的 key"
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
"type": "propertySignature",
|
|
1906
|
+
"key": {
|
|
1907
|
+
"type": "identifier",
|
|
1908
|
+
"name": "sortable"
|
|
1909
|
+
},
|
|
1910
|
+
"annotation": {
|
|
1911
|
+
"type": "keyword",
|
|
1912
|
+
"value": "boolean"
|
|
1913
|
+
},
|
|
1914
|
+
"optional": true,
|
|
1915
|
+
"computed": false,
|
|
1916
|
+
"description": "是否可排序"
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
"type": "propertySignature",
|
|
1920
|
+
"key": {
|
|
1921
|
+
"type": "identifier",
|
|
1922
|
+
"name": "sortPriority"
|
|
1923
|
+
},
|
|
1924
|
+
"annotation": {
|
|
1925
|
+
"type": "keyword",
|
|
1926
|
+
"value": "number"
|
|
1927
|
+
},
|
|
1928
|
+
"optional": true,
|
|
1929
|
+
"computed": false,
|
|
1930
|
+
"description": "前端搜索时,多列排序优先级,数字越大优先级越高"
|
|
1931
|
+
},
|
|
1932
|
+
{
|
|
1933
|
+
"type": "propertySignature",
|
|
1934
|
+
"key": {
|
|
1935
|
+
"type": "identifier",
|
|
1936
|
+
"name": "verticalAlign"
|
|
1937
|
+
},
|
|
1938
|
+
"annotation": {
|
|
1939
|
+
"type": "indexedAccess",
|
|
1940
|
+
"objectType": {
|
|
1941
|
+
"type": "reference",
|
|
1942
|
+
"typeName": {
|
|
1943
|
+
"type": "identifier",
|
|
1944
|
+
"name": "CSSProperties"
|
|
1945
|
+
}
|
|
1946
|
+
},
|
|
1947
|
+
"indexType": {
|
|
1948
|
+
"type": "jsLiteral",
|
|
1949
|
+
"value": "verticalAlign"
|
|
1950
|
+
}
|
|
1951
|
+
},
|
|
1952
|
+
"optional": true,
|
|
1953
|
+
"computed": false,
|
|
1954
|
+
"description": "垂直对齐方式"
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
"type": "propertySignature",
|
|
1958
|
+
"key": {
|
|
1959
|
+
"type": "identifier",
|
|
1960
|
+
"name": "cellStyle"
|
|
1961
|
+
},
|
|
1962
|
+
"annotation": {
|
|
1963
|
+
"type": "reference",
|
|
1964
|
+
"typeName": {
|
|
1965
|
+
"type": "identifier",
|
|
1966
|
+
"name": "CSSProperties"
|
|
1967
|
+
}
|
|
1968
|
+
},
|
|
1969
|
+
"optional": true,
|
|
1970
|
+
"computed": false,
|
|
1971
|
+
"description": "单元格样式"
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
"type": "propertySignature",
|
|
1975
|
+
"key": {
|
|
1976
|
+
"type": "identifier",
|
|
1977
|
+
"name": "headerStyle"
|
|
1978
|
+
},
|
|
1979
|
+
"annotation": {
|
|
1980
|
+
"type": "reference",
|
|
1981
|
+
"typeName": {
|
|
1982
|
+
"type": "identifier",
|
|
1983
|
+
"name": "CSSProperties"
|
|
1984
|
+
}
|
|
1985
|
+
},
|
|
1986
|
+
"optional": true,
|
|
1987
|
+
"computed": false,
|
|
1988
|
+
"description": "头部单元格样式"
|
|
1739
1989
|
}
|
|
1740
1990
|
],
|
|
1741
1991
|
"extends": [
|
|
@@ -1743,7 +1993,7 @@
|
|
|
1743
1993
|
"type": "expressionWithTypeArguments",
|
|
1744
1994
|
"expression": {
|
|
1745
1995
|
"type": "identifier",
|
|
1746
|
-
"name": "
|
|
1996
|
+
"name": "Pick"
|
|
1747
1997
|
},
|
|
1748
1998
|
"typeParameters": {
|
|
1749
1999
|
"type": "typeParameterInstantiation",
|
|
@@ -1752,8 +2002,69 @@
|
|
|
1752
2002
|
"type": "reference",
|
|
1753
2003
|
"typeName": {
|
|
1754
2004
|
"type": "identifier",
|
|
1755
|
-
"name": "
|
|
2005
|
+
"name": "ColumnType"
|
|
2006
|
+
},
|
|
2007
|
+
"typeParameters": {
|
|
2008
|
+
"type": "typeParameterInstantiation",
|
|
2009
|
+
"params": [
|
|
2010
|
+
{
|
|
2011
|
+
"type": "reference",
|
|
2012
|
+
"typeName": {
|
|
2013
|
+
"type": "identifier",
|
|
2014
|
+
"name": "RecordType"
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
]
|
|
1756
2018
|
}
|
|
2019
|
+
},
|
|
2020
|
+
{
|
|
2021
|
+
"type": "union",
|
|
2022
|
+
"types": [
|
|
2023
|
+
{
|
|
2024
|
+
"type": "jsLiteral",
|
|
2025
|
+
"value": "align"
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
"type": "jsLiteral",
|
|
2029
|
+
"value": "colSpan"
|
|
2030
|
+
},
|
|
2031
|
+
{
|
|
2032
|
+
"type": "jsLiteral",
|
|
2033
|
+
"value": "dataIndex"
|
|
2034
|
+
},
|
|
2035
|
+
{
|
|
2036
|
+
"type": "jsLiteral",
|
|
2037
|
+
"value": "ellipsis"
|
|
2038
|
+
},
|
|
2039
|
+
{
|
|
2040
|
+
"type": "jsLiteral",
|
|
2041
|
+
"value": "fixed"
|
|
2042
|
+
},
|
|
2043
|
+
{
|
|
2044
|
+
"type": "jsLiteral",
|
|
2045
|
+
"value": "key"
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
"type": "jsLiteral",
|
|
2049
|
+
"value": "rowScope"
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
"type": "jsLiteral",
|
|
2053
|
+
"value": "showSorterTooltip"
|
|
2054
|
+
},
|
|
2055
|
+
{
|
|
2056
|
+
"type": "jsLiteral",
|
|
2057
|
+
"value": "sortDirections"
|
|
2058
|
+
},
|
|
2059
|
+
{
|
|
2060
|
+
"type": "jsLiteral",
|
|
2061
|
+
"value": "title"
|
|
2062
|
+
},
|
|
2063
|
+
{
|
|
2064
|
+
"type": "jsLiteral",
|
|
2065
|
+
"value": "width"
|
|
2066
|
+
}
|
|
2067
|
+
]
|
|
1757
2068
|
}
|
|
1758
2069
|
]
|
|
1759
2070
|
}
|
|
@@ -1957,6 +2268,50 @@
|
|
|
1957
2268
|
}
|
|
1958
2269
|
]
|
|
1959
2270
|
},
|
|
2271
|
+
{
|
|
2272
|
+
"type": "interface",
|
|
2273
|
+
"name": "Sort",
|
|
2274
|
+
"body": [
|
|
2275
|
+
{
|
|
2276
|
+
"type": "propertySignature",
|
|
2277
|
+
"key": {
|
|
2278
|
+
"type": "identifier",
|
|
2279
|
+
"name": "columnKey"
|
|
2280
|
+
},
|
|
2281
|
+
"annotation": {
|
|
2282
|
+
"type": "union",
|
|
2283
|
+
"types": [
|
|
2284
|
+
{
|
|
2285
|
+
"type": "keyword",
|
|
2286
|
+
"value": "string"
|
|
2287
|
+
},
|
|
2288
|
+
{
|
|
2289
|
+
"type": "keyword",
|
|
2290
|
+
"value": "number"
|
|
2291
|
+
}
|
|
2292
|
+
]
|
|
2293
|
+
},
|
|
2294
|
+
"optional": true,
|
|
2295
|
+
"computed": false
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
"type": "propertySignature",
|
|
2299
|
+
"key": {
|
|
2300
|
+
"type": "identifier",
|
|
2301
|
+
"name": "order"
|
|
2302
|
+
},
|
|
2303
|
+
"annotation": {
|
|
2304
|
+
"type": "reference",
|
|
2305
|
+
"typeName": {
|
|
2306
|
+
"type": "identifier",
|
|
2307
|
+
"name": "SortOrder"
|
|
2308
|
+
}
|
|
2309
|
+
},
|
|
2310
|
+
"optional": true,
|
|
2311
|
+
"computed": false
|
|
2312
|
+
}
|
|
2313
|
+
]
|
|
2314
|
+
},
|
|
1960
2315
|
{
|
|
1961
2316
|
"type": "typeAlias",
|
|
1962
2317
|
"name": "RowSelectionType",
|
|
@@ -1997,6 +2352,28 @@
|
|
|
1997
2352
|
},
|
|
1998
2353
|
"optional": true,
|
|
1999
2354
|
"computed": false
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
"type": "propertySignature",
|
|
2358
|
+
"key": {
|
|
2359
|
+
"type": "identifier",
|
|
2360
|
+
"name": "rowDisabled"
|
|
2361
|
+
},
|
|
2362
|
+
"annotation": {
|
|
2363
|
+
"type": "union",
|
|
2364
|
+
"types": [
|
|
2365
|
+
{
|
|
2366
|
+
"type": "keyword",
|
|
2367
|
+
"value": "string"
|
|
2368
|
+
},
|
|
2369
|
+
{
|
|
2370
|
+
"type": "keyword",
|
|
2371
|
+
"value": "boolean"
|
|
2372
|
+
}
|
|
2373
|
+
]
|
|
2374
|
+
},
|
|
2375
|
+
"optional": true,
|
|
2376
|
+
"computed": false
|
|
2000
2377
|
}
|
|
2001
2378
|
],
|
|
2002
2379
|
"extends": [
|
|
@@ -2050,6 +2427,10 @@
|
|
|
2050
2427
|
{
|
|
2051
2428
|
"type": "jsLiteral",
|
|
2052
2429
|
"value": "type"
|
|
2430
|
+
},
|
|
2431
|
+
{
|
|
2432
|
+
"type": "jsLiteral",
|
|
2433
|
+
"value": "checkStrictly"
|
|
2053
2434
|
}
|
|
2054
2435
|
]
|
|
2055
2436
|
}
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Column, RecordType, DataSource, PaginationType, RowSelectionType, ExpandableType } from "./interface.js";
|
|
2
|
+
import { Column, RecordType, DataSource, PaginationType, RowSelectionType, ExpandableType, Sort } from "./interface.js";
|
|
3
3
|
import { RowSelectMethod } from "antd/es/table/interface.js";
|
|
4
|
+
import type { TableProps } from "antd/es/table";
|
|
4
5
|
interface NextTableComponentProps {
|
|
5
6
|
shadowRoot: ShadowRoot | null;
|
|
6
7
|
rowKey: string;
|
|
7
8
|
columns?: Column[];
|
|
8
9
|
dataSource?: DataSource;
|
|
10
|
+
frontSearch?: boolean;
|
|
9
11
|
pagination?: PaginationType;
|
|
12
|
+
multiSort?: boolean;
|
|
13
|
+
sort?: Sort | Sort[];
|
|
10
14
|
rowSelection?: RowSelectionType;
|
|
11
15
|
selectedRowKeys?: (string | number)[];
|
|
12
16
|
hiddenColumns?: (string | number)[];
|
|
13
17
|
expandable?: ExpandableType;
|
|
14
18
|
expandedRowKeys?: (string | number)[];
|
|
19
|
+
childrenColumnName: string;
|
|
15
20
|
rowDraggable?: boolean;
|
|
16
21
|
searchFields?: (string | string[])[];
|
|
22
|
+
size?: TableProps<RecordType>["size"];
|
|
23
|
+
showHeader?: boolean;
|
|
24
|
+
scrollConfig?: TableProps<RecordType>["scroll"];
|
|
25
|
+
optimizedColumns?: (string | number)[];
|
|
17
26
|
onPageChange?: (detail: {
|
|
18
27
|
page: number;
|
|
19
28
|
pageSize: number;
|
|
@@ -22,6 +31,7 @@ interface NextTableComponentProps {
|
|
|
22
31
|
page: number;
|
|
23
32
|
pageSize: number;
|
|
24
33
|
}) => void;
|
|
34
|
+
onSort?: (detail?: Sort | Sort[]) => void;
|
|
25
35
|
onRowSelect?: (detail: {
|
|
26
36
|
keys: (string | number)[];
|
|
27
37
|
rows: RecordType[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" resolution-mode="require"/>
|
|
2
2
|
import { ReactNextElement } from "@next-core/react-element";
|
|
3
3
|
import "@next-core/theme";
|
|
4
|
-
import { Column, DataSource, ExpandableType, PaginationType, RowSelectionType } from "./interface.js";
|
|
4
|
+
import { Column, DataSource, ExpandableType, PaginationType, RecordType, RowSelectionType, Sort } from "./interface.js";
|
|
5
|
+
import type { TableProps } from "antd/es/table";
|
|
5
6
|
/**
|
|
6
7
|
* 大型表格
|
|
7
8
|
*/
|
|
@@ -19,10 +20,22 @@ export declare class EoNextTable extends ReactNextElement {
|
|
|
19
20
|
* 数据源
|
|
20
21
|
*/
|
|
21
22
|
accessor dataSource: DataSource | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* 是否前端搜索
|
|
25
|
+
*/
|
|
26
|
+
accessor frontSearch: boolean | undefined;
|
|
22
27
|
/**
|
|
23
28
|
* 分页配置
|
|
24
29
|
*/
|
|
25
30
|
accessor pagination: PaginationType;
|
|
31
|
+
/**
|
|
32
|
+
* 是否支持多列排序,前端搜索时需设置 column.sortPriority 优先级
|
|
33
|
+
*/
|
|
34
|
+
accessor multiSort: boolean | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* 排序信息
|
|
37
|
+
*/
|
|
38
|
+
accessor sort: Sort | Sort[] | undefined;
|
|
26
39
|
/**
|
|
27
40
|
* 表格行可选择配置
|
|
28
41
|
*/
|
|
@@ -43,6 +56,10 @@ export declare class EoNextTable extends ReactNextElement {
|
|
|
43
56
|
* 展开项的 key
|
|
44
57
|
*/
|
|
45
58
|
accessor expandedRowKeys: (string | number)[] | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* 树形结构的列名
|
|
61
|
+
*/
|
|
62
|
+
accessor childrenColumnName: string;
|
|
46
63
|
/**
|
|
47
64
|
* 表格行拖拽配置
|
|
48
65
|
*/
|
|
@@ -51,6 +68,22 @@ export declare class EoNextTable extends ReactNextElement {
|
|
|
51
68
|
* 进行前端搜索的字段,支持嵌套的写法。不配置的时候默认为对所有 column.dataIndex 进行前端搜索
|
|
52
69
|
*/
|
|
53
70
|
accessor searchFields: (string | string[])[] | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* 表格大小
|
|
73
|
+
*/
|
|
74
|
+
accessor size: TableProps<RecordType>["size"];
|
|
75
|
+
/**
|
|
76
|
+
* 是否显示表头
|
|
77
|
+
*/
|
|
78
|
+
accessor showHeader: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* 滚动配置
|
|
81
|
+
*/
|
|
82
|
+
accessor scrollConfig: TableProps<RecordType>["scroll"];
|
|
83
|
+
/**
|
|
84
|
+
* 优化渲染的列(输入对应的 column.key)
|
|
85
|
+
*/
|
|
86
|
+
accessor optimizedColumns: (string | number)[] | undefined;
|
|
54
87
|
/**
|
|
55
88
|
* 前端搜索
|
|
56
89
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ColumnType, TablePaginationConfig } from "antd/es/table";
|
|
2
|
-
import type { ExpandableConfig as TableExpandableConfig, TableRowSelection } from "antd/es/table/interface.js";
|
|
2
|
+
import type { SortOrder, ExpandableConfig as TableExpandableConfig, TableRowSelection } from "antd/es/table/interface.js";
|
|
3
3
|
import type { UseBrickConf } from "@next-core/types";
|
|
4
|
+
import { CSSProperties } from "react";
|
|
4
5
|
export type RecordType = Record<string, any>;
|
|
5
|
-
export interface Column extends ColumnType<RecordType> {
|
|
6
|
+
export interface Column extends Pick<ColumnType<RecordType>, "align" | "colSpan" | "dataIndex" | "ellipsis" | "fixed" | "key" | "rowScope" | "showSorterTooltip" | "sortDirections" | "title" | "width"> {
|
|
6
7
|
/** 表头自定义展示构件 */
|
|
7
8
|
headerBrick?: {
|
|
8
9
|
useBrick: UseBrickConf;
|
|
@@ -13,6 +14,16 @@ export interface Column extends ColumnType<RecordType> {
|
|
|
13
14
|
cellColSpanKey?: string;
|
|
14
15
|
/** 记录表格行合并的值的 key */
|
|
15
16
|
cellRowSpanKey?: string;
|
|
17
|
+
/** 是否可排序 */
|
|
18
|
+
sortable?: boolean;
|
|
19
|
+
/** 前端搜索时,多列排序优先级,数字越大优先级越高 */
|
|
20
|
+
sortPriority?: number;
|
|
21
|
+
/** 垂直对齐方式 */
|
|
22
|
+
verticalAlign?: CSSProperties["verticalAlign"];
|
|
23
|
+
/** 单元格样式 */
|
|
24
|
+
cellStyle?: CSSProperties;
|
|
25
|
+
/** 头部单元格样式 */
|
|
26
|
+
headerStyle?: CSSProperties;
|
|
16
27
|
}
|
|
17
28
|
export interface DataSource {
|
|
18
29
|
list?: RecordType[];
|
|
@@ -24,8 +35,9 @@ interface PaginationConfig extends Pick<TablePaginationConfig, "disabled" | "hid
|
|
|
24
35
|
showTotal?: boolean;
|
|
25
36
|
}
|
|
26
37
|
export type PaginationType = false | PaginationConfig | undefined;
|
|
27
|
-
interface RowSelectionConfig extends Pick<TableRowSelection<RecordType>, "columnWidth" | "fixed" | "hideSelectAll" | "preserveSelectedRowKeys" | "type"> {
|
|
38
|
+
interface RowSelectionConfig extends Pick<TableRowSelection<RecordType>, "columnWidth" | "fixed" | "hideSelectAll" | "preserveSelectedRowKeys" | "type" | "checkStrictly"> {
|
|
28
39
|
showSelectInfo?: boolean;
|
|
40
|
+
rowDisabled?: string | boolean;
|
|
29
41
|
}
|
|
30
42
|
export type RowSelectionType = boolean | RowSelectionConfig | undefined;
|
|
31
43
|
interface ExpandableConfig extends Pick<TableExpandableConfig<RecordType>, "columnWidth" | "expandRowByClick" | "defaultExpandAllRows" | "fixed" | "showExpandColumn"> {
|
|
@@ -38,4 +50,8 @@ interface ExpandableConfig extends Pick<TableExpandableConfig<RecordType>, "colu
|
|
|
38
50
|
rowExpandable?: string | boolean;
|
|
39
51
|
}
|
|
40
52
|
export type ExpandableType = boolean | ExpandableConfig | undefined;
|
|
53
|
+
export interface Sort {
|
|
54
|
+
columnKey?: string | number;
|
|
55
|
+
order?: SortOrder;
|
|
56
|
+
}
|
|
41
57
|
export {};
|