nsc-react-component 1.0.23 → 1.0.27
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/lib/Interface.d.ts +4 -4
- package/lib/button/index.d.ts +27 -27
- package/lib/cascader/index.d.ts +27 -27
- package/lib/checkbox/CheckboxGroup.d.ts +22 -22
- package/lib/checkbox/index.d.ts +8 -8
- package/lib/common/BodyRow/index.d.ts +26 -26
- package/lib/common/Icon.d.ts +14 -14
- package/lib/common/IconFont.d.ts +4 -4
- package/lib/common/NoAuthority.d.ts +4 -4
- package/lib/common/NoData.d.ts +4 -4
- package/lib/common/NoMessage.d.ts +4 -4
- package/lib/common/NoNetWork.d.ts +4 -4
- package/lib/common/Page404.d.ts +4 -4
- package/lib/common/PageRequest.d.ts +45 -45
- package/lib/common/TreePanel.d.ts +74 -74
- package/lib/common/withZhLocale.d.ts +3 -3
- package/lib/config.d.ts +20 -20
- package/lib/datepick/Rangepicker.d.ts +4 -4
- package/lib/datepick/index.d.ts +3 -3
- package/lib/form/Form.d.ts +47 -47
- package/lib/form/filed/Cascader.d.ts +6 -6
- package/lib/form/filed/Checkbox.d.ts +6 -6
- package/lib/form/filed/DatePicker.d.ts +6 -6
- package/lib/form/filed/FormItem.d.ts +11 -11
- package/lib/form/filed/Input.d.ts +7 -6
- package/lib/form/filed/Input.js +7 -4
- package/lib/form/filed/InputEamil.d.ts +6 -6
- package/lib/form/filed/InputNumber.d.ts +6 -6
- package/lib/form/filed/InputPassword.d.ts +6 -6
- package/lib/form/filed/Item.d.ts +17 -21
- package/lib/form/filed/Item.js +34 -7
- package/lib/form/filed/Radio.d.ts +6 -6
- package/lib/form/filed/RangerPicker.d.ts +6 -6
- package/lib/form/filed/Rate.d.ts +6 -6
- package/lib/form/filed/Select.d.ts +6 -6
- package/lib/form/filed/Slider.d.ts +6 -6
- package/lib/form/filed/Switch.d.ts +6 -6
- package/lib/form/filed/TagSelect.d.ts +6 -6
- package/lib/form/filed/TextArea.d.ts +6 -6
- package/lib/form/filed/Upload.d.ts +6 -6
- package/lib/form/index.d.ts +41 -41
- package/lib/index.d.ts +26 -26
- package/lib/input/Email.d.ts +16 -16
- package/lib/input/Number.d.ts +13 -13
- package/lib/input/Password.d.ts +16 -16
- package/lib/input/Search.d.ts +16 -16
- package/lib/input/TextArea.d.ts +16 -16
- package/lib/input/index.d.ts +33 -33
- package/lib/input/index.js +10 -13
- package/lib/menu/index.d.ts +28 -28
- package/lib/radio/RadioGroup.d.ts +25 -25
- package/lib/radio/index.d.ts +11 -11
- package/lib/select/index.d.ts +29 -29
- package/lib/table/index.d.ts +87 -87
- package/lib/tabs/Tabpane.d.ts +13 -13
- package/lib/tabs/index.d.ts +18 -18
- package/lib/tagSelect/TagSelect.d.ts +51 -51
- package/lib/tagSelect/index.d.ts +23 -23
- package/lib/tree/TreeSearch.d.ts +42 -42
- package/lib/tree/index.d.ts +62 -62
- package/lib/treeUtils.d.ts +70 -70
- package/lib/utils.d.ts +14 -12
- package/lib/utils.js +7 -2
- package/package.json +1 -1
- package/.vscode/launch.json +0 -15
package/lib/table/index.d.ts
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import { StoreProps } from "@bj-nsc/msn";
|
|
2
|
-
import { TableProps } from "antd";
|
|
3
|
-
import { TablePaginationConfig } from "antd/lib/table";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import { DndContextType, IBodyRowProps } from "../common/BodyRow";
|
|
6
|
-
interface IDragParams {
|
|
7
|
-
id: string | number;
|
|
8
|
-
ids: Array<string | number>;
|
|
9
|
-
parentId: string | number;
|
|
10
|
-
}
|
|
11
|
-
export declare type StoreType = "PageStore" | "TreeStore" | "BaseStore";
|
|
12
|
-
interface NSCTablePagination extends TablePaginationConfig {
|
|
13
|
-
totalKey?: string;
|
|
14
|
-
pageSizeKey?: string;
|
|
15
|
-
currentKey?: string;
|
|
16
|
-
}
|
|
17
|
-
interface NSCTableProps extends TableProps<any> {
|
|
18
|
-
store?: StoreProps;
|
|
19
|
-
showTotal?: boolean;
|
|
20
|
-
disableColumns?: string[];
|
|
21
|
-
dragable?: boolean;
|
|
22
|
-
filterColumn?: boolean;
|
|
23
|
-
moveRow?: (params: IDragParams) => void;
|
|
24
|
-
dragUrl?: string;
|
|
25
|
-
pagination?: false | NSCTablePagination;
|
|
26
|
-
autoPagination?: boolean;
|
|
27
|
-
autoSort?: boolean;
|
|
28
|
-
autoOnChange?: boolean;
|
|
29
|
-
}
|
|
30
|
-
export declare type INSCTableProps = typeof NSCTable.defaultProps & NSCTableProps;
|
|
31
|
-
export { DndContextType, IBodyRowProps };
|
|
32
|
-
declare class NSCTable extends React.Component<INSCTableProps> {
|
|
33
|
-
static defaultProps: {
|
|
34
|
-
disableColumns: any[];
|
|
35
|
-
dragable: boolean;
|
|
36
|
-
showTotal: boolean;
|
|
37
|
-
filterColumn: boolean;
|
|
38
|
-
dragUrl: string;
|
|
39
|
-
autoPagination: boolean;
|
|
40
|
-
autoSort: boolean;
|
|
41
|
-
autoOnChange: boolean;
|
|
42
|
-
};
|
|
43
|
-
store: any;
|
|
44
|
-
thIconRef: React.RefObject<HTMLDivElement>;
|
|
45
|
-
state: {
|
|
46
|
-
dataSource: any[];
|
|
47
|
-
columns: any[];
|
|
48
|
-
loading: boolean;
|
|
49
|
-
pagination: {};
|
|
50
|
-
activeIndex: number;
|
|
51
|
-
searchText: any;
|
|
52
|
-
fieldOption: any;
|
|
53
|
-
searchColor: any;
|
|
54
|
-
};
|
|
55
|
-
listeners: {
|
|
56
|
-
onBeforeLoad: any;
|
|
57
|
-
load: any;
|
|
58
|
-
};
|
|
59
|
-
constructor(props: any);
|
|
60
|
-
componentDidMount(): void;
|
|
61
|
-
componentDidUpdate(prevProps: any): void;
|
|
62
|
-
/**
|
|
63
|
-
* 清除选中颜色
|
|
64
|
-
*/
|
|
65
|
-
clearSelectColor(): this;
|
|
66
|
-
getPaginationByStore(): any;
|
|
67
|
-
onChange(pagination: any, filters: any, sorter: any, extra: any): void;
|
|
68
|
-
getStore(): any;
|
|
69
|
-
/**
|
|
70
|
-
* 获取数据模型对象
|
|
71
|
-
*/
|
|
72
|
-
getModel(): any;
|
|
73
|
-
/**
|
|
74
|
-
* 菜单搜索过滤显示
|
|
75
|
-
* @param {String} val
|
|
76
|
-
*/
|
|
77
|
-
handleSearch(val: any, fieldOption: any, searchColor: any): void;
|
|
78
|
-
/**
|
|
79
|
-
* 模块列表移动排序
|
|
80
|
-
*/
|
|
81
|
-
moveRow: (dragIndex: any, hoverIndex: any, drag: any, target: any) => void;
|
|
82
|
-
filterColumn(checkedValue: any): void;
|
|
83
|
-
getColumns(): any[];
|
|
84
|
-
render(): JSX.Element;
|
|
85
|
-
}
|
|
86
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<any>>;
|
|
87
|
-
export default _default;
|
|
1
|
+
import { StoreProps } from "@bj-nsc/msn";
|
|
2
|
+
import { TableProps } from "antd";
|
|
3
|
+
import { TablePaginationConfig } from "antd/lib/table";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { DndContextType, IBodyRowProps } from "../common/BodyRow";
|
|
6
|
+
interface IDragParams {
|
|
7
|
+
id: string | number;
|
|
8
|
+
ids: Array<string | number>;
|
|
9
|
+
parentId: string | number;
|
|
10
|
+
}
|
|
11
|
+
export declare type StoreType = "PageStore" | "TreeStore" | "BaseStore";
|
|
12
|
+
interface NSCTablePagination extends TablePaginationConfig {
|
|
13
|
+
totalKey?: string;
|
|
14
|
+
pageSizeKey?: string;
|
|
15
|
+
currentKey?: string;
|
|
16
|
+
}
|
|
17
|
+
interface NSCTableProps extends TableProps<any> {
|
|
18
|
+
store?: StoreProps;
|
|
19
|
+
showTotal?: boolean;
|
|
20
|
+
disableColumns?: string[];
|
|
21
|
+
dragable?: boolean;
|
|
22
|
+
filterColumn?: boolean;
|
|
23
|
+
moveRow?: (params: IDragParams) => void;
|
|
24
|
+
dragUrl?: string;
|
|
25
|
+
pagination?: false | NSCTablePagination;
|
|
26
|
+
autoPagination?: boolean;
|
|
27
|
+
autoSort?: boolean;
|
|
28
|
+
autoOnChange?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare type INSCTableProps = typeof NSCTable.defaultProps & NSCTableProps;
|
|
31
|
+
export { DndContextType, IBodyRowProps };
|
|
32
|
+
declare class NSCTable extends React.Component<INSCTableProps> {
|
|
33
|
+
static defaultProps: {
|
|
34
|
+
disableColumns: any[];
|
|
35
|
+
dragable: boolean;
|
|
36
|
+
showTotal: boolean;
|
|
37
|
+
filterColumn: boolean;
|
|
38
|
+
dragUrl: string;
|
|
39
|
+
autoPagination: boolean;
|
|
40
|
+
autoSort: boolean;
|
|
41
|
+
autoOnChange: boolean;
|
|
42
|
+
};
|
|
43
|
+
store: any;
|
|
44
|
+
thIconRef: React.RefObject<HTMLDivElement>;
|
|
45
|
+
state: {
|
|
46
|
+
dataSource: any[];
|
|
47
|
+
columns: any[];
|
|
48
|
+
loading: boolean;
|
|
49
|
+
pagination: {};
|
|
50
|
+
activeIndex: number;
|
|
51
|
+
searchText: any;
|
|
52
|
+
fieldOption: any;
|
|
53
|
+
searchColor: any;
|
|
54
|
+
};
|
|
55
|
+
listeners: {
|
|
56
|
+
onBeforeLoad: any;
|
|
57
|
+
load: any;
|
|
58
|
+
};
|
|
59
|
+
constructor(props: any);
|
|
60
|
+
componentDidMount(): void;
|
|
61
|
+
componentDidUpdate(prevProps: any): void;
|
|
62
|
+
/**
|
|
63
|
+
* 清除选中颜色
|
|
64
|
+
*/
|
|
65
|
+
clearSelectColor(): this;
|
|
66
|
+
getPaginationByStore(): any;
|
|
67
|
+
onChange(pagination: any, filters: any, sorter: any, extra: any): void;
|
|
68
|
+
getStore(): any;
|
|
69
|
+
/**
|
|
70
|
+
* 获取数据模型对象
|
|
71
|
+
*/
|
|
72
|
+
getModel(): any;
|
|
73
|
+
/**
|
|
74
|
+
* 菜单搜索过滤显示
|
|
75
|
+
* @param {String} val
|
|
76
|
+
*/
|
|
77
|
+
handleSearch(val: any, fieldOption: any, searchColor: any): void;
|
|
78
|
+
/**
|
|
79
|
+
* 模块列表移动排序
|
|
80
|
+
*/
|
|
81
|
+
moveRow: (dragIndex: any, hoverIndex: any, drag: any, target: any) => void;
|
|
82
|
+
filterColumn(checkedValue: any): void;
|
|
83
|
+
getColumns(): any[];
|
|
84
|
+
render(): JSX.Element;
|
|
85
|
+
}
|
|
86
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<any>>;
|
|
87
|
+
export default _default;
|
package/lib/tabs/Tabpane.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { TabPaneProps } from "antd";
|
|
3
|
-
/**
|
|
4
|
-
* @param {*} value 原TabPane key 属性, 封装后key无法接收,改为value传递
|
|
5
|
-
* @param {boolean} showMenu 是否显示右键点击菜单 默认ture
|
|
6
|
-
*/
|
|
7
|
-
interface ITabPaneProps extends TabPaneProps {
|
|
8
|
-
showMenu?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export default class NscTabPane extends React.PureComponent<ITabPaneProps> {
|
|
11
|
-
render(): JSX.Element;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { TabPaneProps } from "antd";
|
|
3
|
+
/**
|
|
4
|
+
* @param {*} value 原TabPane key 属性, 封装后key无法接收,改为value传递
|
|
5
|
+
* @param {boolean} showMenu 是否显示右键点击菜单 默认ture
|
|
6
|
+
*/
|
|
7
|
+
interface ITabPaneProps extends TabPaneProps {
|
|
8
|
+
showMenu?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export default class NscTabPane extends React.PureComponent<ITabPaneProps> {
|
|
11
|
+
render(): JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
package/lib/tabs/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import TabPane from "./Tabpane";
|
|
3
|
-
interface ITabsProps {
|
|
4
|
-
OncontextMenu?: boolean;
|
|
5
|
-
contextMenu?: Array<{
|
|
6
|
-
text?: string;
|
|
7
|
-
key?: string;
|
|
8
|
-
onClick?: void;
|
|
9
|
-
}>;
|
|
10
|
-
[propName: string]: any;
|
|
11
|
-
}
|
|
12
|
-
export default class NscTabs extends React.PureComponent<ITabsProps> {
|
|
13
|
-
static TabPane: typeof TabPane;
|
|
14
|
-
constructor(props: any);
|
|
15
|
-
menuOnClick(item: any, pane: any, paneIndex: any): void;
|
|
16
|
-
render(): JSX.Element;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import TabPane from "./Tabpane";
|
|
3
|
+
interface ITabsProps {
|
|
4
|
+
OncontextMenu?: boolean;
|
|
5
|
+
contextMenu?: Array<{
|
|
6
|
+
text?: string;
|
|
7
|
+
key?: string;
|
|
8
|
+
onClick?: void;
|
|
9
|
+
}>;
|
|
10
|
+
[propName: string]: any;
|
|
11
|
+
}
|
|
12
|
+
export default class NscTabs extends React.PureComponent<ITabsProps> {
|
|
13
|
+
static TabPane: typeof TabPane;
|
|
14
|
+
constructor(props: any);
|
|
15
|
+
menuOnClick(item: any, pane: any, paneIndex: any): void;
|
|
16
|
+
render(): JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { PureComponent } from "react";
|
|
2
|
-
interface IOptionProps {
|
|
3
|
-
value?: string | number;
|
|
4
|
-
checked?: boolean;
|
|
5
|
-
onChange?: any;
|
|
6
|
-
title?: string | number;
|
|
7
|
-
}
|
|
8
|
-
declare class TagSelectOption extends PureComponent<IOptionProps> {
|
|
9
|
-
static isTagSelectOption: boolean;
|
|
10
|
-
render(): JSX.Element;
|
|
11
|
-
}
|
|
12
|
-
export interface ITagProps {
|
|
13
|
-
expandable?: boolean;
|
|
14
|
-
hideCheckAll?: boolean;
|
|
15
|
-
className?: any;
|
|
16
|
-
actionsText?: {
|
|
17
|
-
expandText?: string;
|
|
18
|
-
collapseText?: string;
|
|
19
|
-
selectAllText?: string;
|
|
20
|
-
};
|
|
21
|
-
style?: any;
|
|
22
|
-
[propName: string]: any;
|
|
23
|
-
}
|
|
24
|
-
declare class TagSelect extends PureComponent<ITagProps> {
|
|
25
|
-
state: {
|
|
26
|
-
value: string;
|
|
27
|
-
expand: boolean;
|
|
28
|
-
};
|
|
29
|
-
static defaultProps: {
|
|
30
|
-
hideCheckAll: boolean;
|
|
31
|
-
actionsText: {
|
|
32
|
-
expandText: string;
|
|
33
|
-
collapseText: string;
|
|
34
|
-
selectAllText: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
static Option: typeof TagSelectOption;
|
|
38
|
-
static getDerivedStateFromProps(nextProps: any): {
|
|
39
|
-
value: any;
|
|
40
|
-
};
|
|
41
|
-
constructor(props: any);
|
|
42
|
-
onChange: (value: any) => void;
|
|
43
|
-
onSelectAll: (checked: any) => void;
|
|
44
|
-
getAllTags(): any[];
|
|
45
|
-
handleTagChange: (value: any, checked: any) => void;
|
|
46
|
-
handleExpand: () => void;
|
|
47
|
-
isTagSelectOption: (node: any) => any;
|
|
48
|
-
renderChild(): any;
|
|
49
|
-
render(): JSX.Element;
|
|
50
|
-
}
|
|
51
|
-
export default TagSelect;
|
|
1
|
+
import { PureComponent } from "react";
|
|
2
|
+
interface IOptionProps {
|
|
3
|
+
value?: string | number;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
onChange?: any;
|
|
6
|
+
title?: string | number;
|
|
7
|
+
}
|
|
8
|
+
declare class TagSelectOption extends PureComponent<IOptionProps> {
|
|
9
|
+
static isTagSelectOption: boolean;
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export interface ITagProps {
|
|
13
|
+
expandable?: boolean;
|
|
14
|
+
hideCheckAll?: boolean;
|
|
15
|
+
className?: any;
|
|
16
|
+
actionsText?: {
|
|
17
|
+
expandText?: string;
|
|
18
|
+
collapseText?: string;
|
|
19
|
+
selectAllText?: string;
|
|
20
|
+
};
|
|
21
|
+
style?: any;
|
|
22
|
+
[propName: string]: any;
|
|
23
|
+
}
|
|
24
|
+
declare class TagSelect extends PureComponent<ITagProps> {
|
|
25
|
+
state: {
|
|
26
|
+
value: string;
|
|
27
|
+
expand: boolean;
|
|
28
|
+
};
|
|
29
|
+
static defaultProps: {
|
|
30
|
+
hideCheckAll: boolean;
|
|
31
|
+
actionsText: {
|
|
32
|
+
expandText: string;
|
|
33
|
+
collapseText: string;
|
|
34
|
+
selectAllText: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
static Option: typeof TagSelectOption;
|
|
38
|
+
static getDerivedStateFromProps(nextProps: any): {
|
|
39
|
+
value: any;
|
|
40
|
+
};
|
|
41
|
+
constructor(props: any);
|
|
42
|
+
onChange: (value: any) => void;
|
|
43
|
+
onSelectAll: (checked: any) => void;
|
|
44
|
+
getAllTags(): any[];
|
|
45
|
+
handleTagChange: (value: any, checked: any) => void;
|
|
46
|
+
handleExpand: () => void;
|
|
47
|
+
isTagSelectOption: (node: any) => any;
|
|
48
|
+
renderChild(): any;
|
|
49
|
+
render(): JSX.Element;
|
|
50
|
+
}
|
|
51
|
+
export default TagSelect;
|
package/lib/tagSelect/index.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { PureComponent } from "react";
|
|
2
|
-
import { ITagProps } from "./TagSelect";
|
|
3
|
-
import { StoreProps } from "@bj-nsc/msn";
|
|
4
|
-
interface ISelectTagProps extends ITagProps {
|
|
5
|
-
data?: Array<Object>;
|
|
6
|
-
store?: StoreProps;
|
|
7
|
-
labelField?: string;
|
|
8
|
-
valueField?: string;
|
|
9
|
-
}
|
|
10
|
-
export default class NSCTagSelect extends PureComponent<ISelectTagProps> {
|
|
11
|
-
state: {
|
|
12
|
-
dataSource: any[];
|
|
13
|
-
};
|
|
14
|
-
store: any;
|
|
15
|
-
static getDerivedStateFromProps(nextProps: any, prevState: any): {
|
|
16
|
-
dataSource: any;
|
|
17
|
-
};
|
|
18
|
-
constructor(props: any);
|
|
19
|
-
componentDidMount(): void;
|
|
20
|
-
renderOption(optionData: any): any;
|
|
21
|
-
render(): JSX.Element;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
1
|
+
import { PureComponent } from "react";
|
|
2
|
+
import { ITagProps } from "./TagSelect";
|
|
3
|
+
import { StoreProps } from "@bj-nsc/msn";
|
|
4
|
+
interface ISelectTagProps extends ITagProps {
|
|
5
|
+
data?: Array<Object>;
|
|
6
|
+
store?: StoreProps;
|
|
7
|
+
labelField?: string;
|
|
8
|
+
valueField?: string;
|
|
9
|
+
}
|
|
10
|
+
export default class NSCTagSelect extends PureComponent<ISelectTagProps> {
|
|
11
|
+
state: {
|
|
12
|
+
dataSource: any[];
|
|
13
|
+
};
|
|
14
|
+
store: any;
|
|
15
|
+
static getDerivedStateFromProps(nextProps: any, prevState: any): {
|
|
16
|
+
dataSource: any;
|
|
17
|
+
};
|
|
18
|
+
constructor(props: any);
|
|
19
|
+
componentDidMount(): void;
|
|
20
|
+
renderOption(optionData: any): any;
|
|
21
|
+
render(): JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
package/lib/tree/TreeSearch.d.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import React, { PureComponent } from "react";
|
|
2
|
-
import NscIcon from "../common/Icon";
|
|
3
|
-
import NscTree from ".";
|
|
4
|
-
interface ITreeSearchProps {
|
|
5
|
-
treeRef?: React.RefObject<any>;
|
|
6
|
-
treeInstance: NscTree;
|
|
7
|
-
handleAddModule?: (params: any) => void;
|
|
8
|
-
handleEditModule?: (params: any) => void;
|
|
9
|
-
handleDeleteModule?: (params: any) => void;
|
|
10
|
-
}
|
|
11
|
-
export default class TreeSearch extends PureComponent<ITreeSearchProps> {
|
|
12
|
-
treeRefreshIcon: React.RefObject<NscIcon>;
|
|
13
|
-
selectedTreeNodeId: string;
|
|
14
|
-
getSelectedNodeId: () => any;
|
|
15
|
-
getSelectedNode: () => any;
|
|
16
|
-
/**
|
|
17
|
-
* 模块树操作
|
|
18
|
-
*/
|
|
19
|
-
handleMenuItemClick: (e: any) => void;
|
|
20
|
-
/**
|
|
21
|
-
* 添加模块数据
|
|
22
|
-
* @param {*} params
|
|
23
|
-
*/
|
|
24
|
-
handleAddModule: (params: any) => void;
|
|
25
|
-
handleEditModule(params: any): void;
|
|
26
|
-
handleDeleteModule: (params: any) => void;
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @param {*} id 要删除的模块ID
|
|
30
|
-
* @param {*} type 00=目录 01=模块
|
|
31
|
-
*/
|
|
32
|
-
handleRemoveModule(id: any, type: any, callback?: any): void;
|
|
33
|
-
/**
|
|
34
|
-
* 菜单搜索
|
|
35
|
-
*/
|
|
36
|
-
handleMenuSearch: (e: any) => void;
|
|
37
|
-
handleSearch: (value: any, e: any) => void;
|
|
38
|
-
moduleTreeMenu: JSX.Element;
|
|
39
|
-
onlyRenderSearch: () => JSX.Element;
|
|
40
|
-
render(): JSX.Element;
|
|
41
|
-
}
|
|
42
|
-
export {};
|
|
1
|
+
import React, { PureComponent } from "react";
|
|
2
|
+
import NscIcon from "../common/Icon";
|
|
3
|
+
import NscTree from ".";
|
|
4
|
+
interface ITreeSearchProps {
|
|
5
|
+
treeRef?: React.RefObject<any>;
|
|
6
|
+
treeInstance: NscTree;
|
|
7
|
+
handleAddModule?: (params: any) => void;
|
|
8
|
+
handleEditModule?: (params: any) => void;
|
|
9
|
+
handleDeleteModule?: (params: any) => void;
|
|
10
|
+
}
|
|
11
|
+
export default class TreeSearch extends PureComponent<ITreeSearchProps> {
|
|
12
|
+
treeRefreshIcon: React.RefObject<NscIcon>;
|
|
13
|
+
selectedTreeNodeId: string;
|
|
14
|
+
getSelectedNodeId: () => any;
|
|
15
|
+
getSelectedNode: () => any;
|
|
16
|
+
/**
|
|
17
|
+
* 模块树操作
|
|
18
|
+
*/
|
|
19
|
+
handleMenuItemClick: (e: any) => void;
|
|
20
|
+
/**
|
|
21
|
+
* 添加模块数据
|
|
22
|
+
* @param {*} params
|
|
23
|
+
*/
|
|
24
|
+
handleAddModule: (params: any) => void;
|
|
25
|
+
handleEditModule(params: any): void;
|
|
26
|
+
handleDeleteModule: (params: any) => void;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @param {*} id 要删除的模块ID
|
|
30
|
+
* @param {*} type 00=目录 01=模块
|
|
31
|
+
*/
|
|
32
|
+
handleRemoveModule(id: any, type: any, callback?: any): void;
|
|
33
|
+
/**
|
|
34
|
+
* 菜单搜索
|
|
35
|
+
*/
|
|
36
|
+
handleMenuSearch: (e: any) => void;
|
|
37
|
+
handleSearch: (value: any, e: any) => void;
|
|
38
|
+
moduleTreeMenu: JSX.Element;
|
|
39
|
+
onlyRenderSearch: () => JSX.Element;
|
|
40
|
+
render(): JSX.Element;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
package/lib/tree/index.d.ts
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TreeProps, TreeNodeProps } from "antd";
|
|
3
|
-
import TreePanel, { ITreePanelProps, TreeCommonProps } from "../common/TreePanel";
|
|
4
|
-
import RcTree from "rc-tree";
|
|
5
|
-
import { DataNode, EventDataNode } from "rc-tree/lib/interface";
|
|
6
|
-
export { Store, StoreConfigType } from "@bj-nsc/msn";
|
|
7
|
-
declare type NscDataNodeProps = DataNode & {
|
|
8
|
-
props: {
|
|
9
|
-
dataref: any;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export interface NscTreeProps extends ITreePanelProps {
|
|
13
|
-
editable?: boolean;
|
|
14
|
-
treeData?: any[];
|
|
15
|
-
searchable?: boolean;
|
|
16
|
-
nodeProps?: TreeNodeProps;
|
|
17
|
-
}
|
|
18
|
-
declare class NscTree extends TreePanel<NscTreeProps & TreeCommonProps> {
|
|
19
|
-
nscTreeRef: React.RefObject<RcTree & TreeProps>;
|
|
20
|
-
constructor(props: any);
|
|
21
|
-
static defaultProps: {
|
|
22
|
-
store: {};
|
|
23
|
-
};
|
|
24
|
-
_dataToCheckedKeys(modelData: any): any;
|
|
25
|
-
/**
|
|
26
|
-
* 树搜索
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* 获取选中节点ID数组
|
|
30
|
-
* @return String[]
|
|
31
|
-
*/
|
|
32
|
-
getCheckedKeys(): import("rc-tree/lib/interface").Key[] | {
|
|
33
|
-
checked: import("rc-tree/lib/interface").Key[];
|
|
34
|
-
halfChecked: import("rc-tree/lib/interface").Key[];
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* 获取选中节点对象数组
|
|
38
|
-
* @return node[]
|
|
39
|
-
*/
|
|
40
|
-
getCheckedNodes(): NscDataNodeProps[];
|
|
41
|
-
/**
|
|
42
|
-
* 获取全部选中节点ID,包含半选中节点ID
|
|
43
|
-
* @return String[]
|
|
44
|
-
*/
|
|
45
|
-
getCheckedAllKeys(): import("rc-tree/lib/interface").Key[];
|
|
46
|
-
/**
|
|
47
|
-
* 获取全部选中节点Node对象,包含半选中节点Node对象
|
|
48
|
-
* @return node[]
|
|
49
|
-
*/
|
|
50
|
-
getCheckedAllNodes(): any[];
|
|
51
|
-
handleAddModule: (node: any) => void;
|
|
52
|
-
handleEditModule: (node: any) => void;
|
|
53
|
-
handleDeleteModule: (node: any) => void;
|
|
54
|
-
_onLoadData: (treeNode: EventDataNode & {
|
|
55
|
-
props: {
|
|
56
|
-
dataref;
|
|
57
|
-
};
|
|
58
|
-
}) => Promise<void>;
|
|
59
|
-
renderTemplate(treeProps?: ITreePanelProps, newMenuDatas?: any[]): JSX.Element;
|
|
60
|
-
renderTreeNodes: (data: any, renderFn: any) => any;
|
|
61
|
-
}
|
|
62
|
-
export default NscTree;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TreeProps, TreeNodeProps } from "antd";
|
|
3
|
+
import TreePanel, { ITreePanelProps, TreeCommonProps } from "../common/TreePanel";
|
|
4
|
+
import RcTree from "rc-tree";
|
|
5
|
+
import { DataNode, EventDataNode } from "rc-tree/lib/interface";
|
|
6
|
+
export { Store, StoreConfigType } from "@bj-nsc/msn";
|
|
7
|
+
declare type NscDataNodeProps = DataNode & {
|
|
8
|
+
props: {
|
|
9
|
+
dataref: any;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export interface NscTreeProps extends ITreePanelProps {
|
|
13
|
+
editable?: boolean;
|
|
14
|
+
treeData?: any[];
|
|
15
|
+
searchable?: boolean;
|
|
16
|
+
nodeProps?: TreeNodeProps;
|
|
17
|
+
}
|
|
18
|
+
declare class NscTree extends TreePanel<NscTreeProps & TreeCommonProps> {
|
|
19
|
+
nscTreeRef: React.RefObject<RcTree & TreeProps>;
|
|
20
|
+
constructor(props: any);
|
|
21
|
+
static defaultProps: {
|
|
22
|
+
store: {};
|
|
23
|
+
};
|
|
24
|
+
_dataToCheckedKeys(modelData: any): any;
|
|
25
|
+
/**
|
|
26
|
+
* 树搜索
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* 获取选中节点ID数组
|
|
30
|
+
* @return String[]
|
|
31
|
+
*/
|
|
32
|
+
getCheckedKeys(): import("rc-tree/lib/interface").Key[] | {
|
|
33
|
+
checked: import("rc-tree/lib/interface").Key[];
|
|
34
|
+
halfChecked: import("rc-tree/lib/interface").Key[];
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 获取选中节点对象数组
|
|
38
|
+
* @return node[]
|
|
39
|
+
*/
|
|
40
|
+
getCheckedNodes(): NscDataNodeProps[];
|
|
41
|
+
/**
|
|
42
|
+
* 获取全部选中节点ID,包含半选中节点ID
|
|
43
|
+
* @return String[]
|
|
44
|
+
*/
|
|
45
|
+
getCheckedAllKeys(): import("rc-tree/lib/interface").Key[];
|
|
46
|
+
/**
|
|
47
|
+
* 获取全部选中节点Node对象,包含半选中节点Node对象
|
|
48
|
+
* @return node[]
|
|
49
|
+
*/
|
|
50
|
+
getCheckedAllNodes(): any[];
|
|
51
|
+
handleAddModule: (node: any) => void;
|
|
52
|
+
handleEditModule: (node: any) => void;
|
|
53
|
+
handleDeleteModule: (node: any) => void;
|
|
54
|
+
_onLoadData: (treeNode: EventDataNode & {
|
|
55
|
+
props: {
|
|
56
|
+
dataref;
|
|
57
|
+
};
|
|
58
|
+
}) => Promise<void>;
|
|
59
|
+
renderTemplate(treeProps?: ITreePanelProps, newMenuDatas?: any[]): JSX.Element;
|
|
60
|
+
renderTreeNodes: (data: any, renderFn: any) => any;
|
|
61
|
+
}
|
|
62
|
+
export default NscTree;
|