mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 16:11:20 -08:00
bugfix
This commit is contained in:
1 parent
3d37b5e056
commit
c9e45567ab
3 files changed
+21
-5
No files matched your search
@@ -33,6 +33,7 @@ export default class Setting extends Component {
|
||||
|
||||
this.width = 250;
|
||||
this.option = [];
|
||||
this.events = [];
|
||||
this.cache = new Map();
|
||||
|
||||
if (option.setting) {
|
||||
@@ -98,10 +99,12 @@ export default class Setting extends Component {
|
||||
append($left, $iconLeft);
|
||||
append($left, item._parentItem.html);
|
||||
|
||||
proxy($item, 'click', () => {
|
||||
const event = proxy($item, 'click', () => {
|
||||
this.init(item._parentList);
|
||||
});
|
||||
|
||||
this.events.push(event);
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
@@ -158,7 +161,7 @@ export default class Setting extends Component {
|
||||
append($right, $iconRight);
|
||||
}
|
||||
|
||||
proxy($item, 'click', (event) => {
|
||||
const event = proxy($item, 'click', (event) => {
|
||||
if (hasChildren) {
|
||||
this.init(item.selector, item.width);
|
||||
} else {
|
||||
@@ -179,6 +182,8 @@ export default class Setting extends Component {
|
||||
}
|
||||
});
|
||||
|
||||
this.events.push(event);
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
@@ -190,6 +195,9 @@ export default class Setting extends Component {
|
||||
}
|
||||
|
||||
this.cache = new Map();
|
||||
this.events.forEach((event) => event());
|
||||
this.events = [];
|
||||
this.$parent.innerHTML = '';
|
||||
this.option = makeRecursion(this.option);
|
||||
this.init(this.option);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user