Hi,这里是三咲智子,Vue 核心团队成员。Vue 3.3 的这次发布主要是为了改进 DX (开发者体验),新增了一些语法糖和宏,以及 TypeScript 上的改善。
- 泛型组件
- 在 SFC(单文件组件)中导入外部 TS 类型
defineSlots
来定义插槽的类型defineEmits
更便捷的语法
import UIKit | |
import RealmSwift | |
class Data: Object { | |
dynamic var name = "" | |
... | |
dynamic var order = 0 // 並べ替えのためのカラムが必要 | |
} |