新增icon组件

master
LiuJiaNan 2025-10-31 16:47:09 +08:00
parent 9256bf4e8f
commit 73c07f794a
17 changed files with 125 additions and 3 deletions

6
components/Icon/AddIcon/index.d.ts vendored Normal file
View File

@ -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;

View File

@ -0,0 +1,9 @@
import { PlusOutlined } from "@ant-design/icons";
const AddIcon = props => (
<PlusOutlined {...props} />
);
AddIcon.displayName = "AddIcon";
export default AddIcon;

6
components/Icon/DeleteIcon/index.d.ts vendored Normal file
View File

@ -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;

View File

@ -0,0 +1,9 @@
import { DeleteOutlined } from "@ant-design/icons";
const DeleteIcon = props => (
<DeleteOutlined {...props} />
);
DeleteIcon.displayName = "DeleteIcon";
export default DeleteIcon;

6
components/Icon/EditIcon/index.d.ts vendored Normal file
View File

@ -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;

View File

@ -0,0 +1,9 @@
import { EditOutlined } from "@ant-design/icons";
const EditIcon = props => (
<EditOutlined {...props} />
);
EditIcon.displayName = "EditIcon";
export default EditIcon;

6
components/Icon/ExportIcon/index.d.ts vendored Normal file
View File

@ -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;

View File

@ -0,0 +1,9 @@
import { DownloadOutlined } from "@ant-design/icons";
const ExportIcon = props => (
<DownloadOutlined {...props} />
);
ExportIcon.displayName = "ExportIcon";
export default ExportIcon;

6
components/Icon/ImportIcon/index.d.ts vendored Normal file
View File

@ -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;

View File

@ -0,0 +1,9 @@
import { UploadOutlined } from "@ant-design/icons";
const ImportIcon = props => (
<UploadOutlined {...props} />
);
ImportIcon.displayName = "ImportIcon";
export default ImportIcon;

6
components/Icon/ResetIcon/index.d.ts vendored Normal file
View File

@ -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;

View File

@ -0,0 +1,9 @@
import { UndoOutlined } from "@ant-design/icons";
const ResetIcon = props => (
<UndoOutlined {...props} />
);
ResetIcon.displayName = "ResetIcon";
export default ResetIcon;

6
components/Icon/SearchIcon/index.d.ts vendored Normal file
View File

@ -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;

View File

@ -0,0 +1,9 @@
import { PlusOutlined } from "@ant-design/icons";
const SearchIcon = props => (
<PlusOutlined {...props} />
);
SearchIcon.displayName = "SearchIcon";
export default SearchIcon;

6
components/Icon/ViewIcon/index.d.ts vendored Normal file
View File

@ -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;

View File

@ -0,0 +1,9 @@
import { EyeOutlined } from "@ant-design/icons";
const ViewIcon = props => (
<EyeOutlined {...props} />
);
ViewIcon.displayName = "ViewIcon";
export default ViewIcon;

View File

@ -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 { useEffect, useRef, useState } from "react";
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}>
<Form.Item label=" " labelCol={{ span: 2 }} colon={false} style={{ textAlign: "right" }}>
{showSearchButton && (
<Button type="primary" icon={<SearchOutlined />} onClick={handleSubmit}>
<Button type="primary" icon={<SearchIcon />} onClick={handleSubmit}>
{searchText}
</Button>
)}
{showResetButton && (
<Button style={{ marginLeft: 8 }} icon={<UndoOutlined />} onClick={handleReset}>
<Button style={{ marginLeft: 8 }} icon={<ResetIcon />} onClick={handleReset}>
{resetText}
</Button>
)}