mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-13 06:49:48 +08:00
38 lines
800 B
Vue
38 lines
800 B
Vue
<template>
|
|
<el-table-column type="expand">
|
|
<template #default="scope">
|
|
<m-table
|
|
v-if="config.table"
|
|
:show-header="false"
|
|
:columns="config.table"
|
|
:data="scope.row[config.prop]"
|
|
></m-table>
|
|
<m-form
|
|
v-if="config.form"
|
|
:config="config.form"
|
|
:init-values="config.values || scope.row[config.prop] || {}"
|
|
></m-form>
|
|
</template>
|
|
</el-table-column>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent, PropType } from 'vue';
|
|
|
|
import { MForm } from '@tmagic/form';
|
|
|
|
import { ColumnConfig } from './schema';
|
|
|
|
export default defineComponent({
|
|
components: { MForm },
|
|
|
|
props: {
|
|
config: {
|
|
type: Object as PropType<ColumnConfig>,
|
|
default: () => ({}),
|
|
required: true,
|
|
},
|
|
},
|
|
});
|
|
</script>
|