mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 19:41:25 -08:00
删除多余事件
This commit is contained in:
1 parent
e0faa3fe68
commit
7ff61b4660
38 files changed
+266
-516
No files matched your search
@@ -3,6 +3,7 @@ import { append, tooltip } from '../utils';
|
||||
export default function pip(option) {
|
||||
return art => ({
|
||||
...option,
|
||||
tooltip: art.i18n.get('Mini player'),
|
||||
mounted: $control => {
|
||||
const {
|
||||
events: { proxy },
|
||||
@@ -10,10 +11,15 @@ export default function pip(option) {
|
||||
i18n,
|
||||
player,
|
||||
} = art;
|
||||
const $pip = append($control, icons.pip);
|
||||
tooltip($pip, i18n.get('Mini player'));
|
||||
|
||||
append($control, icons.pip);
|
||||
|
||||
proxy($control, 'click', () => {
|
||||
player.pip = true;
|
||||
player.pipToggle = true;
|
||||
});
|
||||
|
||||
art.on('pipChange', value => {
|
||||
tooltip($control, i18n.get(value ? 'Exit mini player' : 'Mini player'));
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user