chore: Update mount parameter type in Danmuku and Setting classes

This commit is contained in:
Harvey Zack committed 2024-05-27 17:27:55 +08:00
1 parent 27284099d7
commit 7ed2f58e6a
5 files changed
+13 -9

No files matched your search

@@ -608,8 +608,10 @@ export default class Setting {
}
mount(target = this.template.$controlsCenter) {
target.appendChild(this.template.$danmuku);
this.template.$mount = target;
console.log(target);
const $el = typeof target === 'string' ? document.querySelector(target) : target;
$el.appendChild(this.template.$danmuku);
this.template.$mount = $el;
this.reset();
}
}