色彩优化
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
||||
import {
|
||||
ArrowLeftOutlined,
|
||||
} from "@ant-design/icons";
|
||||
import { useNavigate, useParams, useLocation } from "react-router-dom";
|
||||
import { useNavigate, useParams,useSearchParams, useLocation } from "react-router-dom";
|
||||
import { supabase } from "@/config/supabase";
|
||||
import SectionList from '@/components/SectionList';
|
||||
|
||||
@@ -21,7 +21,9 @@ const { Title } = Typography;
|
||||
const ServiceForm = () => {
|
||||
const [form] = Form.useForm();
|
||||
const navigate = useNavigate();
|
||||
const { id } = useParams();
|
||||
const { id} = useParams();
|
||||
const [searchParams] = useSearchParams();
|
||||
const isView = searchParams.get("isView") === "true";
|
||||
const [loading, setLoading] = useState(false);
|
||||
const location = useLocation();
|
||||
const isEdit = location.search.includes("edit=true");
|
||||
@@ -136,7 +138,7 @@ const ServiceForm = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="bg-gradient-to-b from-gray-50 to-white min-h-screen p-6">
|
||||
<div className="bg-gradient-to-b from-gray-50 to-white min-h-screen p-2">
|
||||
<Card
|
||||
className="shadow-lg rounded-lg border-0"
|
||||
title={
|
||||
@@ -160,13 +162,13 @@ const ServiceForm = () => {
|
||||
>
|
||||
返回
|
||||
</Button>
|
||||
<Button
|
||||
{!isView&& <Button
|
||||
type="primary"
|
||||
onClick={() => form.submit()}
|
||||
loading={loading}
|
||||
>
|
||||
保存
|
||||
</Button>
|
||||
</Button>}
|
||||
</Space>
|
||||
</div>
|
||||
}
|
||||
@@ -176,8 +178,9 @@ const ServiceForm = () => {
|
||||
onFinish={onFinish}
|
||||
onValuesChange={handleValuesChange}
|
||||
layout="vertical"
|
||||
variant="filled"
|
||||
disabled={isView}
|
||||
>
|
||||
{/* 基本信息 */}
|
||||
<Card
|
||||
className="shadow-sm rounded-lg mb-6"
|
||||
type="inner"
|
||||
@@ -221,7 +224,6 @@ const ServiceForm = () => {
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
{/* 服务明细 */}
|
||||
<Card
|
||||
className="shadow-sm rounded-lg"
|
||||
type="inner"
|
||||
|
||||
Reference in New Issue
Block a user