File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 11import animation from '../_util/openAnimation'
22import { getOptionProps , initDefaultProps } from '../_util/props-util'
33import VcCollapse , { collapseProps } from '../vc-collapse'
4-
4+ import Icon from '../icon'
55export default {
66 name : 'ACollapse' ,
77 model : {
@@ -13,6 +13,13 @@ export default {
1313 bordered : true ,
1414 openAnimation : animation ,
1515 } ) ,
16+ methods : {
17+ renderExpandIcon ( ) {
18+ return (
19+ < Icon type = 'right' class = 'arrow' />
20+ )
21+ } ,
22+ } ,
1623 render ( ) {
1724 const { prefixCls, bordered, $listeners } = this
1825 const collapseClassName = {
@@ -21,6 +28,7 @@ export default {
2128 const rcCollapeProps = {
2229 props : {
2330 ...getOptionProps ( this ) ,
31+ expandIcon : this . renderExpandIcon ,
2432 } ,
2533 class : collapseClassName ,
2634 on : $listeners ,
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export default {
5757 }
5858 let icon = null
5959 if ( showArrow && typeof expandIcon === 'function' ) {
60- icon = cloneElement ( expandIcon , { ... this . $props } )
60+ icon = cloneElement ( expandIcon ( this . $props ) )
6161 }
6262 return (
6363 < div class = { itemCls } role = 'tablist' >
You can’t perform that action at this time.
0 commit comments