fix: sidebar collapsible problem once more

pull/665/head
Kia King Ishii 2 years ago
parent 751bc0b478
commit 99246762c6

@ -12,7 +12,7 @@ const props = defineProps<{
collapsed?: boolean
}>()
const collapsed = ref(!!props.collapsed)
const collapsed = ref(props.collapsible && props.collapsed)
function toggle() {
if (props.collapsible) {
@ -23,7 +23,7 @@ function toggle() {
<template>
<section class="VPSidebarGroup" :class="{ collapsible, collapsed }">
<div class="title" role="button" @click="toggle">
<div class="title" :role="collapsible ? 'button' : undefined" @click="toggle">
<h2 class="title-text">{{ text }}</h2>
<div class="action">
<VPIconMinusSquare class="icon minus" />
@ -47,10 +47,6 @@ function toggle() {
z-index: 2;
}
.VPSidebarGroup.collapsible .title {
cursor: pointer;
}
.title-text {
padding-top: 6px;
padding-bottom: 6px;

Loading…
Cancel
Save