From c223bbe0eaa6b5e6d06fe57d938e1f3adfbd75ec Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 13 May 2024 14:16:01 +0200 Subject: [PATCH] fea(VnTable)t: refs #6825 create VnComponent, add rowClick and redirect --- src/components/common/VnComponent.vue | 36 ++ src/components/common/VnSelect.vue | 5 - src/components/common/VnTable.vue | 310 +++++++++--------- src/components/common/VnTableColumn.vue | 27 +- src/components/common/VnTableFilter.vue | 12 +- src/components/ui/VnFilterPanel.vue | 13 +- .../ExtendedList/CustomerExtendedList.vue | 37 ++- 7 files changed, 252 insertions(+), 188 deletions(-) create mode 100644 src/components/common/VnComponent.vue diff --git a/src/components/common/VnComponent.vue b/src/components/common/VnComponent.vue new file mode 100644 index 000000000..6514c1ba6 --- /dev/null +++ b/src/components/common/VnComponent.vue @@ -0,0 +1,36 @@ + + diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index e98c4e264..656beed48 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -108,17 +108,12 @@ async function fetchFilter(val) { const { fields, sortBy, limit } = $props; let key = optionLabel.value; - console.log('key: ', key); if (new RegExp(/\d/g).test(val)) key = optionValue.value; - console.log('key: ', key); const where = { [key]: { like: `%${val}%` } }; const fetchOptions = { where, order: sortBy, limit }; - console.log('where: ', where); - console.log('fields: ', fields); if (fields) fetchOptions.fields = fields; - console.log('fetchOptions: ', fetchOptions); return dataRef.value.fetch(fetchOptions); } diff --git a/src/components/common/VnTable.vue b/src/components/common/VnTable.vue index 85d15bec3..8d130ea6b 100644 --- a/src/components/common/VnTable.vue +++ b/src/components/common/VnTable.vue @@ -1,15 +1,13 @@