mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
4.3.1
This commit is contained in:
1 parent
222f786b88
commit
ce677ef602
62 files changed
+245
-224
No files matched your search
@@ -7,8 +7,8 @@ export default function aspectRatio(art) {
|
||||
return value === 'default' ? i18n.get('Default') : value;
|
||||
}
|
||||
|
||||
function update($panel, $description, value) {
|
||||
if ($description) $description.innerText = getI18n(value);
|
||||
function update($panel, $tooltip, value) {
|
||||
if ($tooltip) $tooltip.innerText = getI18n(value);
|
||||
const $current = queryAll('.art-setting-item', $panel).find((item) => item.dataset.value === value);
|
||||
if ($current) inverseClass($current, 'art-current');
|
||||
}
|
||||
@@ -17,7 +17,7 @@ export default function aspectRatio(art) {
|
||||
width: 200,
|
||||
html: i18n.get('Aspect Ratio'),
|
||||
icon: icons.aspectRatio,
|
||||
description: getI18n(art.aspectRatio),
|
||||
tooltip: getI18n(art.aspectRatio),
|
||||
selector: ['default', '4:3', '16:9'].map((item) => {
|
||||
return {
|
||||
value: item,
|
||||
@@ -29,9 +29,9 @@ export default function aspectRatio(art) {
|
||||
art.aspectRatio = item.value;
|
||||
},
|
||||
mounted: ($panel, item) => {
|
||||
update($panel, item._$description, art.aspectRatio);
|
||||
update($panel, item._$tooltip, art.aspectRatio);
|
||||
art.on('aspectRatio', () => {
|
||||
update($panel, item._$description, art.aspectRatio);
|
||||
update($panel, item._$tooltip, art.aspectRatio);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user