File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 11import { computed , defineComponent , toRefs } from 'vue' ;
22import classNames from '../_util/classNames' ;
3+ import { isFunction } from '../_util/util' ;
34import CloseOutlined from '@ant-design/icons-vue/CloseOutlined' ;
45import { tourStepProps } from './interface' ;
56import type { TourBtnProps } from './interface' ;
@@ -119,7 +120,9 @@ const panelRender = defineComponent({
119120 size = "small"
120121 class = { classNames ( `${ prefixCls } -prev-btn` , prevButtonProps ?. className ) }
121122 >
122- { prevButtonProps ?. children ?? contextLocale . Previous }
123+ { isFunction ( prevButtonProps ?. children )
124+ ? prevButtonProps . children ( )
125+ : prevButtonProps ?. children ?? contextLocale . Previous }
123126 </ Button >
124127 ) : null }
125128 < Button
@@ -129,8 +132,11 @@ const panelRender = defineComponent({
129132 size = "small"
130133 class = { classNames ( `${ prefixCls } -next-btn` , nextButtonProps ?. className ) }
131134 >
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 }
134140 </ Button >
135141 </ div >
136142 </ div >
You can’t perform that action at this time.
0 commit comments