在 Vue3 中使用 TypeScript 时,通过 ref 获取标签(包括 DOM 元素或组件实例)的 TypeScript 类型定义需根据场景区分:
1. 获取 DOM 元素的类型
若 ref 绑...
Typescript
Typescript 中的 interface 和 type 区别
interface 和 type在官方规范中所描述的区别:
An interface can be named in an extends or implements clause, but a type alias for an object type lite...
