mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
build all packages
This commit is contained in:
1 parent
a8cbb56d93
commit
415a04a4a7
18 files changed
+38
-4392
No files matched your search
@@ -10,6 +10,8 @@ export default class Contextmenu extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
|
||||
this.name = 'contextmenu';
|
||||
|
||||
const {
|
||||
option,
|
||||
template: { $player, $contextmenu },
|
||||
|
||||
@@ -17,6 +17,8 @@ export default class Control extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
|
||||
this.name = 'control';
|
||||
|
||||
const { option } = art;
|
||||
|
||||
art.on('ready', () => {
|
||||
|
||||
@@ -5,6 +5,8 @@ export default class Info extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
|
||||
this.name = 'info';
|
||||
|
||||
const {
|
||||
template: { $infoPanel, $infoClose, $video },
|
||||
events: { proxy },
|
||||
|
||||
@@ -3,6 +3,7 @@ import Component from './utils/component';
|
||||
export default class Layer extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
this.name = 'layer';
|
||||
this.$parent = art.template.$layer;
|
||||
art.on('ready', () => {
|
||||
art.option.layers.forEach(item => {
|
||||
|
||||
@@ -4,6 +4,7 @@ import Component from './utils/component';
|
||||
export default class Loading extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
this.name = 'loading';
|
||||
append(art.template.$loading, art.icons.loading);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import Component from './utils/component';
|
||||
export default class Mask extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
this.name = 'mask';
|
||||
append(art.template.$state, art.icons.state);
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,8 @@ export default class Setting extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
|
||||
this.name = 'setting';
|
||||
|
||||
const {
|
||||
option,
|
||||
template: { $setting, $settingBody },
|
||||
|
||||
@@ -5,6 +5,8 @@ export default class Subtitle extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
|
||||
this.name = 'subtitle';
|
||||
|
||||
const {
|
||||
events: { proxy },
|
||||
option: { subtitle },
|
||||
|
||||
@@ -5,7 +5,6 @@ export default class Component {
|
||||
this.id = 0;
|
||||
this.art = art;
|
||||
this.add = this.add.bind(this);
|
||||
this.name = this.constructor.name.toLowerCase();
|
||||
}
|
||||
|
||||
get show() {
|
||||
@@ -31,7 +30,7 @@ export default class Component {
|
||||
|
||||
add(getOption, callback) {
|
||||
const option = typeof getOption === 'function' ? getOption(this.art) : getOption;
|
||||
if (!this.$parent || option.disable) return;
|
||||
if (!this.$parent || !this.name || option.disable) return;
|
||||
this.id += 1;
|
||||
const name = option.name || `${this.name}${this.id}`;
|
||||
const $ref = document.createElement('div');
|
||||
|
||||
Reference in new issue
Block a user