Browse Source

优化样式

feat_upload_server_url_0416
LiLongLong 4 months ago
parent
commit
a34121ba14
  1. 6
      src/components/sync.scss
  2. 12
      src/components/syncData.tsx

6
src/components/sync.scss

@ -0,0 +1,6 @@
.custom-progress .ant-progress-text {
color: "red";
}
.ant-progress-text{
color: "red";
}

12
src/components/syncData.tsx

@ -1,6 +1,6 @@
import { useState, useEffect } from "react";
import { Progress } from "antd";
import "./bluetooth.scss";
import "./sync.scss";
import { update } from "../services/ktj/org";
export default function SyncData(props:{isShowModal:boolean, closeModal:Function}) {
//同步科天健基础数据
@ -22,7 +22,7 @@ export default function SyncData(props:{isShowModal:boolean, closeModal:Function
useEffect(() => {
const intervalId = setInterval(() => {
if (percent < 100) {
const randomIncrement = Math.floor(Math.random() * 5) + 1;
const randomIncrement = Math.floor(Math.random() * 3) + 1;
const newProgress = Math.min(percent + randomIncrement, 100);
setPercent(newProgress);
} else {
@ -39,7 +39,7 @@ export default function SyncData(props:{isShowModal:boolean, closeModal:Function
const styleObj:any = {
position: "absolute",
margintop: "-200px",
marginTop: "-200px",
color: "#0051b9",
fontSize: "20px"
}
@ -48,11 +48,11 @@ export default function SyncData(props:{isShowModal:boolean, closeModal:Function
<>
<div
className="fixed inset-0 bg-red opacity-50 z-50 cursor-pointer flex justify-center items-center" style={{background:"#efefef"}}
className="fixed inset-0 bg-red opacity-50 z-50 cursor-pointer flex justify-center items-center" style={{background:"#202020"}}
>
<div className="flex w-[60vw] justify-center items-center margin-auto">
<div style={styleObj}></div>
<Progress type="circle" percent={percent} style={{color:"#3796e4"}}/>
<div className="flex w-[60vw] justify-center items-center margin-auto">
<Progress type="circle" format={(percent) => <span style={{ color: '#0051b9' }}>{percent}%</span>} percent={percent}/>
</div>
</div>
</>

Loading…
Cancel
Save