mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 02:01:20 -08:00
压缩多余字符
This commit is contained in:
1 parent
707df15b2d
commit
0c1c1273a6
47 files changed
+356
-382
No files matched your search
@@ -7,7 +7,7 @@ export default function aspectRatio(option) {
|
||||
...option,
|
||||
html: `
|
||||
${i18n.get('Aspect ratio')}:
|
||||
<span data-ratio="default" class="default current">${i18n.get('Default')}</span>
|
||||
<span data-ratio="default" class="art-current">${i18n.get('Default')}</span>
|
||||
<span data-ratio="4:3">4:3</span>
|
||||
<span data-ratio="16:9">16:9</span>
|
||||
`,
|
||||
@@ -22,7 +22,7 @@ export default function aspectRatio(option) {
|
||||
art.on('aspectRatioChange', ratio => {
|
||||
const $current = queryAll('span', $menu).find(item => item.dataset.ratio === ratio);
|
||||
if ($current) {
|
||||
inverseClass($current, 'current');
|
||||
inverseClass($current, 'art-current');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -114,17 +114,11 @@ export default class Contextmenu {
|
||||
set show(value) {
|
||||
const { $player } = this.art.template;
|
||||
if (value) {
|
||||
this.state = true;
|
||||
addClass($player, 'artplayer-contextmenu-show');
|
||||
addClass($player, 'art-contextmenu-show');
|
||||
this.art.emit('contextmenu:show');
|
||||
} else {
|
||||
this.state = false;
|
||||
removeClass($player, 'artplayer-contextmenu-show');
|
||||
removeClass($player, 'art-contextmenu-show');
|
||||
this.art.emit('contextmenu:hide');
|
||||
}
|
||||
}
|
||||
|
||||
toggle() {
|
||||
this.show = !this.state;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ export default function playbackRate(option) {
|
||||
${i18n.get('Play speed')}:
|
||||
<span data-rate="0.5">0.5</span>
|
||||
<span data-rate="0.75">0.75</span>
|
||||
<span data-rate="1.0" class="normal current">${i18n.get('Normal')}</span>
|
||||
<span data-rate="1.0" class="art-current">${i18n.get('Normal')}</span>
|
||||
<span data-rate="1.25">1.25</span>
|
||||
<span data-rate="1.5">1.5</span>
|
||||
<span data-rate="2.0">2.0</span>
|
||||
@@ -25,7 +25,7 @@ export default function playbackRate(option) {
|
||||
art.on('playbackRateChange', rate => {
|
||||
const $current = queryAll('span', $menu).find(item => Number(item.dataset.rate) === rate);
|
||||
if ($current) {
|
||||
inverseClass($current, 'current');
|
||||
inverseClass($current, 'art-current');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user