![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
IE兼容
浅听记忆2
这个作者很懒,什么都没留下…
展开
-
webpack js兼容性处理
目前最新的代码规范很多都不能直接被浏览器识别访问,而借助webpack我们可以使用babel对js进行转换,将其变成浏览器可识别的代码其中就有个loader:babel-loader 而跟他一起使用的或者有依赖关系的还有其他的 @babel/core @babel/preset-env @babel/plugin-proposal-class-properties @babel/plugin-proposal-decorators 所以我们需要安装这些包cnpm i babel-loade...原创 2021-05-21 10:52:01 · 553 阅读 · 0 评论 -
webpack配置之postcss-loader和postcss-preset-env
在我们打包css的时候难免会遇到css的兼容性问题此时webpack提供了postcss-loader和对应插件postcss-preset-env而这两个东西的使用在webpack4和webpack5有些许不同 rules: [{ test: /\.css$/, use: [ // 'style-loader', \ // 取代原创 2021-05-20 18:44:08 · 4288 阅读 · 1 评论 -
IE兼容问题整理
1.后台返回的Blob文件流格式在ie和谷歌是不一样的: 谷歌的可能是 { size:74, type:"application/json" }, 而IE的是 { size:74, type:"application/json;charset=UTF-8" }2.下载文件需要判定是否是IE//下载文件export function dow...原创 2020-06-17 17:40:41 · 725 阅读 · 0 评论 -
IE请求兼容性问题
IE请求路径中无法识别中文字符,需要将参数进行转码const requestbody = encodeURI(`/bid/bond/updateInvestor?investorId=${baseId}&createUser=${12}&investorFullName1=${investorFullName}&investorSimpleName1=${investorSimpleName}&investorType=${investorType}&conta原创 2020-06-17 15:14:00 · 192 阅读 · 0 评论 -
IE下载或者导出不兼容问题处理
//下载文件export function downloadPDF(data, name = 'file.docx') { if (!data) { return } var blob = new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8', }) if (isIE()) { window.原创 2020-06-17 11:36:53 · 333 阅读 · 0 评论 -
ie下new Date(2020-02-02 12:12:12)类型的时间出现Invalid Date
let time = record.filingTimeEnd;time = time.replace(/-/g,':').replace(' ',':');time = time.split(':');let time1 = `${time[0]}/${time[1]-1}/${time[3]} ${time[3]}:${time[4]}`let newTimer = new Dat...原创 2020-04-13 11:25:18 · 1374 阅读 · 0 评论 -
XMLHttpRequest: 网络错误 0x2efe, 由于出现错误 00002efe 而导致此项操作无法完成
ie下通过url拼接参数带中文的请求兼容性处理: 需要通过encodeURI将url转码,这样url不包含中文就可以请求成功 encodeURI(url)即可; 如...原创 2019-11-19 16:20:22 · 6796 阅读 · 0 评论