mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 16:11:20 -08:00
fix setting add
This commit is contained in:
1 parent
d34a6ba268
commit
a801cd5613
3 files changed
+13
-7
No files matched your search
@@ -93,12 +93,12 @@ export default class Setting extends Component {
|
||||
this.art.events.remove(this.events[index]);
|
||||
}
|
||||
this.$parent.innerHTML = '';
|
||||
this.events = [];
|
||||
this.cache = new Map();
|
||||
}
|
||||
|
||||
update(settings) {
|
||||
this.remove();
|
||||
this.events = [];
|
||||
this.cache = new Map();
|
||||
const settingsCopy = settings.map((item) => mergeDeep({}, item));
|
||||
const mergeSettings = [...this.defaultSettings, ...settingsCopy];
|
||||
this.option = Setting.makeRecursion(mergeSettings);
|
||||
@@ -107,8 +107,11 @@ export default class Setting extends Component {
|
||||
}
|
||||
|
||||
add(setting) {
|
||||
this.remove();
|
||||
this.option.push(setting);
|
||||
return this.update(this.option);
|
||||
this.option = Setting.makeRecursion(this.option);
|
||||
this.render(this.option);
|
||||
return this.option;
|
||||
}
|
||||
|
||||
creatHeader(item) {
|
||||
|
||||
Reference in new issue
Block a user