refactor(editor): Standardize how we use defineEmits in components using the composition API (no-changelog) (#9934)

This commit is contained in:
Ricardo Espinoza
2024-07-04 03:30:51 -04:00
committed by GitHub
parent 7a3c127b2c
commit cef177455e
96 changed files with 212 additions and 222 deletions

View File

@@ -12,7 +12,7 @@ type Props = {
const props = defineProps<Props>();
const visible = defineModel<boolean>();
const emit = defineEmits<{
(e: 'confirmDelete', value?: string): void;
confirmDelete: [value?: string];
}>();
const locale = useI18n();

View File

@@ -22,8 +22,8 @@ const model = defineModel<(ProjectSharingData | null) | ProjectSharingData[]>({
required: true,
});
const emit = defineEmits<{
(event: 'projectAdded', value: ProjectSharingData): void;
(event: 'projectRemoved', value: ProjectSharingData): void;
projectAdded: [value: ProjectSharingData];
projectRemoved: [value: ProjectSharingData];
}>();
const selectedProject = ref(Array.isArray(model.value) ? '' : model.value?.id ?? '');