File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { computed , defineComponent , toRefs } from 'vue' ;
2
2
import classNames from '../_util/classNames' ;
3
+ import { isFunction } from '../_util/util' ;
3
4
import CloseOutlined from '@ant-design/icons-vue/CloseOutlined' ;
4
5
import { tourStepProps } from './interface' ;
5
6
import type { TourBtnProps } from './interface' ;
@@ -119,7 +120,9 @@ const panelRender = defineComponent({
119
120
size = "small"
120
121
class = { classNames ( `${ prefixCls } -prev-btn` , prevButtonProps ?. className ) }
121
122
>
122
- { prevButtonProps ?. children ?? contextLocale . Previous }
123
+ { isFunction ( prevButtonProps ?. children )
124
+ ? prevButtonProps . children ( )
125
+ : prevButtonProps ?. children ?? contextLocale . Previous }
123
126
</ Button >
124
127
) : null }
125
128
< Button
@@ -129,8 +132,11 @@ const panelRender = defineComponent({
129
132
size = "small"
130
133
class = { classNames ( `${ prefixCls } -next-btn` , nextButtonProps ?. className ) }
131
134
>
132
- { nextButtonProps ?. children ??
133
- ( isLastStep . value ? contextLocale . Finish : contextLocale . Next ) }
135
+ { isFunction ( nextButtonProps ?. children )
136
+ ? nextButtonProps ?. children ( )
137
+ : isLastStep . value
138
+ ? contextLocale . Finish
139
+ : contextLocale . Next }
134
140
</ Button >
135
141
</ div >
136
142
</ div >
You can’t perform that action at this time.
0 commit comments