vue-worker
vue-worker copied to clipboard
how to use vue-worker in Axios
for example,request callback
getCoreIndicatorList(params).then(({ data }) => {
this.$worker.run((context,source)=>{
context.coreIndicator= source.todayTotalAmount | 0
},[this,data]).
.then(() => // do something})
.catch(console.error)
Failed to execute 'postMessage' on 'Worker': function () { [native code] } could not be cloned.
Your code sample has a typo: this,data
should be this.data
.