chore(docs): fix lint warn

This commit is contained in:
藍+85CD
2025-11-02 12:54:58 +08:00
parent 6e95b53b76
commit 03cd3ff5fd
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -261,7 +261,8 @@ function throttleAndDebounce(fn: () => void, delay: number): () => void {
if (!called) {
fn()
;(called = true) && setTimeout(() => (called = false), delay)
called = true
setTimeout(() => (called = false), delay)
}
else {
timeoutId = setTimeout(fn, delay)
+3 -3
View File
@@ -76,9 +76,8 @@ export function useSidebarControl(
onMounted(updateIsActiveLink)
const hasActiveLink = computed(() => {
if (isActiveLink.value) {
if (isActiveLink.value)
return true
}
return item.value.items
? containsActiveLink(withBase(`/${page.value.relativePath}`), item.value.items)
@@ -94,7 +93,8 @@ export function useSidebarControl(
})
watchPostEffect(() => {
;(isActiveLink.value || hasActiveLink.value) && (collapsed.value = false)
if (isActiveLink.value || hasActiveLink.value)
collapsed.value = false
})
function toggle() {