Vue.js v3.1.0 (Pluto 已发布,目前的最新版本为 3.1.1。
新版本增加了多项新特性,优化了性能,以及修复 bug,同时还有一些破坏性的变化。
性能优化
只有当实际改变时才会触发$attrs的更新
compiler:解析闭合标签时跳过不必要的检查
当使用 global mixins 时,避免对 props/emits 的规范化进行 deopt 处理
新特性
Migration Build:提供兼容 Vue 2 行为的 Vue 3 构建。Migration Build 旨在帮助将现有的 Vue 2 应用程序迁移到 Vue 3
compiler-core:支持空白字符处理策略
当使用 runtime 编译器时,支持组件级别的compilerOptions
config:支持通过app.config.compilerOptions配置 runtime 编译器
支持通过is="vue:xxx"将普通元素转换为组件
devtools:改进对 KeepAlive 的支持
devtools:引入性能事件 (performance events
引入 onServerPrefetch