mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-13 15:56:15 -08:00
14 lines
365 B
JavaScript
14 lines
365 B
JavaScript
export default function clickInit(art, events) {
|
|
const {
|
|
template: { $player },
|
|
} = art;
|
|
events.proxy(document, ['click', 'contextmenu'], event => {
|
|
if (event.composedPath().indexOf($player) > -1) {
|
|
art.isFocus = true;
|
|
} else {
|
|
art.isFocus = false;
|
|
art.contextmenu.hide();
|
|
}
|
|
});
|
|
}
|