Sort:  
node v12.13.0 / npm 6.12.0 / [email protected] / @vue/cli 4.1.1

"dependencies": {
    "bootstrap": "^4.4.1",
    "bootstrap-vue": "^2.1.0",
    "core-js": "^3.4.3",
    "dsteem": "^0.11.3",
    "ipfs-http-client": "^40.1.0",
    "mavon-editor": "^2.7.7",
    "steem": "^0.7.10",
    "vue": "^2.6.10",
    "vue-cookies": "^1.6.1",
    "vue-router": "^3.1.3",
    "vuex": "^3.1.2"
  },

mvvm.jpg

Vue Cli

1.使用cnpm, 注册为国内的镜像,使用cnpm代替npm
npm install -g cnpm --registry=https://registry.npm.taobao.org  

2.cnpm install -g @vue/cli
vue --version

3.创建一个新项目
vue create hello-world

//babel router vuex 选择这三项就可以了
//sass可以不选填,它是css语法的拓展
//eslink 是检查语法的,可以不用

4. 运行
cnpm run serve

5. 打包
cnpm run build
nrm 是一个npm源管理器,允许你快速地在如下npm源间切换:
npm install nrm -g
nrm ls
nrm use taobao  //切换不同的镜像源
npm install cnpm -g   //安装cnpm工具
//text.js
export default {
  name: 'tiantian',
  age: 28
}
export let title = 'every'

//main.js
import tt from './text.js'
import {title} from './text.js'

console.log(tt)   //tt.name  tt.age

vuelifecycle.png

Loading...
Loading...
1. 数组
  <h1 :class="['first', 'second']">hello</h1>
2. 三元表达式  
  <h1 :class="['first', 'second',flag?'active':'']">
3. 类名
  <h1 :class="['first', 'second', { 'active':flag }]">
4. 直接使用类
 <h1 :class="{first:true, second:true}"}>hello</h1>