写在前面
为了能够在下次实现前端页面的快速开发。
创建vue项目
vue环境配置
略
vue项目创建
vue creat ol_vue02
选择的是default,这个版本是仅运行时版本,不包含编译器。
详见https://www.cnblogs.com/xiaonian8/p/13705109.html
要配置文件:在项目目录下新建vue.config.js,写入以下代码:
module.exports = {
//Solution For Issue:You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
//zhengkai.blog.youkuaiyun.com
runtimeCompiler: true
}
依赖配置
安装依赖
cnpm i element-ui -S
npm install vue-router --save
引入依赖
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
参考文献
[1]圣杯布局详解 https://zhuanlan.zhihu.com/p/40327389
[2]仅运行时版本报错处理https://zhengkai.blog.youkuaiyun.com/article/details/107182655
[3]vue的完整版和运行时版的区别https://www.cnblogs.com/xiaonian8/p/13705109.html