-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Version
2.2.5
Reproduction link
https://github.com/Rockson/vue-error-computed
Steps to reproduce
<template>
<input class="input" type="number" v-model="Year">
</template>
<script>
export default {
data () {
return {
date: new Date()
}
},
computed: {
Year: {
get: function () {
console.log(`get: ${this.date}`)
return this.date.getFullYear()
},
set: function (year) {
this.date.setFullYear(year)
console.log(`set: ${this.date}`)
}
}
}
}
</script>
Start the dev server and go to the root. On the browser, change the input content then blur the input.
the actual code is in src/components/Hello.vue
see also #3389
What is expected?
I expect the get method to be called after keyup
What is actually happening?
It won't call the get method after keyup, It will erase the changes in the input after blur
Metadata
Metadata
Assignees
Labels
No labels