@@ -2,7 +2,7 @@ import PropTypes from '../_util/vue-types';
2
2
import BaseMixin from '../_util/BaseMixin' ;
3
3
import debounce from 'lodash-es/debounce' ;
4
4
import isFlexSupported from '../_util/isFlexSupported' ;
5
- import { filterEmpty , getSlot , getPropsData } from '../_util/props-util' ;
5
+ import { getSlot , getPropsData } from '../_util/props-util' ;
6
6
import { cloneElement } from '../_util/vnode' ;
7
7
8
8
export default {
@@ -23,6 +23,7 @@ export default {
23
23
finish : PropTypes . any ,
24
24
error : PropTypes . any ,
25
25
} ) . loose ,
26
+ canClick : PropTypes . bool ,
26
27
} ,
27
28
data ( ) {
28
29
this . calcStepOffsetWidth = debounce ( this . calcStepOffsetWidth , 150 ) ;
@@ -59,7 +60,6 @@ export default {
59
60
const { current } = this . $props ;
60
61
if ( current !== next ) {
61
62
this . __emit ( 'change' , next ) ;
62
- this . __emit ( 'update:current' , next ) ;
63
63
}
64
64
} ,
65
65
calcStepOffsetWidth ( ) {
@@ -101,10 +101,11 @@ export default {
101
101
progressDot,
102
102
initial,
103
103
icons,
104
+ canClick,
104
105
} = this ;
105
106
const isNav = type === 'navigation' ;
106
107
const { lastStepOffsetWidth, flexSupported } = this ;
107
- const filteredChildren = filterEmpty ( getSlot ( this ) ) ;
108
+ const filteredChildren = getSlot ( this ) ;
108
109
const lastIndex = filteredChildren . length - 1 ;
109
110
const adjustedlabelPlacement = progressDot ? 'vertical' : labelPlacement ;
110
111
const classString = {
@@ -134,9 +135,7 @@ export default {
134
135
icons,
135
136
...childProps ,
136
137
} ;
137
-
138
- const { onChange } = this . $attrs ;
139
- if ( onChange || this . $attrs [ 'onUpdate:current' ] ) {
138
+ if ( canClick ) {
140
139
stepProps . onStepClick = this . onStepClick ;
141
140
}
142
141
if ( ! flexSupported && direction !== 'vertical' ) {
0 commit comments