File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,10 @@ const CSidebar = defineComponent({
7070 /**
7171 * Toggle the visibility of sidebar component.
7272 */
73- visible : Boolean ,
73+ visible : {
74+ type : Boolean ,
75+ default : undefined ,
76+ } ,
7477 } ,
7578 emits : [
7679 /**
@@ -96,8 +99,6 @@ const CSidebar = defineComponent({
9699 props . visible !== undefined ? props . visible : props . overlaid ? false : true ,
97100 )
98101
99- // const visible = ref(props.visible)
100-
101102 watch ( inViewport , ( ) => {
102103 emit ( 'visible-change' , inViewport . value )
103104 inViewport . value ? emit ( 'show' ) : emit ( 'hide' )
@@ -194,7 +195,8 @@ const CSidebar = defineComponent({
194195 [ `sidebar-${ props . position } ` ] : props . position ,
195196 [ `sidebar-${ props . size } ` ] : props . size ,
196197 'sidebar-narrow-unfoldable' : props . unfoldable ,
197- show : ( mobile . value && visibleMobile . value ) || ( props . overlaid && visibleDesktop . value ) ,
198+ show :
199+ ( mobile . value && visibleMobile . value ) || ( props . overlaid && visibleDesktop . value ) ,
198200 hide : visibleDesktop . value === false && ! mobile . value && ! props . overlaid ,
199201 } ,
200202 attrs . class ,
You can’t perform that action at this time.
0 commit comments