Skip to content

Commit bafcaae

Browse files
author
Guillaume Chau
committed
fix(ui): prompt input being reset by lagging sync
1 parent e777a16 commit bafcaae

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/@vue/cli-ui/src/components/Prompt.vue

+8
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,20 @@ export default {
1313
}
1414
},
1515
16+
data () {
17+
return {
18+
modifiedValue: undefined
19+
}
20+
},
21+
1622
methods: {
1723
value (value) {
24+
if (typeof this.modifiedValue !== 'undefined') return this.modifiedValue
1825
return JSON.parse(value)
1926
},
2027
2128
answer (value) {
29+
this.modifiedValue = value
2230
this.$emit('answer', value)
2331
}
2432
}

0 commit comments

Comments
 (0)