I feel like there's an existing answer for this problem but I cannot find it so here goes my attempt at a canonical answer...
Any value that you want to be reactive within a Vue component or instance must be defined within the data
property. Without this, Vue cannot create the required observable properties needed to read and write values from v-model
bindings.
So in your case, you will need something like
data: () => ({
comments: [],
taskCommentBody: ''
})
If anyone can locate an existing post, I'm happy to mark this as a duplicate and make this answer a community wiki.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…