From be3c48b9f1bc54840db59ef71fb90950f637741a Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 11 Apr 2025 11:50:39 +0200 Subject: [PATCH] refactor: refs #8647 solved inject warning --- src/components/common/VnSelect.vue | 2 +- src/components/ui/VnPaginate.vue | 12 ++- src/pages/Zone/ZoneList.vue | 151 +++++++++++++---------------- 3 files changed, 76 insertions(+), 89 deletions(-) diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 79f676d0f..0afe59877 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -71,7 +71,7 @@ const $props = defineProps({ default: null, }, include: { - type: [Object, Array], + type: [Object, Array, String], default: null, }, where: { diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index b232e6c05..678d1f799 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -146,14 +146,22 @@ const addFilter = async (filter, params) => { }; async function fetch(params) { - useArrayData(props.dataKey, params); + if (params) { + for (let param in params) { + if (params[param]) arrayData.store[param] = params[param]; + } + } arrayData.resetPagination(); await arrayData.fetch({ append: false }); return emitStoreData(); } async function update(params) { - useArrayData(props.dataKey, params); + if (params) { + for (let param in params) { + if (params[param]) arrayData.store[param] = params[param]; + } + } const { limit, skip } = store; store.limit = limit + skip; store.skip = 0; diff --git a/src/pages/Zone/ZoneList.vue b/src/pages/Zone/ZoneList.vue index 8d7c4a165..355eb900e 100644 --- a/src/pages/Zone/ZoneList.vue +++ b/src/pages/Zone/ZoneList.vue @@ -93,6 +93,7 @@ const columns = computed(() => [ optionLabel: 'name', optionValue: 'id', }, + columnClass: 'expand', }, { align: 'left', @@ -247,74 +248,70 @@ const closeEventForm = () => { -
-
- - - - -
-
+ + + + @@ -333,24 +330,6 @@ const closeEventForm = () => { /> - - - es: Search zone: Buscar zona