排班优化,按钮缩小
This commit is contained in:
tangly1024
2021-12-17 14:09:19 +08:00
parent 9c38dae8aa
commit 8ea86d3976
11 changed files with 27 additions and 70 deletions

View File

@@ -6,7 +6,8 @@ export default function FloatDarkModeButton () {
const [show, switchShow] = useState(false)
const scrollListener = () => {
const scrollY = window.pageYOffset
const shouldShow = scrollY > 100 && scrollY < windowTop
// const shouldShow = scrollY > 100 && scrollY < windowTop
const shouldShow = scrollY > 100
windowTop = scrollY
if (shouldShow !== show) {
switchShow(shouldShow)