声明一个空数组,不带默认值,但是在后续的方法中可以动态添加删除。可以在dom中显示其对象里面的属性。
组合式API, 一般用ref:
type Mytype = { value1: string; value2: number const arr = ref<Mytype[] | null>(null);