<el-input-number @change=“getPrice” v-model=“a” :min=“1” :max=“99” :step=“1” style=“margin-bottom:10px;”>
getPrice() {
console.log(this.a)
}
在触发方法种如果不传入value会导致打印的a不是最新的值,所以要加上
getPrice(value) {
console.log(value)
}
<el-input-number @change=“getPrice” v-model=“a” :min=“1” :max=“99” :step=“1” style=“margin-bottom:10px;”>
getPrice() {
console.log(this.a)
}
在触发方法种如果不传入value会导致打印的a不是最新的值,所以要加上
getPrice(value) {
console.log(value)
}