mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-27 03:56:46 +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>
|
||||||
|
|
||||||
<template v-else-if="item.selection">
|
<template v-else-if="item.selection">
|
||||||
<TMagicTableColumn
|
<component
|
||||||
type="selection"
|
|
||||||
:key="columnIndex"
|
|
||||||
width="40"
|
width="40"
|
||||||
|
type="selection"
|
||||||
|
:is="tableColumnComponent.component"
|
||||||
|
:key="columnIndex"
|
||||||
:selectable="item.selectable"
|
:selectable="item.selectable"
|
||||||
></TMagicTableColumn>
|
></component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-else-if="item.actions">
|
<template v-else-if="item.actions">
|
||||||
@ -58,7 +59,7 @@
|
|||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
|
|
||||||
import { TMagicTable, TMagicTableColumn } from '@tmagic/design';
|
import { getConfig, TMagicTable } from '@tmagic/design';
|
||||||
|
|
||||||
import ActionsColumn from './ActionsColumn.vue';
|
import ActionsColumn from './ActionsColumn.vue';
|
||||||
import ExpandColumn from './ExpandColumn.vue';
|
import ExpandColumn from './ExpandColumn.vue';
|
||||||
@ -99,6 +100,7 @@ const tMagicTable = ref<InstanceType<typeof TMagicTable>>();
|
|||||||
|
|
||||||
const editState = ref([]);
|
const editState = ref([]);
|
||||||
|
|
||||||
|
const tableColumnComponent = getConfig('components').tableColumn;
|
||||||
const selectionColumn = computed(() => {
|
const selectionColumn = computed(() => {
|
||||||
const column = props.columns.filter((item) => item.selection);
|
const column = props.columns.filter((item) => item.selection);
|
||||||
return column.length ? column[0] : null;
|
return column.length ? column[0] : null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user