1、es6標準的省略“function”的寫法,IE不兼容;
// es6寫法
data() {
return {}
}
// 兼容IE寫法
data: function{
return {}
}
2、es6箭頭函數也不兼容
// 異步寫法
async getData(){
const res = await axios.get("");
}
// 異步寫法和箭頭函數需要改爲function
getData(){
const that = this
const res = axios.get("")
.then(function(){
// that
});
}