@@ -2,7 +2,7 @@ import PropTypes from '../_util/vue-types';
22import BaseMixin from '../_util/BaseMixin' ;
33import debounce from 'lodash-es/debounce' ;
44import isFlexSupported from '../_util/isFlexSupported' ;
5- import { filterEmpty , getSlot , getPropsData } from '../_util/props-util' ;
5+ import { getSlot , getPropsData } from '../_util/props-util' ;
66import { cloneElement } from '../_util/vnode' ;
77
88export default {
@@ -23,6 +23,7 @@ export default {
2323 finish : PropTypes . any ,
2424 error : PropTypes . any ,
2525 } ) . loose ,
26+ canClick : PropTypes . bool ,
2627 } ,
2728 data ( ) {
2829 this . calcStepOffsetWidth = debounce ( this . calcStepOffsetWidth , 150 ) ;
@@ -59,7 +60,6 @@ export default {
5960 const { current } = this . $props ;
6061 if ( current !== next ) {
6162 this . __emit ( 'change' , next ) ;
62- this . __emit ( 'update:current' , next ) ;
6363 }
6464 } ,
6565 calcStepOffsetWidth ( ) {
@@ -101,10 +101,11 @@ export default {
101101 progressDot,
102102 initial,
103103 icons,
104+ canClick,
104105 } = this ;
105106 const isNav = type === 'navigation' ;
106107 const { lastStepOffsetWidth, flexSupported } = this ;
107- const filteredChildren = filterEmpty ( getSlot ( this ) ) ;
108+ const filteredChildren = getSlot ( this ) ;
108109 const lastIndex = filteredChildren . length - 1 ;
109110 const adjustedlabelPlacement = progressDot ? 'vertical' : labelPlacement ;
110111 const classString = {
@@ -134,9 +135,7 @@ export default {
134135 icons,
135136 ...childProps ,
136137 } ;
137-
138- const { onChange } = this . $attrs ;
139- if ( onChange || this . $attrs [ 'onUpdate:current' ] ) {
138+ if ( canClick ) {
140139 stepProps . onStepClick = this . onStepClick ;
141140 }
142141 if ( ! flexSupported && direction !== 'vertical' ) {
0 commit comments