From 7cbdf0d98b3cee2cc0d6f796b37dbd969e906d1a Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 18 Jul 2024 15:20:44 +0200 Subject: [PATCH] feat: fix bugs and filters --- src/components/VnTable/VnChip.vue | 4 +- src/components/VnTable/VnColumn.vue | 4 +- src/components/VnTable/VnFilter.vue | 1 + src/components/VnTable/VnOrder.vue | 4 +- src/components/VnTable/VnTable.vue | 18 ++- src/components/common/VnComponent.vue | 5 +- src/components/common/VnInputDate.vue | 1 + src/components/ui/VnRow.vue | 22 +++- src/css/app.scss | 32 ++--- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Item/ItemFixedPrice.vue | 163 ++++++------------------ src/pages/Item/ItemFixedPriceFilter.vue | 14 +- 13 files changed, 101 insertions(+), 169 deletions(-) diff --git a/src/components/VnTable/VnChip.vue b/src/components/VnTable/VnChip.vue index 74207b943..f70ba7423 100644 --- a/src/components/VnTable/VnChip.vue +++ b/src/components/VnTable/VnChip.vue @@ -35,7 +35,9 @@ function stopEventPropagation(event) { dense square > - {{ row[col.name] }} + + {{ col.format ? col.format(row) : row[col.name] }} + diff --git a/src/components/VnTable/VnColumn.vue b/src/components/VnTable/VnColumn.vue index d86dd87da..9f6c6d53d 100644 --- a/src/components/VnTable/VnColumn.vue +++ b/src/components/VnTable/VnColumn.vue @@ -147,7 +147,7 @@ const col = computed(() => { } if ( (newColumn.name.startsWith('is') || newColumn.name.startsWith('has')) && - !newColumn.component + newColumn.component == null ) newColumn.component = 'checkbox'; if ($props.default && !newColumn.component) newColumn.component = $props.default; @@ -158,7 +158,7 @@ const col = computed(() => { const components = computed(() => $props.components ?? defaultComponents);