增加IndustrySelectTree和IndustryCascader
parent
e2298ec8f2
commit
79e6a81ab0
|
|
@ -0,0 +1,17 @@
|
||||||
|
import type { FC } from "react";
|
||||||
|
import type { BasicCascaderProps } from "../Basic";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件属性
|
||||||
|
*/
|
||||||
|
export interface IndustryCascaderProps extends Omit<BasicCascaderProps, "options" | "placeholder" | "nameKey" | "idKey" | "childrenKey"> {
|
||||||
|
/** 占位符,默认为"行业类型" */
|
||||||
|
placeholder?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行业类型级联组件
|
||||||
|
*/
|
||||||
|
declare const IndustryCascader: FC<IndustryCascaderProps>;
|
||||||
|
|
||||||
|
export default IndustryCascader;
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
import Industry from "../../../json/industry.json";
|
||||||
|
import BasicCascader from "../Basic";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行业类型级联组件
|
||||||
|
*/
|
||||||
|
function IndustryCascader(props) {
|
||||||
|
const {
|
||||||
|
placeholder = "行业类型",
|
||||||
|
...restProps
|
||||||
|
} = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<BasicCascader data={Industry} placeholder={placeholder} nameKey="dict_label" idKey="dict_value" childrenKey="childrenList" {...restProps} />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
IndustryCascader.displayName = "IndustryCascader";
|
||||||
|
|
||||||
|
export default IndustryCascader;
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
import type { FC } from "react";
|
||||||
|
import type { BasicSelectTreeProps } from "../Basic";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件属性
|
||||||
|
*/
|
||||||
|
export interface IndustrySelectTreeProps extends Omit<BasicSelectTreeProps, "treeData" | "placeholder" | "nameKey" | "idKey" | "childrenKey"> {
|
||||||
|
/** 占位符,默认"行业类型" */
|
||||||
|
placeholder?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行业类型下拉树组件
|
||||||
|
*/
|
||||||
|
declare const IndustrySelectTree: FC<IndustrySelectTreeProps>;
|
||||||
|
|
||||||
|
export default IndustrySelectTree;
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
import Industry from "../../../json/industry.json";
|
||||||
|
import BasicSelectTree from "../Basic";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行业类型下拉树组件
|
||||||
|
*/
|
||||||
|
function IndustrySelectTree(props) {
|
||||||
|
const {
|
||||||
|
placeholder = "行业类型",
|
||||||
|
...restProps
|
||||||
|
} = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<BasicSelectTree
|
||||||
|
treeData={Industry}
|
||||||
|
placeholder={placeholder}
|
||||||
|
nameKey="dict_label"
|
||||||
|
idKey="dict_value"
|
||||||
|
childrenKey="childrenList"
|
||||||
|
{...restProps}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
IndustrySelectTree.displayName = "IndustrySelectTree";
|
||||||
|
|
||||||
|
export default IndustrySelectTree;
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue