12345678910111213141516171819202122232425262728293031323334353637383940 |
- <template>
- <CrudTable
- ref="crudTableref"
- :api-obj="ApiObj"
- :search-config="searchConfig"
- :columns="columns"
- :dialog-form-config="dialogConfig"
- :dialog-form-rules="dialogFormRules"
- >
- <template #operate-cell="{record, dialogForm}"></template>
- </CrudTable>
- </template>
- <script lang="ts" setup>
- import CrudTable from '@/components/crud-table/index';
- import useTableIndex from '@/hooks/tableIndex';
- import useTableOperate from '@/hooks/tableOperate';
- import ApiObj from './api/{{ApiName}}';
- // 查询条件
- const searchConfig = [{ label: 'id', field: 'id', placeholder: '' }];
- // 表格
- const columns = useTableOperate(
- useTableIndex([
- {
- title: 'id',
- dataIndex: 'id',
- },
- ])
- );
- const dialogFormRules = {};
- const dialogConfig: any = [{ label: 'id', field: 'id', placeholder: '' }];
- </script>
- <style lang="less" scoped></style>
|