metowolf / MetingJS

:cake: A powerful plugin connect APlayer and Meting
https://i-meto.com/about/
MIT License
1.17k stars 158 forks source link

MetingJS v2.0.1 与 overlayscrollbars@1.13.1 存在冲突? #66

Open ohmykreee opened 3 years ago

ohmykreee commented 3 years ago

取消使用 jQuery 后该问题不出现。

(我不会前端,js 代码也不会读,希望各位大佬能帮一帮忙)

metowolf commented 3 years ago

可以提供下能够复现的最小 html 代码

ohmykreee commented 3 years ago
<!DOCTYPE html>

  <head>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/overlayscrollbars@1.13.1/css/OverlayScrollbars.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" />
    </head>

  <body class="default">
    <meting-js server="netease" type="song" id="1880127698"></meting-js>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0"></script>
    <script src="https://cdn.jsdelivr.net/npm/overlayscrollbars@1.13.1/js/jquery.overlayScrollbars.min.js"></script>
    <script src="/js/main.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js"></script>   
  </body>

</html>

由于原来的页面使用了模板,第 12 行的 main.js 来自 https://github.com/g1eny0ung/hugo-theme-dream/blob/master/static/js/main.js

所以分析下来其实并不是 MetingJS 和 jQuery 有冲突,而是模板里的其他 js 文件了?