Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue3.2发布的新特性 #6

Open
vnues opened this issue Sep 10, 2021 · 0 comments
Open

Vue3.2发布的新特性 #6

vnues opened this issue Sep 10, 2021 · 0 comments

Comments

@vnues
Copy link
Owner

vnues commented Sep 10, 2021

原文地址:https://blog.vuejs.org/posts/vue-3.2.html

image

主要新增了两个单文件特性

  • <script setup> 编译时的语法糖 可以提高效率
  • <style> v-bind 在`单文件组件`中可以让style标签的样式获取到script标签的变量值(很神奇!)

Web Components

Vue也提供了一个apidefineCustomElement 来创建native custom elements,也就是创建Web Components

image

其他就是一些性能提升

由于 @basvanmeurs 的出色工作,3.2 对 Vue 的反应性系统进行了一些重大的性能改进。具体如下:

模板编译器也得到了一些改进:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant