Skip to content

Commit

Permalink
fix: 修改滚动事件的方法名,避免冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
Lete114 committed Apr 23, 2022
1 parent cb28b1d commit b56e4b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function DarkMode() {
}

// 滚动事件
function scroll() {
function scrollFn() {
// 监听 scroll
var windowTop = 0 // 定义初始位置
window.addEventListener(
Expand Down Expand Up @@ -246,7 +246,7 @@ function exeAllFn() {
showToc() // 打开目录
closeAll() // 关闭所有弹窗
DarkMode() // 深色模式
scroll() // 滚动事件
scrollFn() // 滚动事件
codeCopy() // 代码块复杂
}
window.onload = exeAllFn

0 comments on commit b56e4b6

Please sign in to comment.