From 99de611c1ab09ebc8b99f74ea7a8374f8c56746c Mon Sep 17 00:00:00 2001 From: chenyang Date: Tue, 27 Aug 2024 18:03:59 +0700 Subject: [PATCH 1/2] =?UTF-8?q?ts=20=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/x-form/utils/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/x-form/utils/index.tsx b/src/components/x-form/utils/index.tsx index f62b260..71fb320 100644 --- a/src/components/x-form/utils/index.tsx +++ b/src/components/x-form/utils/index.tsx @@ -117,6 +117,8 @@ export const transformAntdTableProColumns = (columns: XFormTypes.IColumn[], over const data = has(res.data, resKey) ? get(res.data, resKey) : res.data return mapTree(data || [], (i: any) => { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore const disabled = has(i, disabledKey) ? get(i, disabledKey) : ('status' in i ? !convertToBool(i.status) : false) return { title: i[label || 'label'], From 33e672b3844f90dfc8ad865f4cb4aca21aaf8398 Mon Sep 17 00:00:00 2001 From: chenyang Date: Tue, 27 Aug 2024 18:05:06 +0700 Subject: [PATCH 2/2] =?UTF-8?q?ts=20=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/x-form/utils/index.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/x-form/utils/index.tsx b/src/components/x-form/utils/index.tsx index 71fb320..76b24f9 100644 --- a/src/components/x-form/utils/index.tsx +++ b/src/components/x-form/utils/index.tsx @@ -116,9 +116,7 @@ export const transformAntdTableProColumns = (columns: XFormTypes.IColumn[], over return request[item.dicMethod || 'get'](url, params).then(res => { const data = has(res.data, resKey) ? get(res.data, resKey) : res.data - return mapTree(data || [], (i: any) => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore + return mapTree(data || [], (i: object) => { const disabled = has(i, disabledKey) ? get(i, disabledKey) : ('status' in i ? !convertToBool(i.status) : false) return { title: i[label || 'label'],