[Vuejs]-Vue typescript v-for type

0👍

You can use PropType built-in vue.

import type { PropType } from "vue";

export interface IGroupTabData {
  id: string;
  name: string;
  [key: string]: any;
}

const props = defineProps({
  groupList: {
    type: Array as PropType<IGroupTabData[]>
  }
});

Leave a comment