@flatbiz/antd 4.0.13 → 4.0.15

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
@@ -30,7 +30,7 @@ export interface ButtonOperateItem extends ButtonProps {
30
30
  }
31
31
  export interface ButtonOperateProps {
32
32
  /**
33
- * 如果数组中使用ReactElement类型
33
+ * 如果数组中元素为ReactElement类型
34
34
  * 1. 一般为antd Button组件,如果组件存在属性hidden=true,则会隐藏
35
35
  * 2. 可配置 v-permission 权限值,例如 v-permission="add"
36
36
  * 3. 任何confirm、disabled等状态在外部控制
@@ -484,6 +484,113 @@ export interface DropdownMenuWrapperProps extends Omit<DropdownProps, "menu"> {
484
484
  menuList: Array<DropdownMenuItem | null>;
485
485
  }
486
486
  export declare const DropdownMenuWrapper: (props: DropdownMenuWrapperProps) => JSX.Element;
487
+ export type EasyTableServiceConfig = {
488
+ onRequest: (params?: TPlainObject) => Promise<TPlainObject>;
489
+ };
490
+ export type EasyTableRefApi = {
491
+ onRequest: (params?: TPlainObject) => void;
492
+ };
493
+ export type EasyTableProps = {
494
+ children: ReactElement | ReactElement[];
495
+ modelKey: string;
496
+ serviceConfig: EasyTableServiceConfig;
497
+ initialValues?: TPlainObject;
498
+ fieldNames?: {
499
+ list?: string;
500
+ total?: string;
501
+ pageNo?: string;
502
+ pageSize?: string;
503
+ };
504
+ /** 初始化是否请求,默认值:true */
505
+ initRequest?: boolean;
506
+ };
507
+ export declare const EasyTable: import("react").ForwardRefExoticComponent<EasyTableProps & import("react").RefAttributes<EasyTableRefApi>>;
508
+ export type FormColProps = {
509
+ /** 屏幕 < 576px */
510
+ xs?: number;
511
+ /** 屏幕 ≥ 576px */
512
+ sm?: number;
513
+ /** 屏幕 ≥ 768px */
514
+ md?: number;
515
+ /** 屏幕 ≥ 992px */
516
+ lg?: number;
517
+ /** 屏幕 ≥ 1200px */
518
+ xl?: number;
519
+ /** 屏幕 ≥ 1600px */
520
+ xxl?: number;
521
+ /** 强制单独一行 */
522
+ forceAloneRow?: boolean;
523
+ children?: ReactNode | ReactNode[];
524
+ };
525
+ /**
526
+ * 网格响应式布局,默认值:{ xs: 24, sm: 12, md: 12, lg: 8, xl: 8, xxl: 6 }
527
+ *```
528
+ * grid
529
+ * xs: 屏幕 < 576px
530
+ * sm: 屏幕 ≥ 576px
531
+ * md: 屏幕 ≥ 768px
532
+ * lg: 屏幕 ≥ 992px
533
+ * xl: 屏幕 ≥ 1200px
534
+ * xxl: 屏幕 ≥ 1600px
535
+ * ```
536
+ *
537
+ * @returns
538
+ */
539
+ export declare const FormCol: {
540
+ (props: FormColProps): JSX.Element;
541
+ domTypeName: string;
542
+ };
543
+ export type FormOperateColProps = {
544
+ className?: string;
545
+ leftList?: ReactElement[];
546
+ rightList?: ReactElement[];
547
+ justify?: RowProps["justify"];
548
+ /** 强制单独一行 */
549
+ forceAloneRow?: boolean;
550
+ };
551
+ /**
552
+ * FormOperateCol 布局说明
553
+ * ```
554
+ * 1. 网格数以及位置为动态计算,不支持 xs、sm、md等
555
+ * 2. 如果FormRow只有一行col,则OperateCol会在当前行剩余网格内居左对齐
556
+ * 3. 如果同时设置 leftList、rightList,则此cell会强制独占一行,并左右布局
557
+ * 4. 如果只设置 leftList、rightList其中一个,则会在最后一行剩余网格内居右对齐
558
+ * ```
559
+ */
560
+ export declare const FormOperateCol: {
561
+ (props: FormOperateColProps): JSX.Element;
562
+ domTypeName: string;
563
+ };
564
+ export type FormRowProps = RowProps & {
565
+ children?: ReactNode | ReactNode[];
566
+ };
567
+ /**
568
+ * FormItem网格响应式布局
569
+ *```
570
+ * 1. 应用场景:Form条件布局
571
+ * 2. 子元素只能是 FormCol、FormOperateCol,其他会被忽略
572
+ * 3. 所有子元素中只能存在一个 FormOperateCol
573
+ */
574
+ export declare const FormRow: (props: FormRowProps) => JSX.Element;
575
+ export type EasyTableFilterProps = {
576
+ children: ReactElement | ReactElement[] | ((form: FormInstance) => ReactElement);
577
+ /** isPure = true时无效 */
578
+ filterOperate?: (form: FormInstance) => FormOperateColProps;
579
+ /** 是否为纯净模式(Form布局是否组定义), */
580
+ isPure?: boolean;
581
+ queryButtonProps?: Omit<ButtonProps, "onClick"> & {
582
+ text?: string;
583
+ };
584
+ resetButtonProps?: Omit<ButtonProps, "onClick"> & {
585
+ text?: string;
586
+ };
587
+ };
588
+ export declare const EasyTableFilter: (props: EasyTableFilterProps) => JSX.Element;
589
+ export type EasyTableTableProps = Omit<TableProps<TPlainObject>, "dataSource" | "loading" | "pagination" | "onChange"> & {
590
+ children?: ReactElement;
591
+ pagination?: false;
592
+ };
593
+ export declare const EasyTableTable: (props: EasyTableTableProps) => JSX.Element;
487
594
  export type SelectorWrapperValue = string | number | Array<string | number> | TPlainObject<string | number> | Array<TPlainObject<string | number>>;
