index.hbs 884 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <CrudTable
  3. ref="crudTableref"
  4. :api-obj="ApiObj"
  5. :search-config="searchConfig"
  6. :columns="columns"
  7. :dialog-form-config="dialogConfig"
  8. :dialog-form-rules="dialogFormRules"
  9. >
  10. <template #operate-cell="{record, dialogForm}"></template>
  11. </CrudTable>
  12. </template>
  13. <script lang="ts" setup>
  14. import CrudTable from '@/components/crud-table/index';
  15. import useTableIndex from '@/hooks/tableIndex';
  16. import useTableOperate from '@/hooks/tableOperate';
  17. import ApiObj from './api/{{ApiName}}';
  18. // 查询条件
  19. const searchConfig = [{ label: 'id', field: 'id', placeholder: '' }];
  20. // 表格
  21. const columns = useTableOperate(
  22. useTableIndex([
  23. {
  24. title: 'id',
  25. dataIndex: 'id',
  26. },
  27. ])
  28. );
  29. const dialogFormRules = {};
  30. const dialogConfig: any = [{ label: 'id', field: 'id', placeholder: '' }];
  31. </script>
  32. <style lang="less" scoped></style>