因为没有系统性的学习过前端知识,对于前端就只知道html、css、js,前端框架也就只会用jQuery,什么 webpack、node.js、vue、react 等都是一窍不通,后来开始摸索 vue,接触到了 elementUI,也解了一下 webpack 和 node,边学边撸了个舔狗的艺术项目(https://dogart.me),没有系统性的教学,所以很多东西都是自己踩坑摸索。

之前就看到尤大放出 vue3 Bate 版的消息,就像看一看,但是英文文档让我打了退堂鼓,这两天网上摸鱼摸到了 vue3 的官方中文文档(https://v3.cn.vuejs.org),而且 elementUI 也推出了基于 Vue3 的新版本 element-plus,于是结合网上的资料又开始折腾 Vue3,这里记录一下学习资料。

安装 Vue3

# 最新稳定版
$ npm install vue@next

安装 Vue-router 4.x

文档(英文):https://next.router.vuejs.org/

npm install vue-router@4

Vue3 的新特性Composition Api 和 Vue2 OPtions Api 区别

视频讲解:https://zhuanlan.zhihu.com/p/158609971
文字资料:https://cloud.tencent.com/developer/article/1529333

当然,vue3 也是向下兼容 Vue2 的Options Api 写法的

ref 和 reactive 数据封装

文字资料:https://cloud.tencent.com/developer/article/1529334
文字资料:https://baijiahao.baidu.com/s?id=1681607468071125946

一些别人的学习记录

Vue3 新特性学习:https://www.yvonnecheung.cn/views/note/2020/vue3.html

后面准备用 element-plus 把舔狗的艺术重撸一遍,但我看到 element-plus 的官方文档很多地方还是用的 Options Api 写法,我猜大概是为了让老版本兼容吧。

vue3 重撸 舔狗艺术 的开源地址放在 https://github.com/Dieinwarm/dogartvue 的 next 分支下

最后修改:2021 年 01 月 27 日
請我飲一杯咖啡