This commit is contained in:
Vanessa 2023-10-22 20:03:19 +08:00
parent e34d1a1401
commit 221d3c1d7f
2 changed files with 2 additions and 0 deletions

View file

@ -256,6 +256,7 @@ export class Breadcrumb {
uploadMenu.querySelector("input").addEventListener("change", (event: InputEvent & {
target: HTMLInputElement
}) => {
console.log(event.target.files.length)
if (event.target.files.length === 0) {
return;
}

View file

@ -252,6 +252,7 @@ export const uploadFiles = (protyle: IProtyle, files: FileList | DataTransferIte
protyle.upload.isUploading = true;
xhr.onreadystatechange = () => {
console.log(xhr.readyState)
if (xhr.readyState === XMLHttpRequest.DONE) {
protyle.upload.isUploading = false;
if (!document.body.contains(protyle.element)) {