This commit is contained in:
parent
d5df2dff49
commit
0493cf4a92
|
|
@ -766,18 +766,19 @@ export function DetailPageHeader({ data }: { data: any }) {
|
|||
</div>
|
||||
|
||||
{showProgressBar && (progress !== "0%" || statusText) && (
|
||||
<div className="relative w-full bg-gray-200 h-6 rounded">
|
||||
{/* 独立文字层 */}
|
||||
<div className="absolute right-2 top-1/2 -translate-y-1/2 text-sm font-medium text-black whitespace-nowrap">
|
||||
{loading ? "Processing..." : statusText}
|
||||
</div>
|
||||
|
||||
<div className="relative w-full bg-gray-200 h-6 rounded overflow-hidden">
|
||||
{/* 蓝色进度条 */}
|
||||
<div
|
||||
className={`${progressBarColor} h-full transition-all duration-300 rounded`}
|
||||
className={`${progressBarColor} h-full transition-all duration-300`}
|
||||
style={{ width: typeof progress === "string" ? progress : `${progress}%` }}
|
||||
/>
|
||||
|
||||
{/* 浮动在中间的文字层 */}
|
||||
<div className="absolute inset-0 flex items-center justify-center text-sm font-medium text-white">
|
||||
{loading ? "Processing..." : statusText}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
)}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue