📝: 📝: 删除低分辨率下 side 隐藏的问题

This commit is contained in:
就眠儀式 2022-04-29 01:17:46 +08:00
parent 48fedd2174
commit ab40116673

View File

@ -185,18 +185,18 @@ const localUploadTransaction = (option: localUploadTransaction) => {
formData.append("file[" + i + "]", _file); formData.append("file[" + i + "]", _file);
} }
} }
// Uploaddata, // Uploaddata,
if (props.data && props.data instanceof Object) { if (props.data && props.data instanceof Object) {
let _requestDate = props.data; let _requestDate = props.data;
for (const key in _requestDate) { for (const key in _requestDate) {
formData.append(key, _requestDate[key]); formData.append(key, _requestDate[key]);
} }
} }
let utimer = window.setTimeout(() => { let utimer = window.setTimeout(() => {
localUpload({ url, formData }, function () { localUpload({ url, formData }, function () {
clearTimeout(utimer); clearTimeout(utimer);
}); });
}, 200); }, 200);
}; };
// //
@ -240,21 +240,29 @@ const localUpload = (option: localUploadOption, callback: Function) => {
// //
let currentTimeStamp = new Date().valueOf(); let currentTimeStamp = new Date().valueOf();
if (xhr.readyState === 1) { if (xhr.readyState === 1) {
if ((xhr.status >= 200 && xhr.status <= 300) || xhr.status === 304||xhr.status == 0) { if (
(xhr.status >= 200 && xhr.status <= 300) ||
xhr.status === 304 ||
xhr.status == 0
) {
let successText = "上传开始"; let successText = "上传开始";
emit( emit(
"before", "before",
Object.assign({ currentTimeStamp, msg: successText, ...option }) Object.assign({ currentTimeStamp, msg: successText, ...option })
); );
} }
}else if(xhr.readyState === 4){ } else if (xhr.readyState === 4) {
// //
let successText = xhr.responseText ? xhr.responseText : uploadSuccess; let successText = xhr.responseText ? xhr.responseText : uploadSuccess;
console.log(xhr); console.log(xhr);
if((xhr.status >= 200 && xhr.status <= 300) || xhr.status === 304||xhr.status == 0){ if (
let data = xhr.responseText; (xhr.status >= 200 && xhr.status <= 300) ||
emit("done", {currentTimeStamp,msg:successText,data:data}); xhr.status === 304 ||
} xhr.status == 0
) {
let data = xhr.responseText;
emit("done", { currentTimeStamp, msg: successText, data: data });
}
} }
}; };
xhr.open("post", url, true); //GET, getURL xhr.open("post", url, true); //GET, getURL
@ -346,7 +354,7 @@ const commonUploadTransaction = (_files: any[]) => {
files: _files, files: _files,
}); });
} else { } else {
emit("done", {currentTimeStamp,msg:successText,data:_files}); emit("done", { currentTimeStamp, msg: successText, data: _files });
} }
}; };
const chooseFile = () => { const chooseFile = () => {