wargerm 0.1.24 → 0.2.1
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/Modal/dialog.d.ts +19 -0
- package/dist/components/Modal/index.d.ts +1 -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/Table/FrameBox/index.d.ts +11 -0
- package/dist/components/Table/index.d.ts +3 -1
- package/dist/components/WForm/index.d.ts +4 -2
- 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 +960 -138
- package/dist/index.js +965 -137
- package/package.json +6 -2
@@ -0,0 +1,19 @@
|
|
1
|
+
import React, { ReactNode } from 'react';
|
2
|
+
declare type Props = {
|
3
|
+
title?: string | ReactNode;
|
4
|
+
onOk?: (e: any) => void;
|
5
|
+
onCancel?: (e: any) => void;
|
6
|
+
closeCb?: () => void;
|
7
|
+
footer?: ReactNode | boolean;
|
8
|
+
content?: ReactNode;
|
9
|
+
onClose?: () => void;
|
10
|
+
okText?: string;
|
11
|
+
cancelText?: string;
|
12
|
+
visible?: boolean;
|
13
|
+
width?: number;
|
14
|
+
className?: string;
|
15
|
+
style?: React.CSSProperties;
|
16
|
+
children?: ReactNode;
|
17
|
+
};
|
18
|
+
export default function DialogModel(props: Props): React.ReactPortal;
|
19
|
+
export {};
|
@@ -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;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import './index.less';
|
3
|
+
declare type Props = {
|
4
|
+
className?: string;
|
5
|
+
frameStyle?: Record<string, any>;
|
6
|
+
style?: Record<string, any>;
|
7
|
+
children: ReactNode;
|
8
|
+
direction?: 'in' | 'out';
|
9
|
+
};
|
10
|
+
export default function FrameBox({ className, frameStyle, style, direction, children, ...props }: Props): JSX.Element;
|
11
|
+
export {};
|
@@ -103,8 +103,10 @@ declare type Props = {
|
|
103
103
|
children?: ReactNode;
|
104
104
|
form?: FormProps;
|
105
105
|
search?: Isearch | false;
|
106
|
+
frameBoxTable?: boolean;
|
107
|
+
frameBoxDirection?: 'in' | 'out';
|
106
108
|
};
|
107
|
-
declare function Table({ columns, dataSource: tableList, request, onLoad, params, onSubmit, rowKey, onRow, className, rowClassName, rowSelection, style, tbodyStyle, thStyle, border, scroll, pagination, search, ...props }: Props): JSX.Element;
|
109
|
+
declare function Table({ columns, dataSource: tableList, request, onLoad, params, onSubmit, rowKey, onRow, className, rowClassName, rowSelection, style, tbodyStyle, thStyle, border, scroll, pagination, search, frameBoxTable, frameBoxDirection, ...props }: Props): JSX.Element;
|
108
110
|
declare namespace Table {
|
109
111
|
var defaultProps: {
|
110
112
|
rowKey: string;
|
@@ -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;
|
@@ -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>;
|