I have the following code:
{
data: function () {
return {
questions: [],
sendButtonDisable: false,
}
},
methods: {
postQuestions
It depends on how you call your postQuestionsContent
method (if you call it asynchronously, you might need to bind
the this
context).
In most cases, you should be able to access it using this.$data.YOURPROPNAME
, in your case this.$data.sendButtonDisable
:
data: function () {
return {
questions: [],
sendButtonDisable : false
}
},
methods:
{
postQuestionsContent : function()
{
this.$data.sendButtonDisable = true;
}
}