vue中箭頭函數的使用

一.箭頭函數和普通函數的區別: 1.普通函數中的this: 代表它的直接調用者(js的this是執行上下文), 例如 obj.cal() ,那麼cal()方法中的this就是obj 若沒找到直接調用者,則this指的是 window (常見的window的屬性和方法有: alert, location,document,parseInt,setTimeout,setInterval等)或者 und
相關文章
相關標籤/搜索