From 1c01266d626c658036e6a99ef2b31aef245fbaeb Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 21 Jun 2023 15:27:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BD=BF=20Table=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=88=97=E5=AE=BD=E5=92=8C=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E5=88=97=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit f3622d423a29d3c4a1f831ed89864c85d94074d1) --- src/hooks/web/useCrudSchemas.ts | 7 +++++-- src/types/table.d.ts | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/hooks/web/useCrudSchemas.ts b/src/hooks/web/useCrudSchemas.ts index a29f75ab..984e57c5 100644 --- a/src/hooks/web/useCrudSchemas.ts +++ b/src/hooks/web/useCrudSchemas.ts @@ -1,7 +1,7 @@ import { reactive } from 'vue' import { AxiosPromise } from 'axios' import { findIndex } from '@/utils' -import { eachTree, treeMap, filter } from '@/utils/tree' +import { eachTree, filter, treeMap } from '@/utils/tree' import { getBoolDictOptions, getDictOptions, getIntDictOptions } from '@/utils/dict' import { FormSchema } from '@/types/form' @@ -36,8 +36,11 @@ type CrudSearchParams = { type CrudTableParams = { // 是否显示表头 show?: boolean + // 列宽配置 + width?: number | string + // 列是否固定在左侧或者右侧 + fixed?: 'left' | 'right' } & Omit - type CrudFormParams = { // 是否显示表单项 show?: boolean diff --git a/src/types/table.d.ts b/src/types/table.d.ts index 3294234b..9cb4205b 100644 --- a/src/types/table.d.ts +++ b/src/types/table.d.ts @@ -1,6 +1,8 @@ export type TableColumn = { field: string label?: string + width?: number | string + fixed?: 'left' | 'right' children?: TableColumn[] } & Recordable