488
595
  export type SelectorServiceConfig = {
489
596
  params?: TPlainObject;
@@ -847,73 +954,6 @@ export type FlexLayoutProps = {
847
954
  * @returns
848
955
  */
849
956
  export declare const FlexLayout: (props: FlexLayoutProps) => JSX.Element;
850
- export type FormColProps = {
851
- /** 屏幕 < 576px */
852
- xs?: number;
853
- /** 屏幕 ≥ 576px */
854
- sm?: number;
855
- /** 屏幕 ≥ 768px */
856
- md?: number;
857
- /** 屏幕 ≥ 992px */
858
- lg?: number;
859
- /** 屏幕 ≥ 1200px */
860
- xl?: number;
861
- /** 屏幕 ≥ 1600px */
862
- xxl?: number;
863
- /** 强制单独一行 */
864
- forceAloneRow?: boolean;
865
- children?: ReactNode | ReactNode[];
866
- };
867
- /**
868
- * 网格响应式布局,默认值:{ xs: 24, sm: 12, md: 12, lg: 8, xl: 8, xxl: 6 }
869
- *```
870
- * grid
871
- * xs: 屏幕 < 576px
872
- * sm: 屏幕 ≥ 576px
873
- * md: 屏幕 ≥ 768px
874
- * lg: 屏幕 ≥ 992px
875
- * xl: 屏幕 ≥ 1200px
876
- * xxl: 屏幕 ≥ 1600px
877
- * ```
878
- *
879
- * @returns
880
- */
881
- export declare const FormCol: {
882
- (props: FormColProps): JSX.Element;
883
- domTypeName: string;
884
- };
885
- export type FormOperateColProps = {
886
- className?: string;
887
- leftList?: ReactElement[];
888
- rightList?: ReactElement[];
889
- justify?: RowProps["justify"];
890
- /** 强制单独一行 */
891
- forceAloneRow?: boolean;
892
- };
893
- /**
894
- * FormOperateCol 布局说明
895
- * ```
896
- * 1. 网格数以及位置为动态计算,不支持 xs、sm、md等
897
- * 2. 如果FormRow只有一行col,则OperateCol会在当前行剩余网格内居左对齐
898
- * 3. 如果同时设置 leftList、rightList,则此cell会强制独占一行,并左右布局
899
- * 4. 如果只设置 leftList、rightList其中一个,则会在最后一行剩余网格内居右对齐
900
- * ```
901
- */
902
- export declare const FormOperateCol: {
903
- (props: FormOperateColProps): JSX.Element;
904
- domTypeName: string;
905
- };
906
- export type FormRowProps = RowProps & {
907
- children?: ReactNode | ReactNode[];
908
- };
909
- /**
910
- * FormItem网格响应式布局
911
- *```
912
- * 1. 应用场景:Form条件布局
913
- * 2. 子元素只能是 FormCol、FormOperateCol,其他会被忽略
914
- * 3. 所有子元素中只能存在一个 FormOperateCol
915
- */
916
- export declare const FormRow: (props: FormRowProps) => JSX.Element;
917
957
  export type FormItemHorizontalUnionProps = {
918
958
  className?: string;
919
959
  style?: CSSProperties;
@@ -1482,7 +1522,7 @@ export type TableTitleTooltipProps = {
1482
1522
  title: string;
1483
1523
  tooltip: string | {
1484
1524
  icon: ReactElement;
1485
- content: string;
1525
+ content?: string;
1486
1526
  };
1487
1527
  gap?: number;
1488
1528
  className?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.0.13",
3
+ "version": "4.0.15",
4
4
  "description": "flat-biz oss ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",