2020-10-08 01:35:05 +08:00
|
|
|
<template>
|
|
|
|
|
<BasicTable @register="registerTable" />
|
|
|
|
|
</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-10-08 01:35:05 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
registerTable,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
</script>
|