This commit is contained in:
parent
d5df2dff49
commit
0493cf4a92
|
|
@ -766,18 +766,19 @@ export function DetailPageHeader({ data }: { data: any }) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{showProgressBar && (progress !== "0%" || statusText) && (
|
{showProgressBar && (progress !== "0%" || statusText) && (
|
||||||
<div className="relative w-full bg-gray-200 h-6 rounded">
|
<div className="relative w-full bg-gray-200 h-6 rounded overflow-hidden">
|
||||||
{/* 独立文字层 */}
|
|
||||||
<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
|
<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}%` }}
|
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>
|
||||||
|
</div>
|
||||||
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue