v3_update

This commit is contained in:
24kcs
2020-11-13 14:28:34 +08:00
parent 832b961d34
commit b832c95e87
9 changed files with 64 additions and 32 deletions

View File

@@ -4,8 +4,8 @@
- Vue.js 3.0 "One Piece" 正式版在今年9月份发布
- 2年多开发, 100+位贡献者, 2600+次提交, 600+次PR
- ***Vue3支持vue2的大多数特性***
- ***更好的支持Typescript***
- <font color='red'>**Vue3支持vue2的大多数特性**</font>
- <font color='red'>**更好的支持Typescript**</font>
@@ -14,25 +14,29 @@
- 打包大小减少41%
- 初次渲染快55%, 更新渲染快133%
- 内存减少54%
- ***使用Proxy代替defineProperty实现数据响应式***
- ***重写虚拟DOM的实现和Tree-Shaking***
- <font color='red'>**使用Proxy代替defineProperty实现数据响应式**</font>
- <font color='red'>**重写虚拟DOM的实现和Tree-Shaking**</font>
## 3) *Composition(组合) API* Option API
## 3) 新增特性
- <font color='red'>**Composition (组合) API**</font>
- setup
- ref 和 reactive
- computed 和 watch
- 新的生命周期函数
- provide与inject
- ...
- ref 和 reactive
- computed 和 watch
- 新的生命周期函数
- provide与inject
- ...
- 新组件
- Fragment - 文档碎片
- Teleport - 瞬移组件的位置
- Suspense - 异步加载组件的loading界面
## 4) 其它新增特性
- 其它API更新
- Fragment - 文档碎片
- Teleport - 瞬移组件的位置
- Suspense - 异步加载组件的loading界面
- 全局API的修改
- 全局API的修改
- 将原来的全局API转移到应用对象
- 模板语法变化