mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-11 12:57:10 +08:00
fix(GiTable): 修复 GiTable 升级后表格选择器、禁用工具配置失效的问题
This commit is contained in:
@@ -110,6 +110,7 @@ defineOptions({ name: 'GiTable' })
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
title: '',
|
||||
disabledColumnKeys: () => [],
|
||||
disabledTools: () => [],
|
||||
data: () => [],
|
||||
})
|
||||
|
||||
@@ -155,9 +156,13 @@ interface Props extends TableProps {
|
||||
}
|
||||
|
||||
const slots = useSlots()
|
||||
const attrs = useAttrs()
|
||||
|
||||
/** 表格属性计算 */
|
||||
const tableProps = computed(() => omit(props, ['title', 'disabledColumnKeys']))
|
||||
const tableProps = computed(() => ({
|
||||
...omit(props, ['title', 'disabledColumnKeys', 'disabledTools']),
|
||||
...attrs,
|
||||
}))
|
||||
|
||||
/** 组件状态 */
|
||||
const tableRef = useTemplateRef('tableRef')
|
||||
@@ -197,7 +202,7 @@ const showFullscreenBtn = computed(() => !props.disabledTools?.includes('fullscr
|
||||
/** 列设置相关逻辑 */
|
||||
const showSettingColumnBtn = computed(() => {
|
||||
const columns = props.columns as TableColumnData[] | undefined
|
||||
return Boolean(columns?.length)
|
||||
return !props.disabledTools?.includes('setting') && Boolean(columns?.length)
|
||||
})
|
||||
|
||||
/** 列设置项类型 */
|
||||
|
||||
Reference in New Issue
Block a user