1
我用這mixin - 但它給我IE11,無法在Chrome中,FF,Safari瀏覽器的錯誤,所以現在看來,這只是一個IE瀏覽器有關的問題..錯誤回調守望者,Vue公司JS
的錯誤即時得到的是:錯誤回調守望者 「inViewport.now」: 「類型錯誤:對象不支持此操作」(?WAT)
的守望者的代碼如下所示:
watch: {
'inViewport.now': function(visible) {
if(visible) {
this.loadDataToSystem();
this.elementIsVisible = true;
//Update graph with new data
this.resetTimer();
this.updateGraphOptions.minutes = updateIn;
this.updateGraphDataTimer = setInterval(function() {
this.loadDataToSystem();
}.bind(this), 300000);
} else {
this.elementIsVisible = false;
//Stop updating graph
this.stopTimer();
clearInterval(this.updateGraphDataTimer);
this.updateGraphOptions.minutes = null;
this.updateGraphOptions.started = false;
}
}
},
有人有什麼錯誤的想法嗎?