From b000c384c2e5f0d68e053bb16499cb6aa01c3f17 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Sat, 15 Mar 2025 20:11:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=85=B3=E9=97=AD=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E9=87=8D=E6=96=B0=E6=89=93=E5=BC=80=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 1b80bac3b..1a05e5079 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -227,6 +227,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import DetailTable from '@/components/DetailTable/src/DetailTable.vue' import { SearchTable } from '@/components/SearchTable' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { cloneDeep } from 'lodash-es' const { wsCache } = useCache() defineOptions({ name: 'Detail' }) @@ -898,6 +899,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: const buttondata = (row) => { let detailButtonEdit: any = [] let detailButtonDelete: any = [] + let detailButtonButtondataTable: any = cloneDeep(buttondataTable.value) if (props.detailButtonIsShowEdit) { // 编辑 detailButtonEdit = [ @@ -917,9 +919,9 @@ const buttondata = (row) => { ] } if (props.buttondataTable.length > 0) { - buttondataTable.value.forEach(item => { - if (item.field) { - item.hide = row[item.field] == '1' ? false : true + detailButtonButtondataTable.forEach(item => { + if (item.field) { + item.hide = row[item.field]=='1'? false : true } else { item.hide = isShowMainButton(row,item.showStatus) @@ -929,7 +931,7 @@ const buttondata = (row) => { return [ ...detailButtonEdit, ...detailButtonDelete, - ...buttondataTable.value + ...detailButtonButtondataTable ] } const updateList =async ()=>{