refactor: simplify `hasAside` computed property (#2356)

pull/2359/head
烽宁 2 years ago committed by GitHub
parent b31933fbdd
commit af4bb52947
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -60,8 +60,7 @@ export function useSidebar() {
const hasAside = computed(() => {
if (frontmatter.value.layout === 'home') return false
if (frontmatter.value.aside != null) return !!frontmatter.value.aside
if (theme.value.aside === false) return false
return true
return theme.value.aside !== false
})
const isSidebarEnabled = computed(() => hasSidebar.value && is960.value)

Loading…
Cancel
Save