新增icon组件
parent
9256bf4e8f
commit
73c07f794a
|
|
@ -0,0 +1,6 @@
|
||||||
|
import type { AntdIconProps } from "@ant-design/icons/lib/components/AntdIcon";
|
||||||
|
import type { FC } from "react";
|
||||||
|
|
||||||
|
declare const AddIcon: FC<AntdIconProps>;
|
||||||
|
|
||||||
|
export default AddIcon;
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { PlusOutlined } from "@ant-design/icons";
|
||||||
|
|
||||||
|
const AddIcon = props => (
|
||||||
|
<PlusOutlined {...props} />
|
||||||
|
);
|
||||||
|
|
||||||
|
AddIcon.displayName = "AddIcon";
|
||||||
|
|
||||||
|
export default AddIcon;
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
import type { AntdIconProps } from "@ant-design/icons/lib/components/AntdIcon";
|
||||||
|
import type { FC } from "react";
|
||||||
|
|
||||||
|
declare const DeleteIcon: FC<AntdIconProps>;
|
||||||
|
|
||||||
|
export default DeleteIcon;
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { DeleteOutlined } from "@ant-design/icons";
|
||||||
|
|
||||||
|
const DeleteIcon = props => (
|
||||||
|
<DeleteOutlined {...props} />
|
||||||
|
);
|
||||||
|
|
||||||
|
DeleteIcon.displayName = "DeleteIcon";
|
||||||
|
|
||||||
|
export default DeleteIcon;
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
import type { AntdIconProps } from "@ant-design/icons/lib/components/AntdIcon";
|
||||||
|
import type { FC } from "react";
|
||||||
|
|
||||||
|
declare const EditIcon: FC<AntdIconProps>;
|
||||||
|
|
||||||
|
export default EditIcon;
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { EditOutlined } from "@ant-design/icons";
|
||||||
|
|
||||||
|
const EditIcon = props => (
|
||||||
|
<EditOutlined {...props} />
|
||||||
|
);
|
||||||
|
|
||||||
|
EditIcon.displayName = "EditIcon";
|
||||||
|
|
||||||
|
export default EditIcon;
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
import type { AntdIconProps } from "@ant-design/icons/lib/components/AntdIcon";
|
||||||
|
import type { FC } from "react";
|
||||||
|
|
||||||
|
declare const ExportIcon: FC<AntdIconProps>;
|
||||||
|
|
||||||
|
export default ExportIcon;
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { DownloadOutlined } from "@ant-design/icons";
|
||||||
|
|
||||||
|
const ExportIcon = props => (
|
||||||
|
<DownloadOutlined {...props} />
|
||||||
|
);
|
||||||
|
|
||||||
|
ExportIcon.displayName = "ExportIcon";
|
||||||
|
|
||||||
|
export default ExportIcon;
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
import type { AntdIconProps } from "@ant-design/icons/lib/components/AntdIcon";
|
||||||
|
import type { FC } from "react";
|
||||||
|
|
||||||
|
declare const ImportIcon: FC<AntdIconProps>;
|
||||||
|
|
||||||
|
export default ImportIcon;
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { UploadOutlined } from "@ant-design/icons";
|
||||||
|
|
||||||
|
const ImportIcon = props => (
|
||||||
|
<UploadOutlined {...props} />
|
||||||
|
);
|
||||||
|
|
||||||
|
ImportIcon.displayName = "ImportIcon";
|
||||||
|
|
||||||
|
export default ImportIcon;
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
import type { AntdIconProps } from "@ant-design/icons/lib/components/AntdIcon";
|
||||||
|
import type { FC } from "react";
|
||||||
|
|
||||||
|
declare const ResetIcon: FC<AntdIconProps>;
|
||||||
|
|
||||||
|
export default ResetIcon;
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { UndoOutlined } from "@ant-design/icons";
|
||||||
|
|
||||||
|
const ResetIcon = props => (
|
||||||
|
<UndoOutlined {...props} />
|
||||||
|
);
|
||||||
|
|
||||||
|
ResetIcon.displayName = "ResetIcon";
|
||||||
|
|
||||||
|
export default ResetIcon;
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
import type { AntdIconProps } from "@ant-design/icons/lib/components/AntdIcon";
|
||||||
|
import type { FC } from "react";
|
||||||
|
|
||||||
|
declare const SearchIcon: FC<AntdIconProps>;
|
||||||
|
|
||||||
|
export default SearchIcon;
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { PlusOutlined } from "@ant-design/icons";
|
||||||
|
|
||||||
|
const SearchIcon = props => (
|
||||||
|
<PlusOutlined {...props} />
|
||||||
|
);
|
||||||
|
|
||||||
|
SearchIcon.displayName = "SearchIcon";
|
||||||
|
|
||||||
|
export default SearchIcon;
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
import type { AntdIconProps } from "@ant-design/icons/lib/components/AntdIcon";
|
||||||
|
import type { FC } from "react";
|
||||||
|
|
||||||
|
declare const ViewIcon: FC<AntdIconProps>;
|
||||||
|
|
||||||
|
export default ViewIcon;
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { EyeOutlined } from "@ant-design/icons";
|
||||||
|
|
||||||
|
const ViewIcon = props => (
|
||||||
|
<EyeOutlined {...props} />
|
||||||
|
);
|
||||||
|
|
||||||
|
ViewIcon.displayName = "ViewIcon";
|
||||||
|
|
||||||
|
export default ViewIcon;
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import { DownOutlined, SearchOutlined, UndoOutlined, UpOutlined } from "@ant-design/icons";
|
import { DownOutlined, UpOutlined } from "@ant-design/icons";
|
||||||
import { Button, Col, Form, Row } from "antd";
|
import { Button, Col, Form, Row } from "antd";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import FormItemsRenderer from "../FormBuilder/FormItemsRenderer";
|
import FormItemsRenderer from "../FormBuilder/FormItemsRenderer";
|
||||||
|
import ResetIcon from "../Icon/ResetIcon";
|
||||||
|
import SearchIcon from "../Icon/SearchIcon";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索表单组件
|
* 搜索表单组件
|
||||||
|
|
@ -89,12 +91,12 @@ const Search = (props) => {
|
||||||
<Col span={showCollapseButton ? (collapse ? 6 : span) : span}>
|
<Col span={showCollapseButton ? (collapse ? 6 : span) : span}>
|
||||||
<Form.Item label=" " labelCol={{ span: 2 }} colon={false} style={{ textAlign: "right" }}>
|
<Form.Item label=" " labelCol={{ span: 2 }} colon={false} style={{ textAlign: "right" }}>
|
||||||
{showSearchButton && (
|
{showSearchButton && (
|
||||||
<Button type="primary" icon={<SearchOutlined />} onClick={handleSubmit}>
|
<Button type="primary" icon={<SearchIcon />} onClick={handleSubmit}>
|
||||||
{searchText}
|
{searchText}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{showResetButton && (
|
{showResetButton && (
|
||||||
<Button style={{ marginLeft: 8 }} icon={<UndoOutlined />} onClick={handleReset}>
|
<Button style={{ marginLeft: 8 }} icon={<ResetIcon />} onClick={handleReset}>
|
||||||
{resetText}
|
{resetText}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue