From 2c76a7bb289026828fca8bcae68f493481d0b0a8 Mon Sep 17 00:00:00 2001 From: wangjinpeng <17600579508@163.com> Date: Fri, 2 Aug 2024 16:18:07 +0800 Subject: [PATCH] leave over tree select code --- src/Skeleton.vue | 2 +- src/props/kernelProps.ts | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Skeleton.vue b/src/Skeleton.vue index 28d4dea..9eb6314 100644 --- a/src/Skeleton.vue +++ b/src/Skeleton.vue @@ -220,7 +220,7 @@ function showLayoutTableSetting(e: MouseEvent) {
diff --git a/src/props/kernelProps.ts b/src/props/kernelProps.ts index 695b880..4e73400 100644 --- a/src/props/kernelProps.ts +++ b/src/props/kernelProps.ts @@ -5,7 +5,7 @@ import { getRandomString } from '../utils/basic' import type { ChangeAllOptional, ChangeOptionalExcept } from '../utils/tsHelper' import type { DictItemProps } from './basicProps' -import { DataKind, LayoutKind, SizeKind, SubDataShowKind, getDefaultIconByDataKind, getDefaultIconByLayoutKind } from './enumProps' +import { DataKind, DictKind, LayoutKind, SizeKind, SubDataShowKind, getDefaultIconByDataKind, getDefaultIconByLayoutKind } from './enumProps' import type { TableEventProps } from './eventProps' import type { ActionColumnProps, AggDataProps, ContextMenuProps, DataSliceProps, EditDataProps, FilterDataProps, GanttLayoutProps, GroupDataProps, QuickSearchProps, SimpleAggDataProps, SimpleContextMenuProps, SimpleDataSliceProps, SimpleEditDataProps, SimpleFilterDataProps, SimpleGanttLayoutProps, SimpleGroupDataProps, SimpleSortDataProps, SortDataProps } from './functionProps' @@ -709,6 +709,16 @@ export interface TableColumnProps extends CommonColumnProps { * When there are fixed dictionary items, the dictionary items will not be obtained from the backend. */ fixedDictItems?: DictItemProps[] + /** + * 字典类型 + * + * dictionary type + * + * 存在树形结构等数据显示 + * + * Data such as a tree structure is displayed + */ + dictKind?: DictKind /** * 日期时间格式 * @@ -738,6 +748,7 @@ function generateTableColumnProps(simple: SimpleTableColumnProps): TableColumnPr useDict: simple.useDict ?? false, multiValue: simple.multiValue ?? false, fixedDictItems: simple.fixedDictItems, + dictKind: simple.useDict ? simple.dictKind || DictKind.SELECT : undefined, ...generateCommonColumnProps(simple), } }