@flatbiz/antd 4.1.5 → 4.1.7
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/index.css +1 -0
- package/esm/index.js +5 -0
- package/esm/index.js.map +1 -0
- package/index.d.ts +29 -10
- package/index.js +1 -4
- package/package.json +7 -7
- package/cjs/index.css +0 -963
- package/cjs/index.js +0 -5
- package/cjs/index.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -300,8 +300,8 @@ export type DialogModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContai
|
|
|
300
300
|
configProviderProps?: ConfigProviderWrapperProps;
|
|
301
301
|
okHidden?: boolean;
|
|
302
302
|
cancelHidden?: boolean;
|
|
303
|
-
okButtonProps?: Omit<
|
|
304
|
-
cancelButtonProps?: Omit<
|
|
303
|
+
okButtonProps?: Omit<ButtonWrapperProps, "hidden" | "children" | "onClick">;
|
|
304
|
+
cancelButtonProps?: Omit<ButtonWrapperProps, "hidden" | "children" | "onClick">;
|
|
305
305
|
};
|
|
306
306
|
/**
|
|
307
307
|
* 函数式调用弹框;初始化后,内容无法更新
|
|
@@ -367,8 +367,8 @@ export type DialogDrawerProps = Omit<DrawerProps, "onOk" | "onCancel" | "getCont
|
|
|
367
367
|
onClose: TNoopDefine;
|
|
368
368
|
}) => ReactElement);
|
|
369
369
|
configProviderProps?: ConfigProviderWrapperProps;
|
|
370
|
-
okButtonExtraProps?: Omit<
|
|
371
|
-
cancelButtonExtraProps?: Omit<
|
|
370
|
+
okButtonExtraProps?: Omit<ButtonWrapperProps, "onClick" | "children" | "loading">;
|
|
371
|
+
cancelButtonExtraProps?: Omit<ButtonWrapperProps, "onClick" | "children">;
|
|
372
372
|
operatePosition?: "header" | "footer";
|
|
373
373
|
operateRender?: (form: FormInstance) => ReactElement;
|
|
374
374
|
okHidden?: boolean;
|
|
@@ -518,37 +518,52 @@ export interface DropdownMenuWrapperProps extends Omit<DropdownProps, "menu"> {
|
|
|
518
518
|
}
|
|
519
519
|
export declare const DropdownMenuWrapper: (props: DropdownMenuWrapperProps) => JSX.Element;
|
|
520
520
|
export type EasyTableServiceConfig = {
|
|
521
|
+
/** 接口配置 */
|
|
521
522
|
onRequest: (params?: TPlainObject) => Promise<TPlainObject | TPlainObject[]>;
|
|
523
|
+
/** 请求参数处理 */
|
|
522
524
|
requestParamsAdapter?: (params: TPlainObject) => TPlainObject;
|
|
523
525
|
/**
|
|
524
526
|
* 接口相应数据处理
|
|
525
527
|
* @param params
|
|
526
528
|
* ```
|
|
527
529
|
* 返回数据为对象,包含两个字段
|
|
528
|
-
* 1.
|
|
529
|
-
* 2.
|
|
530
|
+
* 1. 表格列表数据 - Array
|
|
531
|
+
* 2. 表格条数总数 - Number
|
|
530
532
|
* 其中 字段key 命名会通过 fieldNames 进行转义
|
|
531
533
|
* ```
|
|
532
534
|
*/
|
|
533
535
|
requestResultAdapter?: (params: TAny) => TPlainObject;
|
|
534
536
|
};
|
|
535
537
|
export type EasyTableRefApi = {
|
|
538
|
+
/** 外部发起请求服务 */
|
|
536
539
|
onRequest: (params?: TPlainObject) => void;
|
|
540
|
+
/** 获取请求参数 */
|
|
537
541
|
getRequestParams: () => TPlainObject;
|
|
542
|
+
/** 清楚查询条件 */
|
|
538
543
|
clearQueryCondition: (values?: TPlainObject) => Promise<void>;
|
|
539
544
|
form: FormInstance;
|
|
545
|
+
/** 重置请求 */
|
|
540
546
|
onResetRequest: (params?: TPlainObject) => void;
|
|
541
547
|
};
|
|
542
548
|
export type EasyTableProps = {
|
|
543
549
|
children: ReactElement | ReactElement[];
|
|
544
550
|
modelKey: string;
|
|
551
|
+
/** 接口数据配置 */
|
|
545
552
|
serviceConfig: EasyTableServiceConfig;
|
|
546
|
-
/**
|
|
553
|
+
/**
|
|
554
|
+
* 1. 查询条件Form initialValues
|
|
555
|
+
* 2. 接口其他参数,例如常量类型
|
|
556
|
+
*/
|
|
547
557
|
initialValues?: TPlainObject;
|
|
548
|
-
/**
|
|
558
|
+
/**
|
|
559
|
+
* 分页初始化参数,默认值: pageSiz = 10
|
|
560
|
+
* @deprecated 使用 pageSize 赋值
|
|
561
|
+
*/
|
|
549
562
|
initialPaginationParams?: {
|
|
550
563
|
pageSize?: number;
|
|
551
564
|
};
|
|
565
|
+
/** 分页单页条数,默认值:10 */
|
|
566
|
+
pageSize?: number;
|
|
552
567
|
/** 字段映射 */
|
|
553
568
|
fieldNames?: {
|
|
554
569
|
list?: string;
|
|
@@ -567,6 +582,8 @@ export type EasyTableProps = {
|
|
|
567
582
|
* 1. 需要获取查询条件、主动发起请求等可通过ref操作
|
|
568
583
|
* 2. 可通过属性 initRequest 设置初始化是否请求数据
|
|
569
584
|
* 3. 可通过属性 fieldNames 来设置自定义变量,默认值为:list、total、pageNo、pageSize
|
|
585
|
+
*
|
|
586
|
+
* Demo https://fex.qa.tcshuke.com/docs/admin/main/crud/easy-table
|
|
570
587
|
* ```
|
|
571
588
|
*/
|
|
572
589
|
export declare const EasyTable: import("react").ForwardRefExoticComponent<EasyTableProps & import("react").RefAttributes<EasyTableRefApi>>;
|
|
@@ -1099,7 +1116,7 @@ export declare const FlexLayout: (props: FlexLayoutProps) => JSX.Element;
|
|
|
1099
1116
|
export type FormItemHorizontalUnionProps = {
|
|
1100
1117
|
className?: string;
|
|
1101
1118
|
style?: CSSProperties;
|
|
1102
|
-
label?: string;
|
|
1119
|
+
label?: string | ReactElement;
|
|
1103
1120
|
groupConfigList: {
|
|
1104
1121
|
before?: ReactElement | string;
|
|
1105
1122
|
width?: number | string;
|
|
@@ -1110,6 +1127,7 @@ export type FormItemHorizontalUnionProps = {
|
|
|
1110
1127
|
flexLayoutStyle?: CSSProperties;
|
|
1111
1128
|
hidden?: boolean;
|
|
1112
1129
|
required?: boolean;
|
|
1130
|
+
colon?: boolean;
|
|
1113
1131
|
};
|
|
1114
1132
|
export type FormItemCardProps = {
|
|
1115
1133
|
title?: string | ReactElement;
|
|
@@ -1166,7 +1184,7 @@ export declare const useSafeState: <S extends unknown>(initialState?: S | (() =>
|
|
|
1166
1184
|
S,
|
|
1167
1185
|
Dispatch<SetStateAction<S>>
|
|
1168
1186
|
];
|
|
1169
|
-
export declare const useThemeToken: () => import("antd
|
|
1187
|
+
export declare const useThemeToken: () => import("antd").GlobalToken;
|
|
1170
1188
|
export type IconWrapperProps = {
|
|
1171
1189
|
hoverTips?: string | React.ReactElement;
|
|
1172
1190
|
/**
|
|
@@ -1610,6 +1628,7 @@ export type SimpleLayoutProps = {
|
|
|
1610
1628
|
width?: CSSProperties["width"];
|
|
1611
1629
|
children?: ReactNode | ReactNode[];
|
|
1612
1630
|
titleExtra?: string | ReactElement;
|
|
1631
|
+
hidden?: boolean;
|
|
1613
1632
|
};
|
|
1614
1633
|
/**
|
|
1615
1634
|
* 简单布局
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/antd",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.7",
|
|
4
4
|
"description": "flat-biz oss ui components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"
|
|
8
|
+
"esm/",
|
|
9
9
|
"index.js",
|
|
10
10
|
"index.d.ts",
|
|
11
11
|
"README.md",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"node": ">=13.8.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@ant-design/icons": ">=
|
|
30
|
-
"@dimjs/lang": ">=1.2.
|
|
29
|
+
"@ant-design/icons": ">=5.0.1",
|
|
30
|
+
"@dimjs/lang": ">=1.2.33",
|
|
31
31
|
"@dimjs/model": ">=1.1.8",
|
|
32
32
|
"@dimjs/model-react": ">=1.1.8",
|
|
33
|
-
"@dimjs/utils": ">=1.2.
|
|
34
|
-
"@flatbiz/utils": ">=4.0.
|
|
33
|
+
"@dimjs/utils": ">=1.2.33",
|
|
34
|
+
"@flatbiz/utils": ">=4.0.4",
|
|
35
35
|
"@wove/react": ">=1.2.22",
|
|
36
|
-
"antd": ">=5.1
|
|
36
|
+
"antd": ">=5.2.1",
|
|
37
37
|
"dayjs": ">=1.11.7",
|
|
38
38
|
"react": ">=18.2.0",
|
|
39
39
|
"react-dom": ">=18.2.0"
|