美文网首页
ant-design-pro IE9下报错集合

ant-design-pro IE9下报错集合

作者: 木中木 | 来源:发表于2018-10-07 18:00 被阅读0次

    1.下载下来eslint报错:Expected linebreaks to be ‘LF’ but found ‘CRLF’
    解决方法:添加或修改linebreak-style为 ["error", "windows"],即
    rules: { 'linebreak-style': ["error", "windows"], },
    2.IE9下布局错乱如下图:

    image.png
    解决方法:
    <!-[if IE 9]> <style> .ant-layout-has-sider > .ant-layout-sider { float: left; position: relative; height: 100% !important; } </style> <![endif]-->
    1. 无法获取未定义或 null 引用的属性“authority”或者The Intl APIs must be available in the runtime, and do not appear to be built-in. An Intl polyfill should be loaded.或者requestAnimationFrame not defined
      第一步:
      $ npm install --save intl @babel-polyfill
      第二步,在src下新建一个global.js文件,添加如下代码
      import '@babel/polyfill'; global.requestAnimationFrame = function(callback) { setTimeout(callback, 0); }; global.cancelAnimationFrame= function(callback) { setTimeout(callback, 0); }; global.Intl = require('intl'); window.Intl = require('intl');

    相关文章

      网友评论

          本文标题:ant-design-pro IE9下报错集合

          本文链接:https://www.haomeiwen.com/subject/eunloftx.html