wargerm 0.1.26 → 0.2.3

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.
@@ -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 {};
@@ -12,6 +12,7 @@ declare type Props = {
12
12
  visible?: boolean;
13
13
  width?: number;
14
14
  className?: string;
15
+ style?: React.CSSProperties;
15
16
  };
16
17
  declare class Modal extends React.PureComponent<Props> {
17
18
  static show: (config: any) => {
@@ -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;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  declare type Props = {
3
3
  onChange?: (value: string) => void;
4
4
  onBlur?: () => void;
5
+ disabled?: boolean;
5
6
  value?: string;
6
7
  placeholder: string;
7
8
  };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: React.ForwardRefExoticComponent<Pick<Record<string, any>, string> & React.RefAttributes<unknown>>;
3
+ export default _default;
@@ -104,8 +104,9 @@ declare type Props = {
104
104
  form?: FormProps;
105
105
  search?: Isearch | false;
106
106
  frameBoxTable?: boolean;
107
+ frameBoxDirection?: 'in' | 'out';
107
108
  };
108
- declare function Table({ columns, dataSource: tableList, request, onLoad, params, onSubmit, rowKey, onRow, className, rowClassName, rowSelection, style, tbodyStyle, thStyle, border, scroll, pagination, search, frameBoxTable, ...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;
109
110
  declare namespace Table {
110
111
  var defaultProps: {
111
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>;