1.下载下来eslint报错:Expected linebreaks to be ‘LF’ but found ‘CRLF’
解决方法:添加或修改linebreak-style为 ["error", "windows"],即
rules: { 'linebreak-style': ["error", "windows"], },
2.IE9下布局错乱如下图:
解决方法:
<!-[if IE 9]> <style> .ant-layout-has-sider > .ant-layout-sider { float: left; position: relative; height: 100% !important; } </style> <![endif]-->
- 无法获取未定义或 null 引用的属性“authority”或者The
Intl
APIs must be available in the runtime, and do not appear to be built-in. AnIntl
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');
网友评论