Vue.js v3.1.0 (Pluto) 发布,看看有哪些新特性

科技资讯 投稿 73500 0 评论

Vue.js v3.1.0 (Pluto) 发布,看看有哪些新特性

Vue.js v3.1.0 (Pluto 已发布,目前的最新版本为 3.1.1。

新版本增加了多项新特性,优化了性能,以及修复 bug,同时还有一些破坏性的变化。

性能优化

  1. 只有当实际改变时才会触发$attrs的更新

  2. compiler:解析闭合标签时跳过不必要的检查

  3. 当使用 global mixins 时,避免对 props/emits 的规范化进行 deopt 处理

新特性

  1. Migration Build:提供兼容 Vue 2 行为的 Vue 3 构建。Migration Build 旨在帮助将现有的 Vue 2 应用程序迁移到 Vue 3

  2. compiler-core:支持空白字符处理策略 

  3. 当使用 runtime 编译器时,支持组件级别的compilerOptions

  4. config:支持通过app.config.compilerOptions配置 runtime 编译器 

  5. 支持通过is="vue:xxx"将普通元素转换为组件

  6. devtools:改进对 KeepAlive 的支持

  7. devtools:引入性能事件 (performance events 

  8. 引入 onServerPrefetch

编程笔记 » Vue.js v3.1.0 (Pluto) 发布,看看有哪些新特性

赞同 (92) or 分享 (0)
游客 发表我的评论   换个身份
取消评论

表情
(0)个小伙伴在吐槽