(22)打鸡儿教你Vue.js

vue.js

单页面,多页面

Vue cli工具
复杂单页面应用Vue cli工具

交互设计,逻辑设计,接口设计

代码实现,线上测试

git clone,git int

创建分支,推送分支,合并分支

删除分支,回退版本

image.png

git clone ....git

ls

cd xxx/

git status
位于分支 master

没有提交

ls

git branch -a
git branch

touch test.txt
git status

git add .

git commit -m '初次提交'

ls

git remote -v

git push origin master

git branch -a

git checkout -b dev

切换到一个新分支 'dev'

ls

touch test1.txt

git status
位于分支dev

git add test1.txt

git commit -m "dev上的"

git push origin dev

git branch -a

git checkout mastr
切换分支

git merge dev
合并分支

ls

git push origin master

删除分支
git push origin :dev

退回之前的版本:
git reset --hard head^

git log
<template>
<div>
<ul>
<li v-for="(item, index) in lists"
@click="choose(index)"
:class="{active: index == current}"
:key="index">
{{item}}
</li>
</ul>
</div>
</template>

data(){
return {
 current: '',
 lists:
 target: []
 }
},
methods: {
 choose(index) {
 console.log(index)
 this.current = index
 }
}

<style scoped>
li.active {
 background: green;
}
</style>
<ul>
<li v-for="(item, index) in target" :key="index">{{item}}</li>
</ul>
add() {
 this.target.push(this.lists[this.current])
}
:class="{active: index == current && current !== ' ' }"
add () {
 if(this.current === ' '){return}
 this.target.push(this.lists[this.current])
 this.current = ' '
}

请点赞!因为你的鼓励是我写作的最大动力!

官方微信公众号

吹逼交流群:711613774

吹逼交流群

posted @ 2019-07-03 18:04  达达前端  阅读(106)  评论(0编辑  收藏  举报