export default {
components: {
Attribute,
vueCustomScrollbar,
Time
},
data() {
return {
user : {},
}
},
computed:{
reversedMessage: function () {
return 100000;
}
},
mounted() {
// how to use vue worker to access
this.$worker.run(this.userDetails()); // not working
this.$worker.run((arg1) => `this.$worker run 2: ${arg1}`, [this.$reversedMessage]). // not working
this.$worker.run((arg1) => `this.$worker run 2: ${arg1}`, [this.$data.user]). // working
},
methods: {
userDetails(){
}
}
}
I have read this
It is not possible to pass as an arg this from a Vue Component. You can pass this.$data or any variable within data or computed
but no idea how to access data and methods insight worker ?