|
@@ -37,6 +37,7 @@ import {
|
|
} from "@/store/action/B2Goods";
|
|
} from "@/store/action/B2Goods";
|
|
import { baseURL } from "@/utils/http";
|
|
import { baseURL } from "@/utils/http";
|
|
import { FileListType, GoodsTableType } from "@/types";
|
|
import { FileListType, GoodsTableType } from "@/types";
|
|
|
|
+import { domShowFu, progressDomFu } from "@/utils/domShow";
|
|
|
|
|
|
type Props = {
|
|
type Props = {
|
|
id: number;
|
|
id: number;
|
|
@@ -45,10 +46,6 @@ type Props = {
|
|
editListFu: () => void;
|
|
editListFu: () => void;
|
|
};
|
|
};
|
|
|
|
|
|
-// 上传附件的进度条
|
|
|
|
-const UpAsyncLodingDom: any = document.querySelector("#UpAsyncLoding");
|
|
|
|
-const progressDom: any = document.querySelector("#progress");
|
|
|
|
-
|
|
|
|
function GoodsAdd({ id, closeMoalFu, addListFu, editListFu }: Props) {
|
|
function GoodsAdd({ id, closeMoalFu, addListFu, editListFu }: Props) {
|
|
// 后面添加的的知识驿站
|
|
// 后面添加的的知识驿站
|
|
const [valueZS1, setValueZS1] = useState("");
|
|
const [valueZS1, setValueZS1] = useState("");
|
|
@@ -146,10 +143,8 @@ function GoodsAdd({ id, closeMoalFu, addListFu, editListFu }: Props) {
|
|
MessageFu.success("上传成功!");
|
|
MessageFu.success("上传成功!");
|
|
setCover(res.data.filePath);
|
|
setCover(res.data.filePath);
|
|
}
|
|
}
|
|
- UpAsyncLodingDom.style.opacity = 0;
|
|
|
|
- UpAsyncLodingDom.style.pointerEvents = "none";
|
|
|
|
-
|
|
|
|
- progressDom.style.width = "0%";
|
|
|
|
|
|
+ domShowFu("#UpAsyncLoding", false);
|
|
|
|
+ progressDomFu("0%");
|
|
}
|
|
}
|
|
},
|
|
},
|
|
[dirCode]
|
|
[dirCode]
|
|
@@ -280,9 +275,8 @@ function GoodsAdd({ id, closeMoalFu, addListFu, editListFu }: Props) {
|
|
setFileList({ ...fileList, img: [res.data, ...fileList.img] });
|
|
setFileList({ ...fileList, img: [res.data, ...fileList.img] });
|
|
else setFileList({ ...fileList, [fileOneType]: res.data });
|
|
else setFileList({ ...fileList, [fileOneType]: res.data });
|
|
}
|
|
}
|
|
- UpAsyncLodingDom.style.opacity = 0;
|
|
|
|
- UpAsyncLodingDom.style.pointerEvents = "none";
|
|
|
|
- progressDom.style.width = "0%";
|
|
|
|
|
|
+ domShowFu("#UpAsyncLoding", false);
|
|
|
|
+ progressDomFu("0%");
|
|
}
|
|
}
|
|
},
|
|
},
|
|
[dirCode, fileList, fileOneType]
|
|
[dirCode, fileList, fileOneType]
|