mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-20 11:30:43 -05:00
fix(ui): prompt input being reset by lagging sync
This commit is contained in:
@@ -13,12 +13,20 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
modifiedValue: undefined
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
value (value) {
|
||||
if (typeof this.modifiedValue !== 'undefined') return this.modifiedValue
|
||||
return JSON.parse(value)
|
||||
},
|
||||
|
||||
answer (value) {
|
||||
this.modifiedValue = value
|
||||
this.$emit('answer', value)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user