mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 08:51:20 -08:00
V5 (#500)
* update dep * Update package.json * update contextmenu * update d.ts * update onVttLoad * build artplayer * update style * --art-theme * update style * update style * update user-select * add getIcon * update style * update style * update style * update style * update style * update style * update style * update style * update style * update style * update style * update style * update style * update style * update style * add progress-hover * update mini * update style * update style * update style * update style * update style * update volume * update style * add art-backdrop * update style * update style * update style * update currentLevel * update artplayerPluginControl * update artplayerPluginDanmuku * Update package.json
This commit is contained in:
1 parent
af12bd9634
commit
7b53de941d
80 files changed
+1393
-1362
No files matched your search
@@ -6,13 +6,14 @@ export default function aspectRatio(option) {
|
||||
i18n,
|
||||
constructor: { ASPECT_RATIO },
|
||||
} = art;
|
||||
|
||||
const html = ASPECT_RATIO.map(
|
||||
(item) => `<span data-value="${item}">${item === 'default' ? i18n.get('Default') : item}</span>`,
|
||||
).join('');
|
||||
|
||||
return {
|
||||
...option,
|
||||
html: `${i18n.get('Aspect Ratio')}:
|
||||
${ASPECT_RATIO.map(
|
||||
(item) => `<span data-value="${item}">${item === 'default' ? i18n.get('Default') : item}</span>`,
|
||||
).join('')}
|
||||
`,
|
||||
html: `${i18n.get('Aspect Ratio')}: ${html}`,
|
||||
click: (contextmenu, event) => {
|
||||
const { value } = event.target.dataset;
|
||||
if (value) {
|
||||
@@ -22,7 +23,9 @@ export default function aspectRatio(option) {
|
||||
},
|
||||
mounted: ($panel) => {
|
||||
const $default = query('[data-value="default"]', $panel);
|
||||
if ($default) inverseClass($default, 'art-current');
|
||||
if ($default) {
|
||||
inverseClass($default, 'art-current');
|
||||
}
|
||||
art.on('aspectRatio', (value) => {
|
||||
const $current = queryAll('span', $panel).find((item) => item.dataset.value === value);
|
||||
if ($current) {
|
||||
|
||||
Reference in new issue
Block a user