Vue 3.4 的发布带来了多项重大内部改进。最显著的是,模板解析器被重写,速度提高了两倍,同时重构了反应系统,使效果触发更加准确高效。此外,还包括了多项 API 改进,如 defineModel 的稳定化和绑定属性时的新同名简写功能 oai_citation:1,Announcing Vue 3.4 | The Vue Point。升级到 3.4 版本时,建议同时更新相关依赖,包括 Volar/vue-tsc、@vitejs/plugin-vue、nuxt 和 vue-loader 等 oai_citation:2,Announcing Vue 3.4 | The Vue Point。
新的模板解析器基于 htmlparser2 的分词器,仅需遍历整个模板字符串一次,使编译性能提高约 44%,并对 Volar/vue-tsc 和其他社区插件也有所帮助 oai_citation:3,Announcing Vue 3.4 | The Vue Point。反应系统的重构旨在提高计算属性的重计算效率,减少不必要的组件重新渲染,同时保持向后兼容性 oai_citation:4,Announcing Vue 3.4 | The Vue Point。
defineModel 是一个 <script setup> 宏,旨在简化支持 v-model 的组件实现,现已从 3.3 版本的实验特性稳定化到 3.4 版本 oai_citation:5,Announcing Vue 3.4 | The Vue Point。v-bind 的同名简写功能也得到了实现 oai_citation:6,Announcing Vue 3.4 | The Vue Point。此外,改进了水合不匹配错误信息的清晰度,并添加了编译时标志,以便在生产中包含完整的错误详情 oai_citation:7,Announcing Vue 3.4 | The Vue Point。
Vue 在生产构建中省略了长错误消息字符串以减少包大小,因此添加了生产错误参考页面和编译时标志参考,以便更好地处理和配置这些错误 oai_citation:8,Announcing Vue 3.4 | The Vue Point。从 3.4 版本开始,Vue 默认不再注册全局 JSX 命名空间,以避免与 React 的冲突,同时提供了两种处理 TSX 的选项 oai_citation:9,Announcing Vue 3.4 | The Vue Point。还移除了一些废弃特性,如反应性变换、
#vuejs
完整文章请参考:Announcing Vue 3.4 | The Vue Point。
新的模板解析器基于 htmlparser2 的分词器,仅需遍历整个模板字符串一次,使编译性能提高约 44%,并对 Volar/vue-tsc 和其他社区插件也有所帮助 oai_citation:3,Announcing Vue 3.4 | The Vue Point。反应系统的重构旨在提高计算属性的重计算效率,减少不必要的组件重新渲染,同时保持向后兼容性 oai_citation:4,Announcing Vue 3.4 | The Vue Point。
defineModel 是一个 <script setup> 宏,旨在简化支持 v-model 的组件实现,现已从 3.3 版本的实验特性稳定化到 3.4 版本 oai_citation:5,Announcing Vue 3.4 | The Vue Point。v-bind 的同名简写功能也得到了实现 oai_citation:6,Announcing Vue 3.4 | The Vue Point。此外,改进了水合不匹配错误信息的清晰度,并添加了编译时标志,以便在生产中包含完整的错误详情 oai_citation:7,Announcing Vue 3.4 | The Vue Point。
Vue 在生产构建中省略了长错误消息字符串以减少包大小,因此添加了生产错误参考页面和编译时标志参考,以便更好地处理和配置这些错误 oai_citation:8,Announcing Vue 3.4 | The Vue Point。从 3.4 版本开始,Vue 默认不再注册全局 JSX 命名空间,以避免与 React 的冲突,同时提供了两种处理 TSX 的选项 oai_citation:9,Announcing Vue 3.4 | The Vue Point。还移除了一些废弃特性,如反应性变换、
app.config.unwrapInjectedRef
、@vnodeXXX
事件监听器和 v-is 指令 oai_citation:10,Announcing Vue 3.4 | The Vue Point。#vuejs
完整文章请参考:Announcing Vue 3.4 | The Vue Point。
blog.vuejs.org
Announcing Vue 3.4 | The Vue Point
The official blog for the Vue.js project
Vue 3.5.0 "Tengen Toppa Gurren Lagann" 正式发布。
我还在用 Vue 2.6 版本🤓
#vuejs
https://blog.vuejs.org/posts/vue-3-5
我还在用 Vue 2.6 版本🤓
#vuejs
https://blog.vuejs.org/posts/vue-3-5
blog.vuejs.org
Announcing Vue 3.5 | The Vue Point
The official blog for the Vue.js project