From aff783eb2eb3d6edcc8d97af4761f2003fd45f83 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sun, 23 Feb 2025 14:06:25 +0100 Subject: [PATCH] perf: remove comments --- src/components/common/VnSection.vue | 23 +------------------- src/components/ui/VnFilterPanel.vue | 13 +----------- src/components/ui/VnSearchbar.vue | 33 +++-------------------------- 3 files changed, 5 insertions(+), 64 deletions(-) diff --git a/src/components/common/VnSection.vue b/src/components/common/VnSection.vue index 1b1c18d7d..4bd17124f 100644 --- a/src/components/common/VnSection.vue +++ b/src/components/common/VnSection.vue @@ -2,7 +2,7 @@ import RightAdvancedMenu from './RightAdvancedMenu.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; import VnTableFilter from '../VnTable/VnTableFilter.vue'; -import { onBeforeMount, onMounted, onUnmounted, computed, ref, inject, watch } from 'vue'; +import { onBeforeMount, onMounted, onUnmounted, computed, ref } from 'vue'; import { useArrayData } from 'src/composables/useArrayData'; import { useRoute, useRouter } from 'vue-router'; import { useHasContent } from 'src/composables/useHasContent'; @@ -36,10 +36,6 @@ const $props = defineProps({ type: Object, default: null, }, - filterPanelRef: { - type: Object, - default: null, - }, redirect: { type: Boolean, default: true, @@ -60,9 +56,6 @@ const isMainSection = ref(false); const searchbarId = 'section-searchbar'; const advancedMenuSlot = 'advanced-menu'; const hasContent = useHasContent(`#${searchbarId}`); -// const filterPanel = ref(inject('filterPanel', null)); - -// filterPanel.value = inject('filterPanel', null); onBeforeMount(() => { if ($props.dataKey) @@ -74,26 +67,14 @@ onBeforeMount(() => { }); checkIsMain(); }); -// const filterPanel = ref(inject('filterPanel', null)); onMounted(() => { const unsubscribe = router.afterEach(() => { checkIsMain(); }); - // filterPanel.value = inject('filterPanel', null); onUnmounted(unsubscribe); }); -watch( - () => inject('filterPanel'), - (newValue) => { - if (newValue) { - debugger; - // hacer algo cuando el valor esté disponible - } - }, - { immediate: true }, -); onUnmounted(() => { if (arrayData) arrayData.destroy(); }); @@ -107,10 +88,8 @@ function checkIsMain() { }