ResizeParentHeightTable.vue
2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<template>
<div class="h-full flex p-4">
<div class="flex flex-col pr-4 w-1/2">
<div class="flex-1">
<BasicTable @register="registerTable" />
</div>
<div class="h-4"></div>
<div class="flex-1">
<BasicTable @register="registerTable" />
</div>
</div>
<div class="flex-1 flex flex-col w-1/2 h-full">
<div class="h-1/3 mb-4">
<BasicTable @register="registerTable" />
</div>
<div class="h-1/3 mb-4">
<BasicTable @register="registerTable2" />
</div>
<div class="h-1/3">
<BasicTable @register="registerTable1" />
</div>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { BasicTable, useTable } from '/@/components/Table';
import { getBasicColumns, getFormConfig } from './tableData';
import { demoListApi } from '/@/api/demo/table';
export default defineComponent({
components: { BasicTable },
setup(_) {
const [registerTable] = useTable({
api: demoListApi,
columns: getBasicColumns(),
useSearchForm: false,
formConfig: getFormConfig(),
showTableSetting: false,
tableSetting: { fullScreen: true },
showIndexColumn: false,
isCanResizeParent: true,
rowKey: 'id',
});
const [registerTable1] = useTable({
api: demoListApi,
columns: getBasicColumns(),
formConfig: getFormConfig(),
showTableSetting: false,
tableSetting: { fullScreen: true },
showIndexColumn: false,
isCanResizeParent: true,
useSearchForm: false,
rowKey: 'id',
});
const [registerTable2] = useTable({
api: demoListApi,
columns: getBasicColumns(),
formConfig: getFormConfig(),
showTableSetting: false,
tableSetting: { fullScreen: true },
showIndexColumn: false,
isCanResizeParent: true,
useSearchForm: false,
pagination: false,
rowKey: 'id',
});
return {
registerTable,
registerTable1,
registerTable2,
};
},
});
</script>