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 1
1
import animation from '../_util/openAnimation'
2
2
import { getOptionProps , initDefaultProps } from '../_util/props-util'
3
3
import VcCollapse , { collapseProps } from '../vc-collapse'
4
-
4
+ import Icon from '../icon'
5
5
export default {
6
6
name : 'ACollapse' ,
7
7
model : {
@@ -13,6 +13,13 @@ export default {
13
13
bordered : true ,
14
14
openAnimation : animation ,
15
15
} ) ,
16
+ methods : {
17
+ renderExpandIcon ( ) {
18
+ return (
19
+ < Icon type = 'right' class = 'arrow' />
20
+ )
21
+ } ,
22
+ } ,
16
23
render ( ) {
17
24
const { prefixCls, bordered, $listeners } = this
18
25
const collapseClassName = {
@@ -21,6 +28,7 @@ export default {
21
28
const rcCollapeProps = {
22
29
props : {
23
30
...getOptionProps ( this ) ,
31
+ expandIcon : this . renderExpandIcon ,
24
32
} ,
25
33
class : collapseClassName ,
26
34
on : $listeners ,
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ export default {
57
57
}
58
58
let icon = null
59
59
if ( showArrow && typeof expandIcon === 'function' ) {
60
- icon = cloneElement ( expandIcon , { ... this . $props } )
60
+ icon = cloneElement ( expandIcon ( this . $props ) )
61
61
}
62
62
return (
63
63
< div class = { itemCls } role = 'tablist' >
You can’t perform that action at this time.
0 commit comments