diff --git a/components/collapse/CollapsePanel.vue b/components/collapse/CollapsePanel.vue index d3edde855..63ff21961 100644 --- a/components/collapse/CollapsePanel.vue +++ b/components/collapse/CollapsePanel.vue @@ -21,7 +21,18 @@ export default { class: collapsePanelClassName, on: $listeners, } - return {this.$slots.default} + const { default: defaultSlots, header } = this.$slots + return ( + + {defaultSlots} + {header ? ( + + ) : null} + + + ) }, } diff --git a/components/collapse/demo/custom.md b/components/collapse/demo/custom.md index 3cad89c05..90cb0be6e 100644 --- a/components/collapse/demo/custom.md +++ b/components/collapse/demo/custom.md @@ -12,7 +12,10 @@ Customize the background, border and margin styles for each panel.