优化Search

master
LiuJiaNan 2025-10-31 15:40:17 +08:00
parent 2910073267
commit 349b844113
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
import { DownOutlined, UpOutlined } from "@ant-design/icons";
import { DownOutlined, SearchOutlined, UndoOutlined, UpOutlined } from "@ant-design/icons";
import { Button, Col, Form, Row } from "antd";
import { useEffect, useRef, useState } from "react";
import FormItemsRenderer from "../FormBuilder/FormItemsRenderer";
@ -87,14 +87,14 @@ const Search = (props) => {
initialValues={values}
/>
<Col span={showCollapseButton ? (collapse ? 6 : span) : span}>
<Form.Item label=" " colon={false} style={{ textAlign: "right" }}>
<Form.Item label=" " labelCol={{ span: 2 }} colon={false} style={{ textAlign: "right" }}>
{showSearchButton && (
<Button type="primary" onClick={handleSubmit}>
<Button type="primary" icon={<SearchOutlined />} onClick={handleSubmit}>
{searchText}
</Button>
)}
{showResetButton && (
<Button style={{ marginLeft: 8 }} onClick={handleReset}>
<Button style={{ marginLeft: 8 }} icon={<UndoOutlined />} onClick={handleReset}>
{resetText}
</Button>
)}

View File

@ -1,6 +1,6 @@
import { message, Modal } from "antd";
import { getFileName, getFileSuffix, getFileUrl } from "../../utils/index.js";
import { useState } from "react";
import { getFileName, getFileSuffix, getFileUrl } from "../../utils";
/**
* 下载文件