refactor: add type define emits

This commit is contained in:
Thanaphon Frappet 2024-11-27 14:52:43 +07:00
parent e8971845cd
commit 46b69deb59

View file

@ -11,21 +11,16 @@ withDefaults(
defineProps<{
data?: any;
title?: string;
dense?: boolean;
outlined?: boolean;
readonly?: boolean;
separator?: boolean;
typeProduct?: string;
isAddProduct?: boolean;
action?: boolean;
index?: number;
isDisabled?: boolean;
noTimeImg?: boolean;
priceDisplay?: {
price: boolean;
agentPrice: boolean;
@ -36,6 +31,14 @@ withDefaults(
action: false,
},
);
defineEmits<{
(e: 'select', data: any): void;
(e: 'menuViewDetail'): void;
(e: 'menuEdit'): void;
(e: 'menuDelete'): void;
(e: 'toggleStatus', id: string): void;
}>();
</script>
<template>