From aad0ba9ffe454382da8bbd490f87247016475892 Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Tue, 11 Apr 2023 21:02:59 +0800 Subject: [PATCH] 123 --- src/components/Tabs/index.vue | 3 ++- src/components/Trumbs/index.vue | 2 ++ src/views/Index/components/CaseDetails/index.vue | 14 +++++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/components/Tabs/index.vue b/src/components/Tabs/index.vue index 1e21987..54bd51c 100644 --- a/src/components/Tabs/index.vue +++ b/src/components/Tabs/index.vue @@ -21,7 +21,7 @@ const props = defineProps({ isCase: Boolean, }) const { industry_id, hardware_id } = storeToRefs(detailStore) - +const myEmit = defineEmits(['onMySonFunc']) const isActive = id => { return props.isCase ? detailStore.industry_id == id @@ -31,6 +31,7 @@ const updateActiveTab = id => { if (props.isCase) { detailStore.updateIndustryId(id) detailStore.updateExampleId('1') + myEmit('onMySonFunc') } else { detailStore.updateHardwareId(id) detailStore.updateHardwareExampleId('1') diff --git a/src/components/Trumbs/index.vue b/src/components/Trumbs/index.vue index 4a6ca8b..4c9553f 100644 --- a/src/components/Trumbs/index.vue +++ b/src/components/Trumbs/index.vue @@ -45,12 +45,14 @@ import { FreeMode } from 'swiper' const detailStore = useDetailStore() const { industry_id, hardware_id } = storeToRefs(detailStore) +const myEmit = defineEmits(['onMySonFunc']) const props = defineProps({ isCase: Boolean, }) const modules = ref([FreeMode]) const viewDetail = index => { if (props.isCase) { + myEmit('onMySonFunc') detailStore.updateExampleId(index) } else { detailStore.updateHardwareExampleId(index) diff --git a/src/views/Index/components/CaseDetails/index.vue b/src/views/Index/components/CaseDetails/index.vue index a3b447a..0edceb0 100644 --- a/src/views/Index/components/CaseDetails/index.vue +++ b/src/views/Index/components/CaseDetails/index.vue @@ -4,8 +4,8 @@