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({
70
70
/**
71
71
* Toggle the visibility of sidebar component.
72
72
*/
73
- visible : Boolean ,
73
+ visible : {
74
+ type : Boolean ,
75
+ default : undefined ,
76
+ } ,
74
77
} ,
75
78
emits : [
76
79
/**
@@ -96,8 +99,6 @@ const CSidebar = defineComponent({
96
99
props . visible !== undefined ? props . visible : props . overlaid ? false : true ,
97
100
)
98
101
99
- // const visible = ref(props.visible)
100
-
101
102
watch ( inViewport , ( ) => {
102
103
emit ( 'visible-change' , inViewport . value )
103
104
inViewport . value ? emit ( 'show' ) : emit ( 'hide' )
@@ -194,7 +195,8 @@ const CSidebar = defineComponent({
194
195
[ `sidebar-${ props . position } ` ] : props . position ,
195
196
[ `sidebar-${ props . size } ` ] : props . size ,
196
197
'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 ) ,
198
200
hide : visibleDesktop . value === false && ! mobile . value && ! props . overlaid ,
199
201
} ,
200
202
attrs . class ,
You can’t perform that action at this time.
0 commit comments