From 23dc6858c60fef9fc55516a5911206f18be2d145 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Thu, 3 Oct 2024 15:34:13 +0700 Subject: [PATCH] refactor: product item delete (incomplete) --- src/components/05_quotation/ProductItem.vue | 4 ++-- src/components/TableComponents.vue | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/05_quotation/ProductItem.vue b/src/components/05_quotation/ProductItem.vue index 3f5239d1..42ab6048 100644 --- a/src/components/05_quotation/ProductItem.vue +++ b/src/components/05_quotation/ProductItem.vue @@ -13,7 +13,7 @@ const priceData = defineModel<{ }); defineEmits<{ - (e: 'delete'): void; + (e: 'delete', index: number): void; }>(); withDefaults( @@ -103,7 +103,7 @@ const columns = [ :rows="rows" imgColumn="name" :customColumn="['amount', 'pricePerUnit', 'discount', 'tax', 'sumPrice']" - @delete="$emit('delete')" + @delete="(i) => $emit('delete', i)" >