删除多余事件

This commit is contained in:
Harvey committed 2019-11-28 10:10:29 +08:00
1 parent e0faa3fe68
commit 7ff61b4660
38 files changed
+266 -516

No files matched your search

+9 -3
View File
@@ -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'));
});
},
});