vue-11vue3新特性

123 阅读1分钟

v3-migration.vuejs.org/

    1. api层⾯Vue3新特性主要包括:
    • Composition API
    • SFC Composition API Syntax Suger 语法糖
    • Teleport传送⻔
    • Fragments ⽚段
    • Emits Component Option 选项
    • createRenderer API from @vue/runtime-core ⾃定义渲染器
    • SFC State-driven CSS variables CSS变量
    • SFC <style scoped> can now include global rules or rules that target only slotted content
    • Suspense(experimental)

    1. 另外,Vue3.0在框架层⾯也有很多亮眼的改进:
    • 更快
    • 更⼩:更好的摇树优化
    • 更容易维护:TypeScript + 模块化
    • 更容易扩展
      • 独⽴的响应化模块
      • ⾃定义渲染器