mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(table): type 为selection只能是table下的children,不能是children的children
This commit is contained in:
parent
6caa8cdb79
commit
a6ecbb66d1
@ -24,12 +24,13 @@
|
||||
</template>
|
||||
|
||||
<template v-else-if="item.selection">
|
||||
<TMagicTableColumn
|
||||
type="selection"
|
||||
:key="columnIndex"
|
||||
<component
|
||||
width="40"
|
||||
type="selection"
|
||||
:is="tableColumnComponent.component"
|
||||
:key="columnIndex"
|
||||
:selectable="item.selectable"
|
||||
></TMagicTableColumn>
|
||||
></component>
|
||||
</template>
|
||||
|
||||
<template v-else-if="item.actions">
|
||||
@ -58,7 +59,7 @@
|
||||
import { computed, ref } from 'vue';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
|
||||
import { TMagicTable, TMagicTableColumn } from '@tmagic/design';
|
||||
import { getConfig, TMagicTable } from '@tmagic/design';
|
||||
|
||||
import ActionsColumn from './ActionsColumn.vue';
|
||||
import ExpandColumn from './ExpandColumn.vue';
|
||||
@ -99,6 +100,7 @@ const tMagicTable = ref<InstanceType<typeof TMagicTable>>();
|
||||
|
||||
const editState = ref([]);
|
||||
|
||||
const tableColumnComponent = getConfig('components').tableColumn;
|
||||
const selectionColumn = computed(() => {
|
||||
const column = props.columns.filter((item) => item.selection);
|
||||
return column.length ? column[0] : null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user