Add Vietnamese localization for Artplayer

This commit is contained in:
Harvey Zack committed 2025-04-20 09:55:38 +08:00
1 parent 2aaef7db45
commit 17ece4c0c8
41 files changed
+2335 -1585

No files matched your search

+15
View File
@@ -268,6 +268,10 @@ export default class Setting extends Component {
type = 'range';
}
if (has(item, 'onClick')) {
type = 'button';
}
const { icons, proxy, constructor } = this.art;
const $item = createElement('div');
@@ -284,6 +288,7 @@ export default class Setting extends Component {
addClass($icon, 'art-setting-item-left-icon');
switch (type) {
case 'button':
case 'switch':
case 'range':
append($icon, item.icon || icons.config);
@@ -483,6 +488,16 @@ export default class Setting extends Component {
}
}
break;
case 'button':
{
if (item.onClick) {
const event = proxy($item, 'click', async (event) => {
item.tooltip = await item.onClick.call(this.art, item, $item, event);
});
item.$events.push(event);
}
}
break;
default:
break;
}