|
@@ -10,8 +10,12 @@
|
|
{{ scope.row[column.prop] }}
|
|
{{ scope.row[column.prop] }}
|
|
</slot>
|
|
</slot>
|
|
</template>
|
|
</template>
|
|
- <dynamic-table-column v-for="child in visibleChildren" :key="child.prop" :column="child"
|
|
|
|
- :default-setting="defaultSetting">
|
|
|
|
|
|
+ <dynamic-table-column
|
|
|
|
+ v-for="child in visibleChildren"
|
|
|
|
+ :key="child.prop"
|
|
|
|
+ :column="child"
|
|
|
|
+ :default-setting="defaultSetting"
|
|
|
|
+ >
|
|
<template v-for="slot in Object.keys($scopedSlots)" #[slot]="scope">
|
|
<template v-for="slot in Object.keys($scopedSlots)" #[slot]="scope">
|
|
<slot :name="slot" v-bind="scope">
|
|
<slot :name="slot" v-bind="scope">
|
|
{{ scope.display }}
|
|
{{ scope.display }}
|
|
@@ -23,7 +27,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
- name: 'dynamic-table-column',
|
|
|
|
|
|
+ name: 'DynamicTableColumn',
|
|
props: {
|
|
props: {
|
|
column: { type: Object, default: () => ({ prop: '', slotBody: '', slotHeader: '', children: [] }) },
|
|
column: { type: Object, default: () => ({ prop: '', slotBody: '', slotHeader: '', children: [] }) },
|
|
defaultSetting: { type: Object, default: () => ({}) }
|
|
defaultSetting: { type: Object, default: () => ({}) }
|