feat(Stepper): add name prop (#4931)

This commit is contained in:
neverland
2019-11-05 17:54:59 +08:00
committed by GitHub
parent 0d3eec10b5
commit ad36ddc60f
4 changed files with 28 additions and 9 deletions

View File

@@ -27,6 +27,10 @@ export default createComponent({
asyncChange: Boolean,
disableInput: Boolean,
decimalLength: Number,
name: {
type: [Number, String],
default: ''
},
min: {
type: [Number, String],
default: 1
@@ -110,7 +114,7 @@ export default createComponent({
currentValue(val) {
this.$emit('input', val);
this.$emit('change', val);
this.$emit('change', val, { name: this.name });
}
},
@@ -167,7 +171,7 @@ export default createComponent({
emitChange(value) {
if (this.asyncChange) {
this.$emit('input', value);
this.$emit('change', value);
this.$emit('change', value, { name: this.name });
} else {
this.currentValue = value;
}