wargerm 0.2.0 → 0.2.4
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/dist/components/Input/index.d.ts +8 -4
- package/dist/components/InputNumber/index.d.ts +6 -0
- package/dist/components/ModalForm/index.d.ts +9 -0
- package/dist/components/NumericInput/index.d.ts +1 -0
- package/dist/components/TabelCard/index.d.ts +3 -0
- package/dist/components/WForm/index.d.ts +5 -3
- package/dist/index.css +1793 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.css +1793 -0
- package/dist/index.esm.js +676 -103
- package/dist/index.js +693 -114
- package/package.json +3 -2
@@ -1,6 +1,10 @@
|
|
1
|
-
import
|
2
|
-
import { InputProps } from 'antd/lib/input';
|
1
|
+
import React from 'react';
|
2
|
+
import { InputProps, TextAreaProps } from 'antd/lib/input';
|
3
3
|
export interface IInputProps extends InputProps {
|
4
4
|
}
|
5
|
-
declare
|
6
|
-
|
5
|
+
export declare type IndexComponent = React.FC<IInputProps> & {
|
6
|
+
TextArea: React.FC<TextAreaProps>;
|
7
|
+
Button: React.FC<any>;
|
8
|
+
};
|
9
|
+
declare const Index: IndexComponent;
|
10
|
+
export default Index;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React, { MutableRefObject } from 'react';
|
2
|
+
import { FormInstance } from 'antd';
|
3
|
+
export interface IFormInstance extends MutableRefObject<FormInstance> {
|
4
|
+
handleSubmit?: () => void;
|
5
|
+
resetFields?: () => void;
|
6
|
+
setFieldsValue?: (record: Record<string, any>) => void;
|
7
|
+
}
|
8
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Record<string, any>, string> & React.RefAttributes<unknown>>;
|
9
|
+
export default _default;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { MutableRefObject } from 'react';
|
2
2
|
import { ReactNode } from 'react';
|
3
3
|
import { FormInstance, FormProps } from 'antd';
|
4
|
-
interface ColumnProps {
|
4
|
+
export interface ColumnProps {
|
5
5
|
title: string;
|
6
6
|
dataIndex: string;
|
7
7
|
key?: string | number;
|
@@ -12,7 +12,7 @@ interface ColumnProps {
|
|
12
12
|
search?: {
|
13
13
|
transform?: (value: any) => Record<string, any>;
|
14
14
|
};
|
15
|
-
valueType?: 'text' | 'select' | 'treeSelect' | 'date' | 'dateTime' | 'dateMonth' | 'dateYear' | 'dateRange' | 'dateTimeRange' | 'checkbox' | 'radio' | 'radioButton' | 'switch' | 'digit' | 'image';
|
15
|
+
valueType?: 'text' | 'textarea' | 'inputNumber' | 'select' | 'treeSelect' | 'date' | 'dateTime' | 'dateMonth' | 'dateYear' | 'dateRange' | 'dateTimeRange' | 'checkbox' | 'radio' | 'radioButton' | 'switch' | 'digit' | 'image';
|
16
16
|
valueEnum?: Record<string, any>;
|
17
17
|
options?: Record<string, any>[];
|
18
18
|
fieldProps?: Record<string, any>;
|
@@ -22,6 +22,7 @@ interface ColumnProps {
|
|
22
22
|
initialValue?: any;
|
23
23
|
request?: () => Promise<any>;
|
24
24
|
render?: (text: string, record: Record<string, any>, index: number) => ReactNode;
|
25
|
+
renderFormItem?: (item: any, { formItemProps, fieldProps, ...rest }: any, form: any) => ReactNode;
|
25
26
|
}
|
26
27
|
declare type defaultColConfig = {
|
27
28
|
xs: 24;
|
@@ -31,7 +32,7 @@ declare type defaultColConfig = {
|
|
31
32
|
xl: 8;
|
32
33
|
xxl: 6;
|
33
34
|
};
|
34
|
-
interface Isearch {
|
35
|
+
export interface Isearch {
|
35
36
|
labelWidth?: number | 'auto';
|
36
37
|
span?: number | defaultColConfig;
|
37
38
|
filterType?: 'query' | 'light';
|
@@ -46,6 +47,7 @@ export interface WFormProps extends FormProps {
|
|
46
47
|
className?: string;
|
47
48
|
style?: React.CSSProperties;
|
48
49
|
columns: ColumnProps[];
|
50
|
+
disabled?: boolean;
|
49
51
|
onSubmit?: (params: Record<string, any>) => void;
|
50
52
|
onReset?: () => void;
|
51
53
|
formRef?: MutableRefObject<FormInstance>;
|