New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IE11兼容,急急急 #16
Comments
Element Angular 输出的是 ES6 代码,如果你引用了组件应该自己压缩或提供 polyfills,组件本身不包含任何 shim。 |
没完全搞明白,直接说怎么处理,在IE11下面不报错就行,多谢! |
直接说就是不是 UI 库的问题,是你没做好兼容。 |
你好!
这确实是没有正确将ES6转换为ES5所致,我所用的地方如下,看看能否帮我找出原因:
就以上关于element-angular的代码,不知道需要添加什么样的polyfil来解决 IE11下面的报错
常见的polyfil已经添加上了,
劳烦给看看,多谢!
---------------------------------------------------------------
中瑞金服研发中心公共研发部框架组
Tel: 13589299411
Email:13589299411@163.com
Address:青岛市市北区黑龙江南路2号万科中心C座10F
En:Qingdao Lunz Technology Software Co. Ltd.
在2018年2月6日 14:48,维特<notifications@github.com> 写道:
Element Angular 输出的是 ES6 代码,如果你引用了组件应该自己压缩或提供 polyfills,组件本身不包含任何 shim。
简单的说,Element 本身没有扩展任何语法,没有创造语法,使用的都是标准的 ES6 语法,在 Angular 的允许范围之内。这是你的代码 ES6 语法没有正确的转化为 ES5 或是缺少 polyfill 所致,在 IE11 下具体是缺少哪些特性需要你自己判断填补。
最后重要的事情再说一次,UI 库本身不会扩展语法与创造语法。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
你好!
Safari下面也报同样的错,怎么填补都没有效果
…---------------------------------------------------------------
雷洪刚 中瑞金服研发中心公共研发部框架组
Tel: 13589299411
Email:13589299411@163.com
Address:青岛市市北区黑龙江南路2号万科中心C座10F
En:Qingdao Lunz Technology Software Co. Ltd.
在2018年2月7日 15:52,Mr Lei<13589299411@163.com> 写道:
你好!
这确实是没有正确将ES6转换为ES5所致,我所用的地方如下,看看能否帮我找出原因:
就以上关于element-angular的代码,不知道需要添加什么样的polyfil来解决 IE11下面的报错
常见的polyfil已经添加上了,
劳烦给看看,多谢!
---------------------------------------------------------------
中瑞金服研发中心公共研发部框架组
Tel: 13589299411
Email:13589299411@163.com
Address:青岛市市北区黑龙江南路2号万科中心C座10F
En:Qingdao Lunz Technology Software Co. Ltd.
在2018年2月6日 14:48,维特<notifications@github.com> 写道:
Element Angular 输出的是 ES6 代码,如果你引用了组件应该自己压缩或提供 polyfills,组件本身不包含任何 shim。
简单的说,Element 本身没有扩展任何语法,没有创造语法,使用的都是标准的 ES6 语法,在 Angular 的允许范围之内。这是你的代码 ES6 语法没有正确的转化为 ES5 或是缺少 polyfill 所致,在 IE11 下具体是缺少哪些特性需要你自己判断填补。
最后重要的事情再说一次,UI 库本身不会扩展语法与创造语法。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
请给出能复现的代码。 |
复现的代码??你的意思是将代码粘贴在发给你吗?
…---------------------------------------------------------------
中瑞金服研发中心公共研发部框架组
Tel: 13589299411
Email:13589299411@163.com
Address:青岛市市北区黑龙江南路2号万科中心C座10F
En:Qingdao Lunz Technology Software Co. Ltd.
在2018年2月7日 23:29,Bradley Xu<notifications@github.com> 写道:
请给出能复现的代码。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
原因在于 angular/cli 不能将第三方的 ES6 代码转译成 ES5,在没有自己编写编译脚本或使用 eject 的项目中,打包出的代码包含 ES6 引起的 IE 的错误。 |
Issue Type:
Version & Environment:
0.5.6
Description:
用element-angular组件在别的浏览器下面没有问题,但是在IE11浏览器下面报错,怎么回事儿,怎么处理啊,急急急!!!
报错信息如下:
1、SCRIPT1002: 语法错误
vendor.d728a6e48f330e2ec5f4.bundle.js (44114,1)
定位到代码位置:
class ElAlert {
constructor() {
this.type = 'info';
this.center = false;
this.closable = true;
this.closeText = '';
this.showIcon = false;
this.close = new WEBPACK_IMPORTED_MODULE_0__angular_core"EventEmitter";
this.visible = true;
}/
2、SCRIPT5007: 无法获取未定义或 null 引用的属性“call”
inline.be6425cc5ee786827d95.bundle.js (55,12)
定位到代码位置为:
modules[moduleId].call(module.exports, module, module.exports, webpack_require);
The text was updated successfully, but these errors were encountered: