Vue3 从零到一,setup() 新尝试

Vue3 RC,发布咯,可以尝鲜了

关键字 ref,reactive,watch,computed,router,store

  1. 安装 vue, 新建3.0项目
npm i @vue/cli -g
vue create vue-next
cd vue-next

vue add vue-next
  1. 新建 snippet (preferences -> user snippts -> vue.json)
{
    "Vue3": {
        "prefix": "vue3",
        "body": [
            "",
            "",
            "",
        ],
        "description": "vue3 snippt"
    }
}
  1. 修改Home.vue


  1. 运行
npm run serve
 DONE  Compiled successfully in 289ms
  App running at:
  - Local:   http://localhost:8080/ 
  - Network: http://192.168.1.1:8080/

Let's see it in Vue3

你可能感兴趣的:(Vue3 从零到一,setup() 新尝试)