mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 21:31:20 -08:00
bugfix
This commit is contained in:
1 parent
cf119d4dc5
commit
11cf4f4455
8 files changed
+44
-37
No files matched your search
@@ -30,7 +30,8 @@ export default class Component {
|
||||
}
|
||||
}
|
||||
|
||||
add(option) {
|
||||
add(getOption) {
|
||||
const option = typeof getOption === 'function' ? getOption(this.art) : getOption;
|
||||
if (!this.$parent || !this.name || option.disable) return;
|
||||
const name = option.name || `${this.name}${this.id}`;
|
||||
errorHandle(!has(this, name), `Cannot add an existing name [${name}] to the [${this.name}]`);
|
||||
|
||||
Reference in new issue
Block a user