@flatbiz/antd 4.0.16 → 4.0.17

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/index.d.ts CHANGED
@@ -506,8 +506,17 @@ export type EasyTableProps = {
506
506
  /** 初始化是否请求,默认值:true */
507
507
  initRequest?: boolean;
508
508
  };
509
+ /**
510
+ * 对 查询条件+表格数据 进行深度封装,内置数据交互处理
511
+ * ```
512
+ * 1. 需要获取查询条件、主动发起请求等可通过ref操作
513
+ * 2. 可通过属性 initRequest 设置初始化是否请求数据
514
+ * 3. 可通过属性 fieldNames 来设置自定义变量,默认值为:list、total、pageNo、pageSize
515
+ * ```
516
+ */
509
517
  export declare const EasyTable: import("react").ForwardRefExoticComponent<EasyTableProps & import("react").RefAttributes<EasyTableRefApi>>;
510
518
  export type FormColProps = {
519
+ span?: number;
511
520
  /** 屏幕 < 576px */
512
521
  xs?: number;
513
522
  /** 屏幕 ≥ 576px */
@@ -527,7 +536,8 @@ export type FormColProps = {
527
536
  /**
528
537
  * 网格响应式布局,默认值:{ xs: 24, sm: 12, md: 12, lg: 8, xl: 8, xxl: 6 }
529
538
  *```
530
- * grid
539
+ * 1. 设置 span 栅格占位格数,不考虑响应式
540
+ * 2. grid 自定义响应式网格布局
531
541
  * xs: 屏幕 < 576px
532
542
  * sm: 屏幕 ≥ 576px
533
543
  * md: 屏幕 ≥ 768px
@@ -535,8 +545,6 @@ export type FormColProps = {
535
545
  * xl: 屏幕 ≥ 1200px
536
546
  * xxl: 屏幕 ≥ 1600px
537
547
  * ```
538
- *
539
- * @returns
540
548
  */
541
549
  export declare const FormCol: {
542
550
  (props: FormColProps): JSX.Element;
@@ -587,11 +595,48 @@ export type EasyTableFilterProps = {
587
595
  text?: string;
588
596
  };
589
597
  };
598
+ /**
599
+ * 过滤条件
600
+ * @param props
601
+ * @returns
602
+ *
603
+ *```
604
+ *1. 用法1
605
+ * -- 默认网格布局 规则:{ xs: 24, sm: 12, md: 12, lg: 8, xl: 8, xxl: 6 }
606
+ * <EasyTableFilter>
607
+ * <Form.Item name="field1" label="条件1">xxx</Form.Item>
608
+ * </EasyTableFilter>
609
+ *
610
+ * -- 自定义网格布局 使用 FormCol组件包装 Form.Item
611
+ * <EasyTableFilter>
612
+ * <FormCol span={12}><Form.Item name="field1" label="条件1">xxx</Form.Item></FormCol>
613
+ * </EasyTableFilter>
614
+ *
615
+ * -- children 可为 function
616
+ * <EasyTableFilter>
617
+ * {(form) => {
618
+ * return <Form.Item name="field1" label="条件1">xxx</Form.Item>
619
+ * }}
620
+ * </EasyTableFilter>
621
+ *2. 用户2(自定义布局)
622
+ * EasyTableFilter设置 isPure = true,FormItem无布局规则
623
+ *3. EasyTableFilter中内置了 Form 标签,当children为函数时,可获取form实例
624
+ *4. 默认布局下,可通过设置 filterOperate 设置操作按钮
625
+ *```
626
+ */
590
627
  export declare const EasyTableFilter: (props: EasyTableFilterProps) => JSX.Element;
591
- export type EasyTableTableProps = Omit<TableProps<TAny>, "dataSource" | "loading" | "pagination"> & {
628
+ export type EasyTableTableProps = Omit<TableProps<TAny>, "dataSource" | "loading" | "rowKey"> & {
592
629
  children?: ReactElement;
593
- pagination?: false;
630
+ /** 表格行 key 的取值,可以是字符串或一个函数 */
631
+ rowKey: string | ((record: TPlainObject, index?: number) => React.Key);
594
632
  };
633
+ /**
634
+ * 表格渲染
635
+ * @param props
636
+ * ```
637
+ * 1. 继承了 TableProps 可设置antd table功能
638
+ * ```
639
+ */
595
640
  export declare const EasyTableTable: (props: EasyTableTableProps) => JSX.Element;
596
641
  export type SelectorWrapperValue = string | number | Array<string | number> | TPlainObject<string | number> | Array<TPlainObject<string | number>>;
597
642
  export type SelectorServiceConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.0.16",
3
+ "version": "4.0.17",
4
4
  "description": "flat-biz oss ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",