This commit is contained in:
zengqiao
2020-12-19 00:40:52 +08:00
parent 49280a8617
commit 447a575f4f
83 changed files with 1578 additions and 559 deletions

View File

@@ -7,7 +7,7 @@ const Option = Select.Option;
interface IStaffSelectProps {
selectData?: any[];
onChange?: (result: string []) => any;
onChange?: (result: string[]) => any;
value?: string[];
}
@@ -21,7 +21,7 @@ export class AppSelect extends React.Component<IStaffSelectProps> {
<Select
placeholder="请选择"
value={value || []}
onChange={(e: string []) => this.handleChange(e)}
onChange={(e: string[]) => this.handleChange(e)}
{...searchProps}
>
{selectData.map((d: any) =>
@@ -29,16 +29,18 @@ export class AppSelect extends React.Component<IStaffSelectProps> {
{d.name.length > 25 ? <Tooltip placement="bottomLeft" title={d.name}>{d.name}</Tooltip> : d.name}
</Option>)}
</Select>
{
selectData.length ? null : <i>
{/* {
selectData.length ? null : */}
<i>
<a href={`${urlPrefix}/topic/app-list?${query}`}></a>
</i>}
</i>
{/* } */}
</>
);
}
public handleChange(params: string []) {
public handleChange(params: string[]) {
const { onChange } = this.props;
// tslint:disable-next-line:no-unused-expression
onChange && onChange(params);