This commit is contained in:
parent
318dba9d27
commit
ecaded5b00
|
|
@ -110,7 +110,6 @@ export function DetailPageHeader({ data }: { data: any }) {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [statusText, setStatusText] = useState(data?.statusText || "加载中...");
|
const [statusText, setStatusText] = useState(data?.statusText || "加载中...");
|
||||||
|
|
||||||
// 模拟调用 API
|
|
||||||
const handleClick = async (source: "icon" | "info") => {
|
const handleClick = async (source: "icon" | "info") => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
setStatusText(source === "icon" ? "正在处理图标操作..." : "正在处理信息操作...");
|
setStatusText(source === "icon" ? "正在处理图标操作..." : "正在处理信息操作...");
|
||||||
|
|
@ -134,11 +133,10 @@ export function DetailPageHeader({ data }: { data: any }) {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="fixed top-0 left-0 w-full z-50 bg-white shadow-md">
|
<div className="sticky top-0 z-30 bg-white">
|
||||||
<div className="w-11/12 lg:w-2/3 xl:w-3/5 mx-auto py-4">
|
<div className="w-11/12 lg:w-2/3 xl:w-3/5 mx-auto py-4">
|
||||||
{/* 上方内容区域 */}
|
|
||||||
<div className="flex items-start space-x-6">
|
<div className="flex items-start space-x-6">
|
||||||
{/* 左侧图标区域 - 可点击 */}
|
{/* 左图标(可点) */}
|
||||||
<button
|
<button
|
||||||
className="flex items-center justify-center w-24 h-24 md:w-32 md:h-32 border rounded-md text-xl font-bold hover:bg-gray-100 transition"
|
className="flex items-center justify-center w-24 h-24 md:w-32 md:h-32 border rounded-md text-xl font-bold hover:bg-gray-100 transition"
|
||||||
onClick={() => handleClick("icon")}
|
onClick={() => handleClick("icon")}
|
||||||
|
|
@ -147,7 +145,7 @@ export function DetailPageHeader({ data }: { data: any }) {
|
||||||
{data?.icon || "Deploy"}
|
{data?.icon || "Deploy"}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{/* 右侧信息区域 - 可点击 */}
|
{/* 右信息区域(可点) */}
|
||||||
<div
|
<div
|
||||||
className="text-sm leading-7 space-y-1 cursor-pointer hover:bg-gray-50 p-2 rounded transition"
|
className="text-sm leading-7 space-y-1 cursor-pointer hover:bg-gray-50 p-2 rounded transition"
|
||||||
onClick={() => handleClick("info")}
|
onClick={() => handleClick("info")}
|
||||||
|
|
@ -159,7 +157,7 @@ export function DetailPageHeader({ data }: { data: any }) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 底部进度条或状态条 */}
|
{/* 状态条 */}
|
||||||
<div className="w-full mt-4 bg-gray-200 rounded-full h-6 overflow-hidden">
|
<div className="w-full mt-4 bg-gray-200 rounded-full h-6 overflow-hidden">
|
||||||
<div
|
<div
|
||||||
className="bg-blue-500 h-full text-white text-center text-sm flex items-center justify-center transition-all duration-300"
|
className="bg-blue-500 h-full text-white text-center text-sm flex items-center justify-center transition-all duration-300"
|
||||||
|
|
@ -173,6 +171,9 @@ export function DetailPageHeader({ data }: { data: any }) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// export function Header() {
|
// export function Header() {
|
||||||
|
|
||||||
// const router = useRouter();
|
// const router = useRouter();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue