From d7d23b38b1ff781b674f2c4f21d546fcb6840424 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Wed, 11 Sep 2024 16:19:13 +0800 Subject: [PATCH] =?UTF-8?q?HL-5853=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E7=94=B3=E8=AF=B7=E5=A2=9E=E5=8A=A0=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=B1=A5=E5=8E=86=E8=A1=A8=E5=8A=9F=E8=83=BD=EF=BC=8C=E9=9D=9E?= =?UTF-8?q?=E5=BF=85=E5=A1=AB=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 12 +++- .../supplierdeliverRequestMain/index.vue | 71 ++++++++----------- 2 files changed, 38 insertions(+), 45 deletions(-) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index dae76deaf..2d536e709 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -646,10 +646,18 @@ const change = (item, index) => { emit('changeTabs', item) if(otherList.find(other=>other.label==item.label)){ // 附件/备注/变更记录 -- 点击回到顶部 - scrollbar.value.scrollTo({ top: 0}); + scrollbar.value?.scrollTo({ top: 0}); } } +const changeTabCurrent = ({label,index})=>{ + if(label){ + let tab = tabsList.value.find(item=>item.label==label) + change(tab,tabsList.value.indexOf(tab)) + }else{ + change(tabsList.value[index],index) + } +} //主表所需的参数 const masterParmas = ref({ @@ -1106,7 +1114,7 @@ watch( getList() } ) -defineExpose({ openDetail, formRef ,updateList,submitUpdateList}) // 提供 open 方法,用于打开弹窗 +defineExpose({ openDetail, formRef ,updateList,submitUpdateList,changeTabCurrent}) // 提供 open 方法,用于打开弹窗