Vue
来源:互联网 发布:域名注册哪家便宜 编辑:程序博客网 时间:2024/06/05 21:17
参考 : IE运行出现的问题
背景
项目使用的是 vue2 , 打包后上传服务器,访问;IE 不显示,360 不显示,老版谷歌浏览器不显示内容。
1. 解决不显示内容
在 index.html 添加下面内容
<meta http-equiv="X-UA-Compatible" content="IE=edge">
比如:
<!DOCTYPE html><html><head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- 最新 ie --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta charset="utf-8"> <title>Demo</title></head><body><div id="app"></div><!-- built files will be auto injected --></body></html>
2. 语法不支持
如果出现语法不支持,比如 includes
, 那么使用 babel-polyfill
解决:
下载安装 babel-polyfill
:
npm install babel-polyfill --save-g
在 main.js
中 引入 babel-polyfill
对象:
import 'babel-polyfill'
这样就兼容了
阅读全文
1 0
- Vue
- vue
- vue
- Vue
- Vue
- vue
- vue
- vue
- vue
- vue
- vue
- vue
- vue
- VUE
- vue
- vue
- Vue
- Vue
- vim 命令基础学习(1)——清空文件内容,显示行号,跳转到指定行
- PHP识别PC或者手机端访问
- LeetCode
- 109. Convert Sorted List to Binary Search Tree
- 关键字(sizeof),数组,指针,字符串的注意点
- Vue
- Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to
- 欢迎使用CSDN-markdown编辑器
- Android Studio 打包及引用 aar
- FTPrep, 3 Longest Substring Without Repeating Characters
- iMindMap各种视图介绍
- Django-信号Signals
- CentOS 7配置静态IP步骤
- 第四季1.Java中的泛型