add babel and modify documents

This commit is contained in:
RainSun 2020-01-20 10:18:52 +08:00
parent 8b011ba141
commit 44750f7519
5 changed files with 18 additions and 5 deletions

View File

@ -23,3 +23,12 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
* 课表页(tab)
* 成绩页(tab)
* 登出页(tab)
## vue-cli3下 解决浏览器兼容性问题
1. 安装babel-polyfill依赖`npm i babel-polyfill --save-dev`
2. vue.config.js新增
```js
chainWebpack: config => {
config.entry('main').add('babel-polyfill') // main是入口js文件
}
```

View File

@ -20,6 +20,7 @@
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"babel-polyfill": "^6.26.0",
"node-sass": "^4.12.0",
"sass-loader": "^8.0.0",
"vue-template-compiler": "^2.6.10"

View File

@ -8,7 +8,7 @@
<!-- 标题 -->
<meta itemprop="name" content="CoC" />
<!-- 描述 -->
<meta itemprop="description" content="为全长理师生提供课表代理查询服务" />
<meta itemprop="description" content="为长理同学提供课表代理查询服务" />
<title>CoC</title>
</head>
<body>

View File

@ -75,13 +75,13 @@ export default {
//
load.close();
this.$alert("账号或密码出错,请重试", "登录错误", {
confirmButtonText: "我知道了",
confirmButtonText: "阅!",
});
} else {
//
load.close();
this.$alert("十分遗憾,教务挂了,请稍后再试", "与我无瓜", {
confirmButtonText: "我知道了",
this.$alert("教务挂了,等通知吧", "与我无瓜", {
confirmButtonText: "阅!",
});
}
})

View File

@ -1,3 +1,6 @@
module.exports = {
productionSourceMap: false
productionSourceMap: false,
chainWebpack: config => {
config.entry('main').add('babel-polyfill') // main是入口js文件
}
}