revert: steps

pull/3733/head 2.0.1
tangjinzhou 2021-02-27 23:24:09 +08:00
parent 0a58c0800d
commit bf717f1226
1 changed files with 3 additions and 2 deletions

View File

@ -27,6 +27,7 @@ export default defineComponent({
canClick: PropTypes.looseBool, canClick: PropTypes.looseBool,
}, },
data() { data() {
this.calcStepOffsetWidth = debounce(this.calcStepOffsetWidth, 150);
return { return {
flexSupported: true, flexSupported: true,
lastStepOffsetWidth: 0, lastStepOffsetWidth: 0,
@ -62,7 +63,7 @@ export default defineComponent({
this.__emit('change', next); this.__emit('change', next);
} }
}, },
calcStepOffsetWidth: debounce(function() { calcStepOffsetWidth() {
if (isFlexSupported()) { if (isFlexSupported()) {
return; return;
} }
@ -86,7 +87,7 @@ export default defineComponent({
this.setState({ lastStepOffsetWidth: offsetWidth }); this.setState({ lastStepOffsetWidth: offsetWidth });
}); });
} }
}, 150), },
}, },
render() { render() {
const { const {