前端项目操作vue指南

下载Git:https://git-scm.com/downloads

下载Node:https://nodejs.org/en/download/

项目搭建

1
2
3
4
5
6
git clone http://gitlab.odc.com/FE-Projects/wuxi-zhigu.git
cd/FE-Projects
npm install
npm install cooking-cli -g
cooking watch -p // 启动项目
cooking build -p // 打包项目

项目开发说明

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
代码说明:
<script>
import .. from ..; //引入组件以及其他插件
export default {
component:{
// 注册引入的组件,插件无需注册
},
data(){
return {
obj:{},
number:0
// template中所引用的数据
}
},
methods:{ // 页面中需要用到的方法
handleDosomething(){
// 自定义方法
}
},
created(){
this.handleDosomething(); // 调用方法
}
}
</script>

参考资料汇总:

vue语法:https://cn.vuejs.org/v2/guide/
路由定义:https://router.vuejs.org/zh-cn/
UI框架使用指南:http://element.eleme.io/#/zh-CN/component/installation
构建工具使用说明:http://cookingjs.github.io/zh-cn/index.html
git使用指南:http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/