nsc-react-component 1.0.23 → 1.0.24
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 +6 -6
- 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 +21 -21
- 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/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 +12 -12
- package/package.json +1 -1
- package/.vscode/launch.json +0 -15
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;
|
package/lib/treeUtils.d.ts
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 获取面包屑映射
|
|
3
|
-
* {
|
|
4
|
-
* key1:{paths:['key1'],title:'系统管理'}
|
|
5
|
-
* key2:{paths:['key1','key2'],title:'功能配置'}
|
|
6
|
-
* key3:{paths:['key1','key2','key3'],title:'菜单管理',path:'/platform/menu'}
|
|
7
|
-
* }
|
|
8
|
-
* @param {object[]} menuDatas 树形结构数据
|
|
9
|
-
* @param {Object} fieldOption 关键字段名称,缺省{ keyField: 'key', titleField: 'title',pathsField:'paths' }
|
|
10
|
-
* @returns {Map}
|
|
11
|
-
*/
|
|
12
|
-
export declare function getBreadcrumbMap(menuDatas: any, fieldOption?: {
|
|
13
|
-
keyField: string;
|
|
14
|
-
titleField: string;
|
|
15
|
-
pathsField: string;
|
|
16
|
-
}): {};
|
|
17
|
-
/**
|
|
18
|
-
* 判断菜单Map对象中符合条件的对象
|
|
19
|
-
* key1:{paths:['key1'],title:'系统管理'}
|
|
20
|
-
* key2:{paths:['key1','key2'],title:'功能配置'}
|
|
21
|
-
* key3:{paths:['key1','key2','key3'],title:'菜单管理',path:'/platform/menu'}
|
|
22
|
-
* 搜索《管理》后返回
|
|
23
|
-
* {key1:'key1',key2:'key2',key3:'key3'}
|
|
24
|
-
* @param {Map<String,Object>} breadcrumbMap 菜单面包屑
|
|
25
|
-
* @param { String } searchText 搜索内容
|
|
26
|
-
* @param {Object} fieldOption 关键字段名称,缺省{ keyField: 'key', titleField: 'title',pathsField:'paths' }
|
|
27
|
-
* @returns {Map<String,String>}
|
|
28
|
-
*/
|
|
29
|
-
export declare function getEffectiveNodeKeys(breadcrumbMap: any, searchText: any, fieldOption?: {
|
|
30
|
-
keyField: string;
|
|
31
|
-
titleField: string;
|
|
32
|
-
pathsField: string;
|
|
33
|
-
}): {};
|
|
34
|
-
/**
|
|
35
|
-
* 获取过滤后显示的菜单数据
|
|
36
|
-
* @param {Object[]} menusDatas 树形结构数据
|
|
37
|
-
* @param {String[]} keys 有效的菜单节点
|
|
38
|
-
* @param {String} searchText 搜索内容,非必填
|
|
39
|
-
* @param {Object} fieldOption 关键字段名称,缺省{ keyField: 'key', titleField: 'title',pathsField:'paths' }
|
|
40
|
-
* @param {String} color 搜索内容重点颜色标识,非必填,缺省red
|
|
41
|
-
*/
|
|
42
|
-
export declare function getEffectiveMenuDatas(menusDatas: any, keys: any, searchText: any, fieldOption?: {
|
|
43
|
-
keyField: string;
|
|
44
|
-
titleField: string;
|
|
45
|
-
pathsField: string;
|
|
46
|
-
}, color?: string): any;
|
|
47
|
-
/**
|
|
48
|
-
* 搜索菜单数据,移除不符合的菜单和不需要的目录结构,缺省符合内容标红
|
|
49
|
-
* @param {Object} thiz menu菜单对象,缓存时候存储数据使用
|
|
50
|
-
* @param {String} searchText 搜索内容
|
|
51
|
-
* @param {Object} fieldOption 关键字段名称,缺省{ keyField: 'key', titleField: 'title',pathsField:'paths' }
|
|
52
|
-
* @param {String} color 搜索内容重点颜色标识,非必填,缺省red,当false时候,且不重点标注颜色
|
|
53
|
-
* @param {String} cachekey 缓存数据存储key,缺省nsc_menu_cache
|
|
54
|
-
* @returns {*} {openKeys:{},treeDatas:[]}
|
|
55
|
-
*/
|
|
56
|
-
export declare function getSearchMenuDatas(thiz: any, searchText: any, fieldOption?: {
|
|
57
|
-
keyField: string;
|
|
58
|
-
titleField: string;
|
|
59
|
-
pathsField: string;
|
|
60
|
-
}, color?: string, cachekey?: string): {
|
|
61
|
-
openKeys: any[];
|
|
62
|
-
treeDatas: any;
|
|
63
|
-
};
|
|
64
|
-
declare const _default: {
|
|
65
|
-
getBreadcrumbMap: typeof getBreadcrumbMap;
|
|
66
|
-
getEffectiveNodeKeys: typeof getEffectiveNodeKeys;
|
|
67
|
-
getEffectiveMenuDatas: typeof getEffectiveMenuDatas;
|
|
68
|
-
getSearchMenuDatas: typeof getSearchMenuDatas;
|
|
69
|
-
};
|
|
70
|
-
export default _default;
|
|
1
|
+
/**
|
|
2
|
+
* 获取面包屑映射
|
|
3
|
+
* {
|
|
4
|
+
* key1:{paths:['key1'],title:'系统管理'}
|
|
5
|
+
* key2:{paths:['key1','key2'],title:'功能配置'}
|
|
6
|
+
* key3:{paths:['key1','key2','key3'],title:'菜单管理',path:'/platform/menu'}
|
|
7
|
+
* }
|
|
8
|
+
* @param {object[]} menuDatas 树形结构数据
|
|
9
|
+
* @param {Object} fieldOption 关键字段名称,缺省{ keyField: 'key', titleField: 'title',pathsField:'paths' }
|
|
10
|
+
* @returns {Map}
|
|
11
|
+
*/
|
|
12
|
+
export declare function getBreadcrumbMap(menuDatas: any, fieldOption?: {
|
|
13
|
+
keyField: string;
|
|
14
|
+
titleField: string;
|
|
15
|
+
pathsField: string;
|
|
16
|
+
}): {};
|
|
17
|
+
/**
|
|
18
|
+
* 判断菜单Map对象中符合条件的对象
|
|
19
|
+
* key1:{paths:['key1'],title:'系统管理'}
|
|
20
|
+
* key2:{paths:['key1','key2'],title:'功能配置'}
|
|
21
|
+
* key3:{paths:['key1','key2','key3'],title:'菜单管理',path:'/platform/menu'}
|
|
22
|
+
* 搜索《管理》后返回
|
|
23
|
+
* {key1:'key1',key2:'key2',key3:'key3'}
|
|
24
|
+
* @param {Map<String,Object>} breadcrumbMap 菜单面包屑
|
|
25
|
+
* @param { String } searchText 搜索内容
|
|
26
|
+
* @param {Object} fieldOption 关键字段名称,缺省{ keyField: 'key', titleField: 'title',pathsField:'paths' }
|
|
27
|
+
* @returns {Map<String,String>}
|
|
28
|
+
*/
|
|
29
|
+
export declare function getEffectiveNodeKeys(breadcrumbMap: any, searchText: any, fieldOption?: {
|
|
30
|
+
keyField: string;
|
|
31
|
+
titleField: string;
|
|
32
|
+
pathsField: string;
|
|
33
|
+
}): {};
|
|
34
|
+
/**
|
|
35
|
+
* 获取过滤后显示的菜单数据
|
|
36
|
+
* @param {Object[]} menusDatas 树形结构数据
|
|
37
|
+
* @param {String[]} keys 有效的菜单节点
|
|
38
|
+
* @param {String} searchText 搜索内容,非必填
|
|
39
|
+
* @param {Object} fieldOption 关键字段名称,缺省{ keyField: 'key', titleField: 'title',pathsField:'paths' }
|
|
40
|
+
* @param {String} color 搜索内容重点颜色标识,非必填,缺省red
|
|
41
|
+
*/
|
|
42
|
+
export declare function getEffectiveMenuDatas(menusDatas: any, keys: any, searchText: any, fieldOption?: {
|
|
43
|
+
keyField: string;
|
|
44
|
+
titleField: string;
|
|
45
|
+
pathsField: string;
|
|
46
|
+
}, color?: string): any;
|
|
47
|
+
/**
|
|
48
|
+
* 搜索菜单数据,移除不符合的菜单和不需要的目录结构,缺省符合内容标红
|
|
49
|
+
* @param {Object} thiz menu菜单对象,缓存时候存储数据使用
|
|
50
|
+
* @param {String} searchText 搜索内容
|
|
51
|
+
* @param {Object} fieldOption 关键字段名称,缺省{ keyField: 'key', titleField: 'title',pathsField:'paths' }
|
|
52
|
+
* @param {String} color 搜索内容重点颜色标识,非必填,缺省red,当false时候,且不重点标注颜色
|
|
53
|
+
* @param {String} cachekey 缓存数据存储key,缺省nsc_menu_cache
|
|
54
|
+
* @returns {*} {openKeys:{},treeDatas:[]}
|
|
55
|
+
*/
|
|
56
|
+
export declare function getSearchMenuDatas(thiz: any, searchText: any, fieldOption?: {
|
|
57
|
+
keyField: string;
|
|
58
|
+
titleField: string;
|
|
59
|
+
pathsField: string;
|
|
60
|
+
}, color?: string, cachekey?: string): {
|
|
61
|
+
openKeys: any[];
|
|
62
|
+
treeDatas: any;
|
|
63
|
+
};
|
|
64
|
+
declare const _default: {
|
|
65
|
+
getBreadcrumbMap: typeof getBreadcrumbMap;
|
|
66
|
+
getEffectiveNodeKeys: typeof getEffectiveNodeKeys;
|
|
67
|
+
getEffectiveMenuDatas: typeof getEffectiveMenuDatas;
|
|
68
|
+
getSearchMenuDatas: typeof getSearchMenuDatas;
|
|
69
|
+
};
|
|
70
|
+
export default _default;
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { encrypt } from "./Interface";
|
|
2
|
-
export declare function encryptValue(encrypt: encrypt | boolean, value: any): any;
|
|
3
|
-
export declare function decryptValue(decrypt: encrypt | boolean, value: any): any;
|
|
4
|
-
export declare function checkModel(checktype: any, value: any): any;
|
|
5
|
-
export declare function getCacheKey(sotre: any): any;
|
|
6
|
-
declare const _default: {
|
|
7
|
-
encryptValue: typeof encryptValue;
|
|
8
|
-
checkModel: typeof checkModel;
|
|
9
|
-
decryptValue: typeof decryptValue;
|
|
10
|
-
getCacheKey: typeof getCacheKey;
|
|
11
|
-
};
|
|
12
|
-
export default _default;
|
|
1
|
+
import { encrypt } from "./Interface";
|
|
2
|
+
export declare function encryptValue(encrypt: encrypt | boolean, value: any): any;
|
|
3
|
+
export declare function decryptValue(decrypt: encrypt | boolean, value: any): any;
|
|
4
|
+
export declare function checkModel(checktype: any, value: any): any;
|
|
5
|
+
export declare function getCacheKey(sotre: any): any;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
encryptValue: typeof encryptValue;
|
|
8
|
+
checkModel: typeof checkModel;
|
|
9
|
+
decryptValue: typeof decryptValue;
|
|
10
|
+
getCacheKey: typeof getCacheKey;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
package/package.json
CHANGED
package/.vscode/launch.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// 使用 IntelliSense 了解相关属性。
|
|
3
|
-
// 悬停以查看现有属性的描述。
|
|
4
|
-
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"type": "pwa-chrome",
|
|
9
|
-
"request": "launch",
|
|
10
|
-
"name": "Launch Chrome against localhost",
|
|
11
|
-
"url": "http://localhost:8080",
|
|
12
|
-
"webRoot": "${workspaceFolder}"
|
|
13
|
-
}
|
|
14
|
-
]
|
|
15
|
-
}
|