Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 歌单列表操作优化 #55

Closed
gkgkhssy opened this issue Jan 5, 2024 · 1 comment
Closed

[Feature] 歌单列表操作优化 #55

gkgkhssy opened this issue Jan 5, 2024 · 1 comment

Comments

@gkgkhssy
Copy link

gkgkhssy commented Jan 5, 2024

简述

点击别的地方能够关闭列表,下面是我简单的实现方法

细节

<script> $(() => { $("body").click((event) => { // 如果点击的是播放器、图标,或者播放器未展开,则直接返回 if ($(event.target).closest(".aplayer").length) return; if ($(event.target)[0].nodeName == "svg" || $(event.target)[0].nodeName == "path") return; if ($(".aplayer-narrow").length) return; // 如果播放列表已展开,则收起列表,否则收起播放器 if (!$(".aplayer-list-hide").length) { $(".aplayer-icon-menu").click(); } else { // 如果是移动端则不收起播放器 if (/(iPhone|iPad|iPod|Android|webOS|BlackBerry|Opera Mini|IEMobile)/i.test(navigator.userAgent)) return; $(".aplayer-miniswitcher").click(); } }); }) </script>
@WenqiOfficial
Copy link
Owner

是个不错的功能建议!

@WenqiOfficial WenqiOfficial changed the title [Feature] [Feature] 歌单列表操作优化 Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants