Browse Source

Update CollapseHeader.vue (#2583)

#2582
luocong2016 2 years ago
parent
commit
a78c3a305b
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/components/Container/src/collapse/CollapseHeader.vue

+ 5 - 2
src/components/Container/src/collapse/CollapseHeader.vue

@@ -31,8 +31,11 @@
           </BasicTitle>
 
           <div class={`${unref(_prefixCls)}__action`}>
-            {slots.action ? slots.action() : null}
-            {props.canExpan && <BasicArrow up expand={props.show} onClick={() => emit('expand')} />}
+             {slots.action
+              ? slots.action({ expand: props.show, onClick: () => emit('expand') })
+              : props.canExpan && (
+                  <BasicArrow up expand={props.show} onClick={() => emit('expand')} />
+                )}
           </div>
         </div>
       );