mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
bugfix
This commit is contained in:
1 parent
8b16c0fc29
commit
385fc7bda2
4 files changed
+12
-8
No files matched your search
@@ -159,7 +159,11 @@ export default class Controls {
|
||||
errorHandle(parent, 'Controls option.position can not be empty');
|
||||
this.id += 1;
|
||||
const control = component(this.art, this, parent, option, callback, 'control');
|
||||
if (!(control.$ref.firstElementChild && control.$ref.firstElementChild.tagName === 'I')) {
|
||||
if (
|
||||
!option.disable &&
|
||||
option.position !== 'top' &&
|
||||
!(control.$ref.firstElementChild && control.$ref.firstElementChild.tagName === 'I')
|
||||
) {
|
||||
control.$ref.classList.add('art-control-onlyText');
|
||||
}
|
||||
return control;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { append, setStyles, setStyle, remove, errorHandle, hasOwnProperty } from
|
||||
|
||||
export default function component(art, parent, target, getOption, callback, title) {
|
||||
const option = typeof getOption === 'function' ? getOption(art) : getOption;
|
||||
if (option.disable) return null;
|
||||
if (option.disable) return {};
|
||||
const componentID = parent.id;
|
||||
const name = option.name || `${title}${componentID}`;
|
||||
errorHandle(
|
||||
|
||||
Reference in new issue
Block a user