2020-10-08 01:35:05 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="p-4">
|
|
|
|
|
<BasicTable
|
|
|
|
|
:rowSelection="{ type: 'checkbox' }"
|
|
|
|
|
title="树形表格"
|
|
|
|
|
titleHelpMessage="树形组件不能和序列号列同时存在"
|
|
|
|
|
:columns="columns"
|
|
|
|
|
:dataSource="data"
|
|
|
|
|
rowKey="id"
|
|
|
|
|
:indentSize="20"
|
2021-01-02 22:34:32 +08:00
|
|
|
isTreeTable
|
2020-10-08 01:35:05 +08:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import { defineComponent } from 'vue';
|
|
|
|
|
import { BasicTable } from '/@/components/Table';
|
|
|
|
|
import { getBasicColumns, getTreeTableData } from './tableData';
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
components: { BasicTable },
|
|
|
|
|
setup() {
|
|
|
|
|
return {
|
|
|
|
|
columns: getBasicColumns(),
|
|
|
|
|
data: getTreeTableData(),
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
</script>
|