@flatbiz/antd 2.5.21 → 2.5.23
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/cjs/index.css +4 -4
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/index.d.ts +43 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
/// <reference types="scheduler" />
|
|
3
3
|
|
|
4
4
|
import { API, ModelType } from '@dimjs/model';
|
|
5
|
-
import { ButtonProps, CascaderProps, DrawerProps, DropdownProps, FormItemProps, InputNumberProps, InputProps, ModalProps, PopconfirmProps, RadioGroupProps, RowProps, SelectProps, SpaceProps, TableProps, TreeProps, TreeSelectProps, UploadProps } from 'antd';
|
|
5
|
+
import { ButtonProps, CascaderProps, DrawerProps, DropdownProps, FormInstance, FormItemProps, InputNumberProps, InputProps, ModalProps, PopconfirmProps, RadioGroupProps, RowProps, SelectProps, SpaceProps, TableProps, TreeProps, TreeSelectProps, UploadProps } from 'antd';
|
|
6
6
|
import { CheckboxGroupProps } from 'antd/lib/checkbox';
|
|
7
|
+
import { ConfigProviderProps } from 'antd/lib/config-provider';
|
|
7
8
|
import { PickerDateProps, RangePickerDateProps } from 'antd/lib/date-picker/generatePicker';
|
|
8
9
|
import { FormListFieldData, FormListOperation, FormListProps } from 'antd/lib/form/FormList';
|
|
9
10
|
import { SearchProps, TextAreaProps } from 'antd/lib/input';
|
|
@@ -168,6 +169,47 @@ export declare type DateRangePickerWrapperFormItemProps = Omit<FormItemProps, "n
|
|
|
168
169
|
* 包含了Form.Item组件的时间区间选择组件
|
|
169
170
|
*/
|
|
170
171
|
export declare const DateRangePickerWrapperFormItem: VFC<DateRangePickerWrapperFormItemProps>;
|
|
172
|
+
export declare type DialogModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContainer" | "visible" | "open"> & {
|
|
173
|
+
onOk?: (form: FormInstance, e: React.MouseEvent<HTMLElement>) => void | Promise<void>;
|
|
174
|
+
onCancel?: (form: FormInstance, e: React.MouseEvent<HTMLElement>) => void | Promise<void>;
|
|
175
|
+
content: string | ReactElement | ((form: FormInstance) => ReactElement);
|
|
176
|
+
configProviderProps?: ConfigProviderProps;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* 函数式调用弹框;初始化后,内容无法更新
|
|
180
|
+
*```
|
|
181
|
+
* 1. 基础使用方式
|
|
182
|
+
* dialogModal.open({
|
|
183
|
+
* title: '我是弹框',
|
|
184
|
+
* content: <div>我是内容</div>,
|
|
185
|
+
* });
|
|
186
|
+
* ```
|
|
187
|
+
* ```
|
|
188
|
+
* ***************************
|
|
189
|
+
* 2. 结合内置form使用,可在onOK、onCancel获取form对象
|
|
190
|
+
* dialogModal.open({
|
|
191
|
+
* title: '我是弹框',
|
|
192
|
+
* content: (form) => {
|
|
193
|
+
* return (
|
|
194
|
+
* <Form form={form}>
|
|
195
|
+
* <Form.Item name="useName">
|
|
196
|
+
* <Input placeholder="请输入" />
|
|
197
|
+
* </Form.Item>
|
|
198
|
+
* </Form>
|
|
199
|
+
* );
|
|
200
|
+
* },
|
|
201
|
+
* onOK: (form) => {
|
|
202
|
+
* console.log('content form数据', form.getFieldsValue());
|
|
203
|
+
* return Promise.resolve();
|
|
204
|
+
* },
|
|
205
|
+
* });
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
export declare const dialogModal: {
|
|
209
|
+
open: (props: DialogModalProps) => {
|
|
210
|
+
close: () => void;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
171
213
|
export interface DrawerStateType {
|
|
172
214
|
title: string;
|
|
173
215
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/antd",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.23",
|
|
4
4
|
"description": "flat-biz oss ui components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react-router": "^6.3.0",
|
|
52
52
|
"react-router-dom": "^6.3.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "c4806f3467f9f340c49b90ace7a189da5ec987c7"
|
|
55
55
|
}
|