mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 21:01:20 -08:00
add the id to container dom
This commit is contained in:
1 parent
7584aeafe3
commit
44f3665a55
4 files changed
+11
-10
No files matched your search
@@ -29,6 +29,8 @@ const instances = [];
|
||||
export default class Artplayer extends Emitter {
|
||||
constructor(option) {
|
||||
super();
|
||||
|
||||
this.id = ++id;
|
||||
this.option = validator(utils.mergeDeep(Artplayer.option, option), scheme);
|
||||
this.isFocus = false;
|
||||
this.isDestroy = false;
|
||||
@@ -58,8 +60,6 @@ export default class Artplayer extends Emitter {
|
||||
this.mobile = new Mobile(this);
|
||||
}
|
||||
|
||||
id += 1;
|
||||
this.id = id;
|
||||
instances.push(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ export default class Template {
|
||||
this.$contextmenu = this.query('.art-contextmenus');
|
||||
|
||||
this.$player.style.setProperty('--theme', theme);
|
||||
this.$container.dataset.artId = this.art.id;
|
||||
|
||||
if (backdrop) {
|
||||
addClass(this.$settingInner, 'art-backdrop-filter');
|
||||
|
||||
Reference in new issue
Block a user