mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-07-26 04:25:07 +08:00
28 lines
534 B
Vue
28 lines
534 B
Vue
<template>
|
|
<component
|
|
:is="config.component"
|
|
v-bind="resolveComponentProps(config, row, index)"
|
|
v-on="resolveComponentListeners(config, row, index)"
|
|
></component>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { resolveComponentListeners, resolveComponentProps } from './componentHelpers';
|
|
import { ColumnConfig } from './schema';
|
|
|
|
defineOptions({
|
|
name: 'MTableColumn',
|
|
});
|
|
|
|
withDefaults(
|
|
defineProps<{
|
|
config: ColumnConfig;
|
|
row: any;
|
|
index: number;
|
|
}>(),
|
|
{
|
|
config: () => ({}),
|
|
},
|
|
);
|
|
</script>
|