mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 08:51:20 -08:00
chore: Update mount parameter type in Danmuku and Setting classes
This commit is contained in:
1 parent
27284099d7
commit
7ed2f58e6a
5 files changed
+13
-9
No files matched your search
@@ -267,7 +267,7 @@ class Danmuku {
|
||||
fontSize: "number|string",
|
||||
antiOverlap: "boolean",
|
||||
synchronousPlayback: "boolean",
|
||||
mount: "?htmldivelement",
|
||||
mount: "?htmldivelement|string",
|
||||
heatmap: "object|boolean",
|
||||
points: "array",
|
||||
filter: "function",
|
||||
@@ -1327,8 +1327,10 @@ class Setting {
|
||||
$color && inverseClass($color, "apd-active");
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user