google-chrome - Vuejs 无法在 IE 上运行

标签 google-chrome internet-explorer vue.js babeljs

http://vuejs.froid.works/john

此链接在 Chrome 上运行良好。但是当 IE11 时它显示元素。

我尝试添加 babel 和 polyfill 但没有成功。 http://vuejs.froid.works/john/babel.html 它是单页网站。 Vuejs 在 script 标签中用作 CDN。我没有使用任何 webpack。

您可以通过查看其源代码来检查代码

最佳答案

如果你想支持没有 ES6 支持的浏览器,你就不能使用 ES6 函数语法而不用 babel 回填支持。为什么 babel 不适合你可能有几个原因,但这并不重要。

此语法:

mounted() {

如果您不将其转译,则无法使用,因此请使用:

mounted: function() {

关于google-chrome - Vuejs 无法在 IE 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51761147/

相关文章:

google-chrome - 将本地 WebSQL/IndexedDB 数据库与 'pre-built' 数据库文件同步?

google-chrome - 开发工具自动完成功能在 chrome 35、ubuntu 14.04 上不起作用

vue.js - 当您在 Jest 测试中等待 "anything"时,Vue 是否会计算 nextTick?

vue.js - 如何在大型 SPA 中使用良好的 VueX 商店设计?

Vue.js vuetify v-textarea 在未扩展的 v-layout 内不能正确自动增长

javascript - 使用 BrowserAction 设置背景图像

javascript - 在 chrome 扩展中创建 HTML 对话框弹出窗口

javascript - 与 IE7 的兼容性

html - IE11 : very poor perfomance in rendering tables - any solutions?

javascript - $(document).ready 不要在 IE 中加载