2
我試圖去運行一個函數500ms運行。在此之後的文檔:VueJS 2未捕獲的ReferenceError:_沒有用去抖動定義
https://vuejs.org/v2/guide/migration.html#debounce-Param-Attribute-for-v-model-removed
methods: {
// Get the data needed for this page
fetchData: _.debounce(function() {
this.$http.get('widgets/quickfindordernumber/' + this.quickFindOrderNumber).then(function (response) {
console.log(response.body)
}, function (error) {
console.log(error);
});
}, 500)
}
但運行此功能時,我在控制檯Uncaught ReferenceError: _ is not defined
得到一個錯誤,我曾試圖消除_。在反彈前,但它表示反彈也沒有定義。
_是下劃線或lodash,外部庫,不Vue公司。 – Bert