mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-15 09:06:16 -08:00
添加弹幕插件
This commit is contained in:
1 parent
d626ee601e
commit
582114e79d
16 files changed
+158
-27
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { append, insertByIndex, setStyles, setStyle, remove } from './index';
|
||||
|
||||
export default function component(art, parent, target, component, callback, title) {
|
||||
const option = typeof component === 'function' ? component(art) : component;
|
||||
export default function component(art, parent, target, getOption, callback, title) {
|
||||
const option = typeof getOption === 'function' ? getOption(art) : getOption;
|
||||
if (!option.disable) {
|
||||
parent.id += 1;
|
||||
const name = option.name || `${title}${parent.id}`;
|
||||
@@ -62,4 +62,6 @@ export default function component(art, parent, target, component, callback, titl
|
||||
parent[name] = option;
|
||||
art.emit(`${title}:add`, option);
|
||||
}
|
||||
|
||||
return option;
|
||||
}
|
||||
Reference in new issue
Block a user