Vanessa 2022-12-08 21:53:07 +08:00
parent 2e15fbf098
commit 28957d3ba6
3 changed files with 9 additions and 21 deletions

View file

@ -852,21 +852,6 @@ export class Files extends Model {
liElement.insertAdjacentHTML("afterend", `<ul>${fileHTML}</ul>`);
this.setCurrent(this.element.querySelector(`ul[data-url="${data.box}"] li[data-path="${filePath}"]`));
}
/**
*
* @param filePath
* @returns
*/
public isSelected(filePath: string): boolean {
if(!filePath) {
return false;
}
const target = this.element.querySelector(`li[data-path="${filePath}"]`);
if(target) {
return target.classList.contains("b3-list-item--focus");
}
return false;
}
private setCurrent(target: HTMLElement, isScroll = true) {
if (!target) {