@flatbiz/antd 4.5.25 → 4.5.26
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/esm/bootstrap/index.js +1 -1
- package/esm/bootstrap/index.js.map +1 -1
- package/esm/button-operate/index.js +1 -1
- package/esm/button-operate/index.js.map +1 -1
- package/esm/button-wrapper/index.js.map +1 -1
- package/esm/dialog-alert/index.js +1 -1
- package/esm/dialog-alert/index.js.map +1 -1
- package/esm/dialog-confirm/index.css +1 -1
- package/esm/dialog-confirm/index.js +1 -1
- package/esm/dialog-confirm/index.js.map +1 -1
- package/esm/dialog-modal/index.css +1 -1
- package/esm/dialog-modal/index.js +1 -1
- package/esm/dialog-modal/index.js.map +1 -1
- package/esm/drag-editable-card/index.css +0 -0
- package/esm/drag-editable-card/index.js +21 -0
- package/esm/drag-editable-card/index.js.map +1 -0
- package/esm/drag-editable-table/index.js +1 -1
- package/esm/drag-editable-table/index.js.map +1 -1
- package/esm/dropdown-menu-wrapper/index.js +1 -1
- package/esm/dropdown-menu-wrapper/index.js.map +1 -1
- package/esm/easy-form/index.js +1 -1
- package/esm/easy-form/index.js.map +1 -1
- package/esm/editable-card/index.css +1 -0
- package/esm/editable-card/index.js +20 -0
- package/esm/editable-card/index.js.map +1 -0
- package/esm/editable-table/index.js +1 -1
- package/esm/editable-table/index.js.map +1 -1
- package/esm/fba-app/index.css +1 -1
- package/esm/fba-app/index.js +1 -1
- package/esm/fba-app/index.js.map +1 -1
- package/esm/index.js +6 -4
- package/esm/label-value-render/index.js +1 -1
- package/esm/label-value-render/index.js.map +1 -1
- package/esm/table-cell-render/index.js +1 -1
- package/esm/table-cell-render/index.js.map +1 -1
- package/esm/tree-wrapper/index.js +1 -1
- package/esm/tree-wrapper/index.js.map +1 -1
- package/index.d.ts +361 -97
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -408,7 +408,7 @@ export declare const BoxGrid: {
|
|
|
408
408
|
*/
|
|
409
409
|
getGridMapByRange: (minSize: number) => Record<TBoxBreakpoint, number>;
|
|
410
410
|
};
|
|
411
|
-
export type ButtonWrapperProps = Omit<ButtonProps, "onClick"> & {
|
|
411
|
+
export type ButtonWrapperProps = Omit<ButtonProps, "onClick" | "color"> & {
|
|
412
412
|
/** 当返回 Promise 时,按钮自动loading */
|
|
413
413
|
onClick?: (e: React.MouseEvent<HTMLElement>) => Promise<TAny> | void;
|
|
414
414
|
/** 重复点击间隙,单位毫秒 默认值:500 */
|
|
@@ -421,6 +421,7 @@ export type ButtonWrapperProps = Omit<ButtonProps, "onClick"> & {
|
|
|
421
421
|
loadingPosition?: "left" | "center";
|
|
422
422
|
/** 移除按钮内边距,一般用于 type=link 类型下 */
|
|
423
423
|
removeGap?: boolean;
|
|
424
|
+
color?: string;
|
|
424
425
|
};
|
|
425
426
|
/**
|
|
426
427
|
* antd Button包装组件
|
|
@@ -1368,6 +1369,347 @@ export type DragCollapseFormListProps = {
|
|
|
1368
1369
|
* ```
|
|
1369
1370
|
*/
|
|
1370
1371
|
export declare const DragCollapseFormList: (props: DragCollapseFormListProps) => import("react/jsx-runtime").JSX.Element;
|
|
1372
|
+
export type FormWrapperProps<Values = any> = TFormLayoutPreClassNameProps & FormProps<Values> & {
|
|
1373
|
+
children: ReactNode;
|
|
1374
|
+
};
|
|
1375
|
+
/**
|
|
1376
|
+
* Form 包装组件,添加对formItem的布局控制
|
|
1377
|
+
* ```
|
|
1378
|
+
* 1. 内置布局样式使用 preDefinedClassName.form
|
|
1379
|
+
* ```
|
|
1380
|
+
*/
|
|
1381
|
+
export declare const FormWrapper: (props: FormWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
1382
|
+
export type EasyFormProps = Omit<FormWrapperProps, "children"> & {
|
|
1383
|
+
/**
|
|
1384
|
+
* 定义一行显示几列(当外层宽度尺寸大于 992px(lg) 时,一行显示几列), 默认值:3
|
|
1385
|
+
* ```
|
|
1386
|
+
* 1. 当外层宽度尺寸小于992px(lg),为xs、sm、md情况下不受column值影响(column=1除外)
|
|
1387
|
+
* 2. 宽度尺寸定义
|
|
1388
|
+
* xs: 宽度 < 576px
|
|
1389
|
+
* sm: 宽度 ≥ 576px
|
|
1390
|
+
* md: 宽度 ≥ 768px
|
|
1391
|
+
* lg: 宽度 ≥ 992px
|
|
1392
|
+
* xl: 宽度 ≥ 1200px
|
|
1393
|
+
* xxl: 宽度 ≥ 1600px
|
|
1394
|
+
* 3. 列数尺寸定义
|
|
1395
|
+
* {
|
|
1396
|
+
* 1: { xs: 24, sm: 24, md: 24, lg: 24, xl: 24, xxl: 24 },
|
|
1397
|
+
* 2: { xs: 24, sm: 12, md: 12, lg: 12, xl: 12, xxl: 12 },
|
|
1398
|
+
* 3: { xs: 24, sm: 12, md: 12, lg: 8, xl: 8, xxl: 8 },
|
|
1399
|
+
* 4: { xs: 24, sm: 12, md: 12, lg: 6, xl: 6, xxl: 6 },
|
|
1400
|
+
* };
|
|
1401
|
+
* ```
|
|
1402
|
+
*/
|
|
1403
|
+
column?: 1 | 2 | 3 | 4;
|
|
1404
|
+
/**
|
|
1405
|
+
* 强制定义一行显示几列,不考虑响应式
|
|
1406
|
+
* ```
|
|
1407
|
+
* 1. 优先级大于column
|
|
1408
|
+
* 2. 建议优先使用column配置
|
|
1409
|
+
* ```
|
|
1410
|
+
*/
|
|
1411
|
+
forceColumn?: 1 | 2 | 3 | 4;
|
|
1412
|
+
/**
|
|
1413
|
+
* Form显示宽度,可数值、可百分比;在小屏幕尺寸(xs、sm)上无效
|
|
1414
|
+
*/
|
|
1415
|
+
width?: number | string;
|
|
1416
|
+
/** 网格间距 */
|
|
1417
|
+
gridGutter?: BoxRowProps["gutter"];
|
|
1418
|
+
children: ReactNode;
|
|
1419
|
+
/**
|
|
1420
|
+
* 是否为纯净模式,对EasyForm的子节点不做任何包装处理
|
|
1421
|
+
*/
|
|
1422
|
+
isPure?: boolean;
|
|
1423
|
+
/**
|
|
1424
|
+
* true: 不使用Antd Form包裹,可在Form、EasyForm、FormWrapper内部使用
|
|
1425
|
+
*/
|
|
1426
|
+
nonuseFormWrapper?: boolean;
|
|
1427
|
+
};
|
|
1428
|
+
/**
|
|
1429
|
+
* 简单Form布局,可自定义网格布局
|
|
1430
|
+
* ```
|
|
1431
|
+
* 1. demo:https://fex.qa.tcshuke.com/docs/admin/main/form/grid
|
|
1432
|
+
* 2. EasyForm的children列表会进行网格化布局,可通过设置 isPure = true设置纯净模式(对EasyForm的子节点不做任何包装处理)
|
|
1433
|
+
* 3. EasyForm可嵌套使用,嵌套内部的<EasyForm />节点Form相关属性失效,例如属性form、initialValues等都失效
|
|
1434
|
+
* <EasyForm form={form}>
|
|
1435
|
+
* ....
|
|
1436
|
+
* <EasyForm>...</EasyForm>
|
|
1437
|
+
* ....
|
|
1438
|
+
* <EasyForm>...</EasyForm>
|
|
1439
|
+
* ....
|
|
1440
|
+
* </EasyForm>
|
|
1441
|
+
* 4. 布局网格以当前组件的宽度来计算的,不是屏幕宽度
|
|
1442
|
+
* 5. EasyForm 子节点包含 hidden = true 会被忽略
|
|
1443
|
+
* 6. 通过 column 可定义一行显示几列FormItem
|
|
1444
|
+
* 7. 通过 labelItemVertical 可定义 formitem 竖直布局
|
|
1445
|
+
* 8. 通过 formItemGap 可定义 formItem竖直方向间隙
|
|
1446
|
+
* 9. 通过 forceColumn 可强制定义一行显示几列,不考虑响应式
|
|
1447
|
+
* 10. 通过 labelWidth 可控制Form内部所有label的宽度(可实现整齐效果)
|
|
1448
|
+
* 11. 自定义栅格占位格数,见下方`例如`
|
|
1449
|
+
|
|
1450
|
+
* 例如
|
|
1451
|
+
* <EasyForm column={3}>
|
|
1452
|
+
* <FormItemWrapper name="field1" label="条件1">
|
|
1453
|
+
* <Input placeholder="请输入" allowClear={true} />
|
|
1454
|
+
* </FormItemWrapper>
|
|
1455
|
+
* <!-- !!自定义栅格占位格数第一种方式:可通过使用 BoxGrid.Col 包裹元素来自定义网格占比 -->
|
|
1456
|
+
* <BoxGrid.Col span={24}>
|
|
1457
|
+
* <FormItemWrapper name="field5" label="条件5">
|
|
1458
|
+
* <Input placeholder="请输入" allowClear={true} />
|
|
1459
|
+
* </FormItemWrapper>
|
|
1460
|
+
* </BoxGrid.Col>
|
|
1461
|
+
* <!-- !!自定义栅格占位格数第二种方式:如果为FormItemWrapper组件,可设置span属性 -->
|
|
1462
|
+
* <FormItemWrapper name="field6" label="条件6" span={24}>
|
|
1463
|
+
* <Input placeholder="请输入" allowClear={true} />
|
|
1464
|
+
* </FormItemWrapper>
|
|
1465
|
+
* <FormItemWrapper noStyle span={24}>
|
|
1466
|
+
* <Button>按钮</Buttone>
|
|
1467
|
+
* </FormItemWrapper>
|
|
1468
|
+
* </EasyForm>
|
|
1469
|
+
* ```
|
|
1470
|
+
*/
|
|
1471
|
+
export declare const EasyForm: (props: EasyFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
1472
|
+
export type EditableCardDataIndex = string | string[];
|
|
1473
|
+
export interface EditableCardOperation {
|
|
1474
|
+
index: number;
|
|
1475
|
+
add: (defaultValue: TPlainObject, insertIndex?: number) => void;
|
|
1476
|
+
remove: (index: number) => void;
|
|
1477
|
+
/** 同一级内移动 */
|
|
1478
|
+
move: (fromIndex: number, toIndex: number) => void;
|
|
1479
|
+
/** 是否可编辑 */
|
|
1480
|
+
editable: boolean;
|
|
1481
|
+
/**
|
|
1482
|
+
* 设置当前卡片指定字段值
|
|
1483
|
+
*/
|
|
1484
|
+
setCurrentRowField: (dataIndexConfigs: {
|
|
1485
|
+
name: EditableCardDataIndex;
|
|
1486
|
+
value?: TAny;
|
|
1487
|
+
}[]) => void;
|
|
1488
|
+
/** 获取当前卡片表单数据 */
|
|
1489
|
+
getCurrentRowData: () => TPlainObject;
|
|
1490
|
+
/**
|
|
1491
|
+
* 当前卡片表单 name
|
|
1492
|
+
* ```
|
|
1493
|
+
* 值为 field.name
|
|
1494
|
+
* ```
|
|
1495
|
+
*/
|
|
1496
|
+
rowFormItemName: string | number;
|
|
1497
|
+
/**
|
|
1498
|
+
* 当前卡片表单完整 name
|
|
1499
|
+
* ```
|
|
1500
|
+
* 例如:['dataList', 0]
|
|
1501
|
+
* ```
|
|
1502
|
+
*/
|
|
1503
|
+
rowFormItemCompleteName: Array<string | number>;
|
|
1504
|
+
/** 当前卡片表单验证,需要自行指定nameList(dataIndex数组) */
|
|
1505
|
+
validateRowFields: (nameList: EditableCardDataIndex[]) => Promise<void>;
|
|
1506
|
+
forceUpdate: () => void;
|
|
1507
|
+
}
|
|
1508
|
+
/** 卡片内字段配置 */
|
|
1509
|
+
export type EditableCardColumnItem = {
|
|
1510
|
+
/**
|
|
1511
|
+
* 字段key值
|
|
1512
|
+
* ```
|
|
1513
|
+
* 例如:
|
|
1514
|
+
* dataIndex: 'abc'
|
|
1515
|
+
* dataIndex: ['abc', 'xyz']
|
|
1516
|
+
* ```
|
|
1517
|
+
*/
|
|
1518
|
+
dataIndex: EditableCardDataIndex;
|
|
1519
|
+
/** 是否可编辑 */
|
|
1520
|
+
editable: boolean | ((record: TPlainObject, index: number) => boolean);
|
|
1521
|
+
/**
|
|
1522
|
+
* 布局占用网格数目(最大数值24)
|
|
1523
|
+
* ```
|
|
1524
|
+
* 1. 一行总共等分24份
|
|
1525
|
+
* ```
|
|
1526
|
+
*/
|
|
1527
|
+
gridNumber?: number;
|
|
1528
|
+
/** 标题 */
|
|
1529
|
+
title?: ReactElement | string;
|
|
1530
|
+
/**
|
|
1531
|
+
* Form.Item props
|
|
1532
|
+
*/
|
|
1533
|
+
formItemProps?: Omit<FormItemWrapperProps, "children" | "name"> | ((operation: EditableCardOperation) => Omit<FormItemWrapperProps, "children" | "name">);
|
|
1534
|
+
/**
|
|
1535
|
+
* 通过 operation.editable 来判断渲染结构,其中render返回的根节点会作为 Form.Item 的children
|
|
1536
|
+
* ```
|
|
1537
|
+
* 例如
|
|
1538
|
+
* render: (operation) => {
|
|
1539
|
+
* if (operation.editable) {
|
|
1540
|
+
* return <Input placeholder="请输入" />;
|
|
1541
|
+
* }
|
|
1542
|
+
* return <Tag>{value}</Tag>;
|
|
1543
|
+
* }
|
|
1544
|
+
*
|
|
1545
|
+
* 如果需要额外布局,可通过 formItemProps.wrapper 实现
|
|
1546
|
+
* formItemProps: (operation) => {
|
|
1547
|
+
* return {
|
|
1548
|
+
* wrapper: (children) => {
|
|
1549
|
+
* return (
|
|
1550
|
+
* <FlexLayout fullIndex={[0]} direction="horizontal" gap={10}>
|
|
1551
|
+
* <div>{children}</div>
|
|
1552
|
+
* <div>额外布局</div>
|
|
1553
|
+
* </FlexLayout>
|
|
1554
|
+
* );
|
|
1555
|
+
* },
|
|
1556
|
+
* };
|
|
1557
|
+
* },
|
|
1558
|
+
* render: (operation) => {
|
|
1559
|
+
* if (operation.editable) {
|
|
1560
|
+
* return <Input placeholder="请输入" />;
|
|
1561
|
+
* }
|
|
1562
|
+
* return <Tag>{value}</Tag>;
|
|
1563
|
+
* }
|
|
1564
|
+
* ```
|
|
1565
|
+
*/
|
|
1566
|
+
render?: (operation: EditableCardOperation) => ReactElement;
|
|
1567
|
+
/**
|
|
1568
|
+
* 会在 title 之后展示一个 icon
|
|
1569
|
+
*/
|
|
1570
|
+
tips?: string;
|
|
1571
|
+
/** 为表格header中的字段添加必填标识,如果未配置 formItemProps.rules,内部会新增一条required rule */
|
|
1572
|
+
required?: boolean;
|
|
1573
|
+
/**
|
|
1574
|
+
* 隐藏域设置
|
|
1575
|
+
* ```
|
|
1576
|
+
* 如果是动态隐藏,并且在逻辑切换后无效果,可尝试执行 render.operation.forceUpdate()
|
|
1577
|
+
* ```
|
|
1578
|
+
*/
|
|
1579
|
+
hidden?: (record: TPlainObject, index: number) => boolean;
|
|
1580
|
+
};
|
|
1581
|
+
export type EditableCardProps = {
|
|
1582
|
+
className?: string;
|
|
1583
|
+
style?: React.CSSProperties;
|
|
1584
|
+
/** 卡片内字段配置 */
|
|
1585
|
+
columns: EditableCardColumnItem[];
|
|
1586
|
+
/**
|
|
1587
|
+
* 当前Edittable处在formList内部时(必填),完整formItem的name
|
|
1588
|
+
* ```
|
|
1589
|
+
* 例如 处在formList内部
|
|
1590
|
+
* 1. formListName=[0,dataList]
|
|
1591
|
+
* 2. formListCompleteName=[xxxList, 0, dataList]
|
|
1592
|
+
* ```
|
|
1593
|
+
*/
|
|
1594
|
+
formListCompleteName?: Array<string | number>;
|
|
1595
|
+
/** Form.List name */
|
|
1596
|
+
formListName: Array<string | number> | string;
|
|
1597
|
+
/**
|
|
1598
|
+
* Form.List rules
|
|
1599
|
+
* ```
|
|
1600
|
+
rules={[
|
|
1601
|
+
{
|
|
1602
|
+
validator: async (_, names) => {
|
|
1603
|
+
if (!names || names.length < 2) {
|
|
1604
|
+
return Promise.reject(new Error('At least 2 passengers'));
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
1607
|
+
},
|
|
1608
|
+
]}
|
|
1609
|
+
* ```
|
|
1610
|
+
*/
|
|
1611
|
+
rules?: FormListProps["rules"];
|
|
1612
|
+
/**`默认新增按钮`新增行默认值,hiddenFooterBtn != true 有效 */
|
|
1613
|
+
addRowDefaultValues?: () => TPlainObject;
|
|
1614
|
+
/** 隐藏底部`新增`按钮 */
|
|
1615
|
+
hiddenFooterBtn?: boolean;
|
|
1616
|
+
/** 顶部区域渲染 */
|
|
1617
|
+
contentBeforeRender?: (formListOperation: FormListOperation, nextRowIndex: number) => ReactElement | null;
|
|
1618
|
+
/** 底部区域渲染 */
|
|
1619
|
+
contentAfterRender?: (formListOperation: FormListOperation, nextRowIndex: number) => ReactElement | null;
|
|
1620
|
+
/** 设置默认卡片名称,设置 onCustomWrapper 后失效 */
|
|
1621
|
+
onCustomGroupName?: (index: number) => string | ReactElement;
|
|
1622
|
+
/** 自定义卡片包裹,同时可自定义删除按钮、新增按钮 */
|
|
1623
|
+
onCustomWrapper?: (children: ReactElement, extraData: {
|
|
1624
|
+
operation: FormListOperation;
|
|
1625
|
+
fields: FormListFieldData[];
|
|
1626
|
+
fieldItem: FormListFieldData;
|
|
1627
|
+
index: number;
|
|
1628
|
+
required?: boolean;
|
|
1629
|
+
key: string;
|
|
1630
|
+
}) => ReactElement;
|
|
1631
|
+
/** 设置必填,但只有一条数据时,隐藏默认删除按钮 */
|
|
1632
|
+
required?: boolean;
|
|
1633
|
+
/** 默认卡片样式 */
|
|
1634
|
+
cardClassName?: string;
|
|
1635
|
+
/** 默认卡片样式 */
|
|
1636
|
+
cardStyle?: CSSProperties;
|
|
1637
|
+
/**
|
|
1638
|
+
* 每个卡片内容都使用了 EasyForm 包裹,此处可设置 EasyFormProps
|
|
1639
|
+
* ```
|
|
1640
|
+
* 可使用 EasyForm 中 FormItem布局
|
|
1641
|
+
* ```
|
|
1642
|
+
*/
|
|
1643
|
+
cardEasyFormProps?: Omit<EasyFormProps, "nonuseFormWrapper" | "isPure" | "children">;
|
|
1644
|
+
/**
|
|
1645
|
+
* 默认卡片右侧布局,设置 onCustomWrapper 后失效
|
|
1646
|
+
* ```
|
|
1647
|
+
* 1. 通过before 、after自定义删除按钮左右布局
|
|
1648
|
+
* cardExtraRender={(extraData)=>{
|
|
1649
|
+
* return {
|
|
1650
|
+
* before: [<div>1</div>, <div>2</div>],
|
|
1651
|
+
* after: [<div>3</div>, <div>4</div>],
|
|
1652
|
+
* }
|
|
1653
|
+
* }}
|
|
1654
|
+
* 2. 返回ReactElement,可自定义右侧布局
|
|
1655
|
+
* cardExtraRender={(extraData)=>{
|
|
1656
|
+
* return <div>111</div>
|
|
1657
|
+
* }}
|
|
1658
|
+
* ```
|
|
1659
|
+
*/
|
|
1660
|
+
cardExtraRender?: (extraData: {
|
|
1661
|
+
operation: FormListOperation;
|
|
1662
|
+
fields: FormListFieldData[];
|
|
1663
|
+
fieldItem: FormListFieldData;
|
|
1664
|
+
index: number;
|
|
1665
|
+
required?: boolean;
|
|
1666
|
+
key: string;
|
|
1667
|
+
}) => {
|
|
1668
|
+
before?: ReactElement[];
|
|
1669
|
+
after?: ReactElement[];
|
|
1670
|
+
} | ReactElement;
|
|
1671
|
+
};
|
|
1672
|
+
export type DragEditableCardProps = Omit<EditableCardProps, "onCustomWrapper"> & {
|
|
1673
|
+
/**
|
|
1674
|
+
* 拖拽图标自定义,默认使用 DragOutlined 图标
|
|
1675
|
+
*/
|
|
1676
|
+
dragIcon?: ReactElement;
|
|
1677
|
+
/** 禁用拖拽 */
|
|
1678
|
+
disabledDrag?: boolean;
|
|
1679
|
+
/**
|
|
1680
|
+
* 表格数据唯一值字段Key
|
|
1681
|
+
* ```
|
|
1682
|
+
* ```
|
|
1683
|
+
*/
|
|
1684
|
+
uidFieldKey: string;
|
|
1685
|
+
/**
|
|
1686
|
+
* 拖拽结束事件
|
|
1687
|
+
* ```
|
|
1688
|
+
* dataSource: 拖拽完成后的数据源
|
|
1689
|
+
* dragData
|
|
1690
|
+
* 1. activeId 拖拽ID
|
|
1691
|
+
* 2. activeIndex 拖拽起始表格数组索引值
|
|
1692
|
+
* 3. overIndex 拖拽结束表格数组索引值
|
|
1693
|
+
* ```
|
|
1694
|
+
*/
|
|
1695
|
+
onDragChange?: (dataSource: TPlainObject[], dragData: {
|
|
1696
|
+
activeId: string | number;
|
|
1697
|
+
overId?: string | number;
|
|
1698
|
+
activeIndex: number;
|
|
1699
|
+
overIndex: number;
|
|
1700
|
+
}) => void;
|
|
1701
|
+
/**
|
|
1702
|
+
* 拖拽触发位置,默认在左侧
|
|
1703
|
+
*/
|
|
1704
|
+
dragTriggerPosition?: "left" | "right";
|
|
1705
|
+
};
|
|
1706
|
+
/**
|
|
1707
|
+
* 可拖拽编辑卡片
|
|
1708
|
+
* ```
|
|
1709
|
+
* 1. 卡片数组必须有唯一值字段,通过参数 uidFieldKey 告诉组件
|
|
1710
|
+
* ```
|
|
1711
|
+
*/
|
|
1712
|
+
export declare const DragEditableCard: (props: DragEditableCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
1371
1713
|
export type TipsWrapperProps = {
|
|
1372
1714
|
gap?: number;
|
|
1373
1715
|
className?: string;
|
|
@@ -2313,102 +2655,6 @@ export declare const dynamicNode: {
|
|
|
2313
2655
|
};
|
|
2314
2656
|
remove: (elementId?: string) => void;
|
|
2315
2657
|
};
|
|
2316
|
-
export type FormWrapperProps<Values = any> = TFormLayoutPreClassNameProps & FormProps<Values> & {
|
|
2317
|
-
children: ReactNode;
|
|
2318
|
-
};
|
|
2319
|
-
/**
|
|
2320
|
-
* Form 包装组件,添加对formItem的布局控制
|
|
2321
|
-
* ```
|
|
2322
|
-
* 1. 内置布局样式使用 preDefinedClassName.form
|
|
2323
|
-
* ```
|
|
2324
|
-
*/
|
|
2325
|
-
export declare const FormWrapper: (props: FormWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
2326
|
-
export type EasyFormProps = Omit<FormWrapperProps, "children"> & {
|
|
2327
|
-
/**
|
|
2328
|
-
* 定义一行显示几列(当外层宽度尺寸大于 992px(lg) 时,一行显示几列), 默认值:3
|
|
2329
|
-
* ```
|
|
2330
|
-
* 1. 当外层宽度尺寸小于992px(lg),为xs、sm、md情况下不受column值影响(column=1除外)
|
|
2331
|
-
* 2. 宽度尺寸定义
|
|
2332
|
-
* xs: 宽度 < 576px
|
|
2333
|
-
* sm: 宽度 ≥ 576px
|
|
2334
|
-
* md: 宽度 ≥ 768px
|
|
2335
|
-
* lg: 宽度 ≥ 992px
|
|
2336
|
-
* xl: 宽度 ≥ 1200px
|
|
2337
|
-
* xxl: 宽度 ≥ 1600px
|
|
2338
|
-
* 3. 列数尺寸定义
|
|
2339
|
-
* {
|
|
2340
|
-
* 1: { xs: 24, sm: 24, md: 24, lg: 24, xl: 24, xxl: 24 },
|
|
2341
|
-
* 2: { xs: 24, sm: 12, md: 12, lg: 12, xl: 12, xxl: 12 },
|
|
2342
|
-
* 3: { xs: 24, sm: 12, md: 12, lg: 8, xl: 8, xxl: 8 },
|
|
2343
|
-
* 4: { xs: 24, sm: 12, md: 12, lg: 6, xl: 6, xxl: 6 },
|
|
2344
|
-
* };
|
|
2345
|
-
* ```
|
|
2346
|
-
*/
|
|
2347
|
-
column?: 1 | 2 | 3 | 4;
|
|
2348
|
-
/**
|
|
2349
|
-
* 强制定义一行显示几列,不考虑响应式
|
|
2350
|
-
* ```
|
|
2351
|
-
* 1. 优先级大于column
|
|
2352
|
-
* 2. 建议优先使用column配置
|
|
2353
|
-
* ```
|
|
2354
|
-
*/
|
|
2355
|
-
forceColumn?: 1 | 2 | 3 | 4;
|
|
2356
|
-
/**
|
|
2357
|
-
* Form显示宽度,可数值、可百分比;在小屏幕尺寸(xs、sm)上无效
|
|
2358
|
-
*/
|
|
2359
|
-
width?: number | string;
|
|
2360
|
-
/** 网格间距 */
|
|
2361
|
-
gridGutter?: BoxRowProps["gutter"];
|
|
2362
|
-
children: ReactNode;
|
|
2363
|
-
/**
|
|
2364
|
-
* 是否为纯净模式,对EasyForm的子节点不做任何包装处理
|
|
2365
|
-
*/
|
|
2366
|
-
isPure?: boolean;
|
|
2367
|
-
};
|
|
2368
|
-
/**
|
|
2369
|
-
* 简单Form布局,可自定义网格布局
|
|
2370
|
-
* ```
|
|
2371
|
-
* 1. demo:https://fex.qa.tcshuke.com/docs/admin/main/form/grid
|
|
2372
|
-
* 2. EasyForm的children列表会进行网格化布局,可通过设置 isPure = true设置纯净模式(对EasyForm的子节点不做任何包装处理)
|
|
2373
|
-
* 3. EasyForm可嵌套使用,嵌套内部的<EasyForm />节点Form相关属性失效,例如属性form、initialValues等都失效
|
|
2374
|
-
* <EasyForm form={form}>
|
|
2375
|
-
* ....
|
|
2376
|
-
* <EasyForm>...</EasyForm>
|
|
2377
|
-
* ....
|
|
2378
|
-
* <EasyForm>...</EasyForm>
|
|
2379
|
-
* ....
|
|
2380
|
-
* </EasyForm>
|
|
2381
|
-
* 4. 布局网格以当前组件的宽度来计算的,不是屏幕宽度
|
|
2382
|
-
* 5. EasyForm 子节点包含 hidden = true 会被忽略
|
|
2383
|
-
* 6. 通过 column 可定义一行显示几列FormItem
|
|
2384
|
-
* 7. 通过 labelItemVertical 可定义 formitem 竖直布局
|
|
2385
|
-
* 8. 通过 formItemGap 可定义 formItem竖直方向间隙
|
|
2386
|
-
* 9. 通过 forceColumn 可强制定义一行显示几列,不考虑响应式
|
|
2387
|
-
* 10. 通过 labelWidth 可控制Form内部所有label的宽度(可实现整齐效果)
|
|
2388
|
-
* 11. 自定义栅格占位格数,见下方`例如`
|
|
2389
|
-
|
|
2390
|
-
* 例如
|
|
2391
|
-
* <EasyForm column={3}>
|
|
2392
|
-
* <FormItemWrapper name="field1" label="条件1">
|
|
2393
|
-
* <Input placeholder="请输入" allowClear={true} />
|
|
2394
|
-
* </FormItemWrapper>
|
|
2395
|
-
* <!-- !!自定义栅格占位格数第一种方式:可通过使用 BoxGrid.Col 包裹元素来自定义网格占比 -->
|
|
2396
|
-
* <BoxGrid.Col span={24}>
|
|
2397
|
-
* <FormItemWrapper name="field5" label="条件5">
|
|
2398
|
-
* <Input placeholder="请输入" allowClear={true} />
|
|
2399
|
-
* </FormItemWrapper>
|
|
2400
|
-
* </BoxGrid.Col>
|
|
2401
|
-
* <!-- !!自定义栅格占位格数第二种方式:如果为FormItemWrapper组件,可设置span属性 -->
|
|
2402
|
-
* <FormItemWrapper name="field6" label="条件6" span={24}>
|
|
2403
|
-
* <Input placeholder="请输入" allowClear={true} />
|
|
2404
|
-
* </FormItemWrapper>
|
|
2405
|
-
* <FormItemWrapper noStyle span={24}>
|
|
2406
|
-
* <Button>按钮</Buttone>
|
|
2407
|
-
* </FormItemWrapper>
|
|
2408
|
-
* </EasyForm>
|
|
2409
|
-
* ```
|
|
2410
|
-
*/
|
|
2411
|
-
export declare const EasyForm: (props: EasyFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
2412
2658
|
export type TEasyTableTableColumn<T> = ColumnsType<T>[0] & {
|
|
2413
2659
|
/**
|
|
2414
2660
|
* @description 请使用 tipsWrapperProps 属性配置
|
|
@@ -2846,6 +3092,20 @@ export declare const EasyTable: import("react").ForwardRefExoticComponent<EasyTa
|
|
|
2846
3092
|
/** 设置启用初始化请求 */
|
|
2847
3093
|
setEnabledInitRequest: (cacheKey: string) => void;
|
|
2848
3094
|
};
|
|
3095
|
+
/**
|
|
3096
|
+
* 使用FormList实现可编辑卡片
|
|
3097
|
+
* ```
|
|
3098
|
+
* 1. EditableCard有两种模式,正常 & 禁用
|
|
3099
|
+
* 2. 必须在外部包裹Form组件
|
|
3100
|
+
* 3. 行内需要联动逻辑可使用 column.render.operation.setCurrentRowField 方法
|
|
3101
|
+
* 4. 可使用DragEditableCard组件实现拖拽排序
|
|
3102
|
+
* 5. 设置EditableCard disabled后,通过 LabelValueRender 组件展示数据,可通过 disabledRenderProps 配置布局
|
|
3103
|
+
*
|
|
3104
|
+
* demo
|
|
3105
|
+
* https://fex.qa.tcshuke.com/docs/admin/main/form/grid
|
|
3106
|
+
* ```
|
|
3107
|
+
*/
|
|
3108
|
+
export declare const EditableCard: (props: EditableCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
2849
3109
|
export interface EditableFieldProps {
|
|
2850
3110
|
className?: string;
|
|
2851
3111
|
style?: CSSProperties;
|
|
@@ -3699,6 +3959,10 @@ export type TLabelValueItem = {
|
|
|
3699
3959
|
tips?: string;
|
|
3700
3960
|
/** value 点击事件 */
|
|
3701
3961
|
onClick?: (e: any) => void;
|
|
3962
|
+
/** 关闭tooltip功能 */
|
|
3963
|
+
hideTip?: boolean;
|
|
3964
|
+
/** value 渲染不使用 TextOverflow 包裹 */
|
|
3965
|
+
valueNoWrapper?: boolean;
|
|
3702
3966
|
};
|
|
3703
3967
|
export type LabelValueRenderProps = {
|
|
3704
3968
|
className?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/antd",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.26",
|
|
4
4
|
"description": "flat-biz ui components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@dimjs/model": ">=1.2.3",
|
|
32
32
|
"@dimjs/model-react": ">=1.2.3",
|
|
33
33
|
"@dimjs/utils": ">=1.5.1",
|
|
34
|
-
"@flatbiz/utils": ">=4.0.
|
|
34
|
+
"@flatbiz/utils": ">=4.0.22",
|
|
35
35
|
"@wove/react": ">=1.2.23",
|
|
36
36
|
"antd": ">=5.11.0",
|
|
37
37
|
"dayjs": ">=1.11.9",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@dimjs/model": "^1.2.3",
|
|
46
46
|
"@dimjs/model-react": "^1.2.3",
|
|
47
47
|
"@dimjs/utils": "^1.5.1",
|
|
48
|
-
"@flatbiz/utils": "^4.0.
|
|
48
|
+
"@flatbiz/utils": "^4.0.22",
|
|
49
49
|
"@wove/react": "^1.2.23",
|
|
50
50
|
"antd": "5.11.0",
|
|
51
51
|
"dayjs": "1.11.9",
|