愛伊米

Vue v3.1.0 (Pluto) 釋出

出品|開源中國

文|局長

Vue。js v3。1。0

(Pluto) 已釋出,目前的最新版本為 3。1。1。

新版本增加了多項新特性,優化了效能,以及修復 bug,同時還有一些破壞性的變化。

Vue v3.1.0 (Pluto) 釋出

新特性

Migration Build

:提供相容 Vue 2 行為的 Vue 3 構建。Migration Build 旨在幫助將現有的 Vue 2 應用程式遷移到 Vue 3

compiler-core:

支援空白字元處理策略 (dee3d6a)

當使用 runtime 編譯器時,支援元件級別的

compilerOptions

(ce0bbe0)

config:

支援透過

app.config.compilerOptions

配置 runtime 編譯器 (091e6d6)

支援透過

is="vue:xxx"

將普通元素轉換為元件 (af9e699)

devtools:

改進對 KeepAlive 的支援(03ae300)

devtools:

引入效能事件 (performance events) (f7c54ca)

引入 onServerPrefetch (#3070) (349eb0f)

效能最佳化

只有當實際改變時才會觸發

$attrs

的更新 (5566d39)

compiler:

解析閉合標籤時跳過不必要的檢查 (048ac29)

當使用 global mixins 時,避免對 props/emits 的規範化進行 deopt 處理