apiManger.data.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import { FormSchema, BasicColumn } from '/@/components/Table';
  2. export const tableColumns: BasicColumn[] = [
  3. {
  4. title: 'API名称',
  5. dataIndex: 'apiName',
  6. key: 'apiName',
  7. align: 'center',
  8. },
  9. {
  10. title: '请求路径',
  11. dataIndex: 'reqUrl',
  12. key: 'reqUrl',
  13. align: 'center',
  14. },
  15. {
  16. title: 'HTTP方法',
  17. dataIndex: 'reqMethod',
  18. key: 'reqMethod',
  19. align: 'center',
  20. },
  21. {
  22. title: '参数',
  23. dataIndex: 'reqParam',
  24. key: 'reqParam',
  25. align: 'center',
  26. },
  27. {
  28. title: '状态',
  29. dataIndex: 'apiStatus',
  30. key: 'apiStatus',
  31. align: 'center',
  32. },
  33. {
  34. title: '操作',
  35. dataIndex: 'action',
  36. width: 120,
  37. align: 'center',
  38. slots: { customRender: 'action' },
  39. },
  40. ];
  41. export const formAddSchema: FormSchema[] = [
  42. {
  43. field: 'apiName',
  44. label: '接口名称',
  45. required: true,
  46. component: 'Input',
  47. },
  48. {
  49. field: 'reqUrl',
  50. label: '请求路径',
  51. required: true,
  52. component: 'Input',
  53. },
  54. {
  55. field: 'reqMethod',
  56. label: '请求方式',
  57. required: true,
  58. component: 'Input',
  59. },
  60. ];