const array: any = []; // any可以换成需要的类型
const refArray = ref(array);
或者使用:
let list: any[] = [];
const refList = ref(list);
或者直接使用:
const list=ref([] as any)
props中定义:
const props = defineProps({
historyList: {
type: Array<myType>, // 或者myType[]
required: true,
}
});