2020-10-08 01:35:05 +08:00
|
|
|
<template>
|
2020-12-29 23:37:40 +08:00
|
|
|
<BasicTable @register="registerTable">
|
2021-01-28 23:28:50 +08:00
|
|
|
<template #form-custom> custom-slot </template>
|
2020-12-29 23:37:40 +08:00
|
|
|
</BasicTable>
|
2020-10-08 01:35:05 +08:00
|
|
|
</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({
|
|
|
|
|
title: '开启搜索区域',
|
|
|
|
|
api: demoListApi,
|
|
|
|
|
columns: getBasicColumns(),
|
|
|
|
|
useSearchForm: true,
|
|
|
|
|
formConfig: getFormConfig(),
|
2020-10-21 21:44:57 +08:00
|
|
|
showTableSetting: true,
|
2020-12-29 23:37:40 +08:00
|
|
|
rowSelection: { type: 'checkbox' },
|
2020-10-08 01:35:05 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
registerTable,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
</script>
|