mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
update danmuku.js
This commit is contained in:
1 parent
1ba6898705
commit
c568076b6b
15 files changed
+197
-192
No files matched your search
@@ -29,9 +29,9 @@ export default function aspectRatio(art) {
|
||||
art.aspectRatio = item.value;
|
||||
},
|
||||
mounted: ($panel, item) => {
|
||||
update($panel, item._$tooltip, art.aspectRatio);
|
||||
update($panel, item.$tooltip, art.aspectRatio);
|
||||
art.on('aspectRatio', () => {
|
||||
update($panel, item._$tooltip, art.aspectRatio);
|
||||
update($panel, item.$tooltip, art.aspectRatio);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
@@ -31,9 +31,9 @@ export default function flip(art) {
|
||||
art.flip = item.value;
|
||||
},
|
||||
mounted: ($panel, item) => {
|
||||
update($panel, item._$tooltip, art.flip);
|
||||
update($panel, item.$tooltip, art.flip);
|
||||
art.on('flip', () => {
|
||||
update($panel, item._$tooltip, art.flip);
|
||||
update($panel, item.$tooltip, art.flip);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
@@ -168,7 +168,7 @@ export default class Setting extends Component {
|
||||
}
|
||||
|
||||
append($left, $icon);
|
||||
item._$icon = $icon;
|
||||
item.$icon = $icon;
|
||||
|
||||
def(item, 'icon', {
|
||||
get() {
|
||||
@@ -185,7 +185,7 @@ export default class Setting extends Component {
|
||||
addClass($html, 'art-setting-item-left-text');
|
||||
append($html, item.html || '');
|
||||
append($left, $html);
|
||||
item._$html = $html;
|
||||
item.$html = $html;
|
||||
|
||||
def(item, 'html', {
|
||||
get() {
|
||||
@@ -202,7 +202,7 @@ export default class Setting extends Component {
|
||||
addClass($tooltip, 'art-setting-item-right-tooltip');
|
||||
append($tooltip, item.tooltip || '');
|
||||
append($right, $tooltip);
|
||||
item._$tooltip = $tooltip;
|
||||
item.$tooltip = $tooltip;
|
||||
|
||||
def(item, 'tooltip', {
|
||||
get() {
|
||||
@@ -223,14 +223,14 @@ export default class Setting extends Component {
|
||||
const $switchOff = append($state, icons.switchOff);
|
||||
setStyle(item.switch ? $switchOff : $switchOn, 'display', 'none');
|
||||
append($right, $state);
|
||||
item._$switch = item.switch;
|
||||
item.$switch = item.switch;
|
||||
|
||||
def(item, 'switch', {
|
||||
get() {
|
||||
return item._$switch;
|
||||
return item.$switch;
|
||||
},
|
||||
set(value) {
|
||||
item._$switch = value;
|
||||
item.$switch = value;
|
||||
if (value) {
|
||||
setStyle($switchOff, 'display', 'none');
|
||||
setStyle($switchOn, 'display', null);
|
||||
@@ -273,8 +273,8 @@ export default class Setting extends Component {
|
||||
|
||||
if (item._parentItem && item._parentItem.onSelect) {
|
||||
const result = await item._parentItem.onSelect.call(this.art, item, $item, event);
|
||||
if (item._parentItem._$tooltip && isStringOrNumber(result)) {
|
||||
item._parentItem._$tooltip.innerHTML = result;
|
||||
if (item._parentItem.$tooltip && isStringOrNumber(result)) {
|
||||
item._parentItem.$tooltip.innerHTML = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@ export default function playbackRate(art) {
|
||||
art.playbackRate = item.value;
|
||||
},
|
||||
mounted: ($panel, item) => {
|
||||
update($panel, item._$tooltip, art.playbackRate);
|
||||
update($panel, item.$tooltip, art.playbackRate);
|
||||
art.on('playbackRate', () => {
|
||||
update($panel, item._$tooltip, art.playbackRate);
|
||||
update($panel, item.$tooltip, art.playbackRate);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
@@ -29,9 +29,9 @@ export default function subtitleOffset(art) {
|
||||
art.subtitleOffset = item.value;
|
||||
},
|
||||
mounted: ($panel, item) => {
|
||||
update($panel, item._$tooltip, art.subtitleOffset);
|
||||
update($panel, item.$tooltip, art.subtitleOffset);
|
||||
art.on('subtitleOffset', () => {
|
||||
update($panel, item._$tooltip, art.subtitleOffset);
|
||||
update($panel, item.$tooltip, art.subtitleOffset);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user