专业的编程技术博客社区

网站首页 > 博客文章 正文

Vue 3源码公布,89%的人收藏了它(vue3 源码解读)

baijin 2024-10-26 08:03:42 博客文章 8 ℃ 0 评论

10月5日00:45 Vue.js框架作者,HTML5版Clear打造人尤雨溪于微博公布尚处于pre-alpha状态的Vue 3源码。

What’s coming in Vue3.0

? Make it faster

? Make it smaller

? Make it more maintainable

? Make it easier to target native

? Make your life easier

“We have achieved most of the architectural goals and new features planned for v3”已经实现v3的大部分架构目标和新功能。

? Compiler编译器

Modular architecture模块化体系架构

"Block tree" optimization "Block tree"优化

More aggressive static tree hoisting static tree hoisting功能优化

Source map support支持Source map

Built-in identifier prefixing (aka "stripWith")内置标识符前缀(又名"stripWith")

Built-in pretty-printing内置pretty-printing功能

Lean ~10kb brotli-compressed browser build after dropping source map and identifier prefixing 删除源映射和标识符前缀后构建lean~10kb brotli压缩浏览器

? Runtime运行时

Significantly faster明显加快

Simultaneous Composition API + Options API support, with typings 同时支持Composition API 、Options API及 typings

Proxy-based change detection 基于Proxy的变更检测

Fragments支持Fragments

Portals支持Portals

Suspense w/ async setup()支持Suspense w/ async setup()

However, there are still some 2.x parity features not completed yet:“但是,仍有一些2.x奇偶校验功能尚未完成。”

Server-side rendering服务器端渲染

<keep-alive>

<transition>

Compiler DOM-specific transforms 编译器特定于“DOM”的转换

v-on DOM modifiers DOM修饰符

v-model

v-text

v-pre

v-once

v-html

v-show

The current implementation also requires native ES2015+ in the runtime environment and does not support IE11 (yet).当前的实现还需要在运行环境中使用本机ES2015+,但还不支持IE11。值得注意的是,Vue 3.0虽有大幅度调整,却仍与2.x兼容。

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表