This commit is contained in:
Vanessa 2023-06-26 23:17:44 +08:00
parent f6f04fd4c6
commit 1c08b5a7b8

View file

@ -872,7 +872,7 @@ export class Files extends Model {
liElement.insertAdjacentHTML("afterend", `<ul class="file-tree__sliderDown">${fileHTML}</ul>`); liElement.insertAdjacentHTML("afterend", `<ul class="file-tree__sliderDown">${fileHTML}</ul>`);
nextElement = liElement.nextElementSibling; nextElement = liElement.nextElementSibling;
setTimeout(() => { setTimeout(() => {
nextElement.setAttribute("style", `height:${nextElement.childElementCount * liElement.clientHeight}px;`); nextElement.setAttribute("style", `top: -1px;position: relative;height:${nextElement.childElementCount * (liElement.clientHeight + 1) - 1}px;`);
setTimeout(() => { setTimeout(() => {
this.element.querySelectorAll(".file-tree__sliderDown").forEach(item => { this.element.querySelectorAll(".file-tree__sliderDown").forEach(item => {
item.classList.remove("file-tree__sliderDown"); item.classList.remove("file-tree__sliderDown");