File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,7 @@ const CNavGroup = defineComponent({
1010 /**
1111 * Show nav group items.
1212 */
13- visible : {
14- type : Boolean ,
15- default : undefined ,
16- required : false ,
17- } ,
13+ visible : Boolean ,
1814 } ,
1915 emits : [ 'visible-change' ] ,
2016 setup ( props , { slots, emit } ) {
@@ -37,6 +33,7 @@ const CNavGroup = defineComponent({
3733
3834 onMounted ( ( ) => {
3935 props . visible && navGroupRef . value . classList . add ( 'show' )
36+ emit ( 'visible-change' , visible . value )
4037 } )
4138
4239 onUpdated ( ( ) => {
@@ -126,8 +123,8 @@ const CNavGroup = defineComponent({
126123 if ( vnode . type . name === 'CNavGroup' ) {
127124 return h ( vnode , {
128125 onVisibleChange : ( visible : boolean ) =>
129- handleVisibleChange ( visible , index ) ,
130- ...( visibleGroup . value && { visible : isVisible ( index ) } ) ,
126+ handleVisibleChange ( visible , index + 1 ) ,
127+ ...( visibleGroup . value && { visible : isVisible ( index + 1 ) } ) ,
131128 } )
132129 }
133130 return vnode
You can’t perform that action at this time.
0 commit comments