当前位置:文章中心>技术教程
公告通知 新闻快递 技术教程 产品展示

CDN引入vue不兼容IE浏览器

发布时间:2021-11-26 点击数:896

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  }); }