mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
限制参数范围
This commit is contained in:
1 parent
748ce304e6
commit
5f384fb04d
7 files changed
+59
-41
No files matched your search
@@ -15,14 +15,14 @@ export default function aspectRatio(menuOption) {
|
||||
const { target } = event;
|
||||
const { ratio } = target.dataset;
|
||||
if (ratio) {
|
||||
player.aspectRatio(ratio.split(':'));
|
||||
player.aspectRatio(ratio);
|
||||
art.contextmenu.hide();
|
||||
}
|
||||
},
|
||||
mounted: $menu => {
|
||||
art.on('aspectRatioChange', ratio => {
|
||||
const $current = Array.from($menu.querySelectorAll('span')).find(
|
||||
item => item.dataset.ratio === ratio.join(':'),
|
||||
item => item.dataset.ratio === ratio,
|
||||
);
|
||||
inverseClass($current, 'current');
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user