Answer the question
In order to leave comments, you need to log in
How to make the contents of a non-arrow function available in the template?
Hello. Faced a problem that I can not transfer value from normal function. How to do it?
data () {
return {
status: 'ss'
}
},
created () {
function adBlockNotDetected() {
console.log('AdBlock is not enabled')
status = 'AdBlock is not enabled'
}
}
Answer the question
In order to leave comments, you need to log in
And what about the context?
created () {
var _this=this
function adBlockNotDetected() {
console.log('AdBlock is not enabled')
_this.status = 'AdBlock is not enabled'
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question