fileList.data.ts 903 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { reactive } from 'vue'
  2. import { useI18n } from '@/hooks/web/useI18n'
  3. import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas'
  4. const { t } = useI18n() // 国际化
  5. // CrudSchema
  6. const crudSchemas = reactive<CrudSchema[]>([
  7. {
  8. label: t('common.index'),
  9. field: 'id',
  10. type: 'index',
  11. form: {
  12. show: false
  13. },
  14. detail: {
  15. show: false
  16. }
  17. },
  18. {
  19. label: '文件名',
  20. field: 'path',
  21. search: {
  22. show: true
  23. }
  24. },
  25. {
  26. label: 'URL',
  27. field: 'url'
  28. },
  29. {
  30. label: '文件类型',
  31. field: 'type'
  32. },
  33. {
  34. label: t('common.createTime'),
  35. field: 'createTime',
  36. form: {
  37. show: false
  38. }
  39. },
  40. {
  41. label: t('table.action'),
  42. field: 'action',
  43. width: '300px',
  44. form: {
  45. show: false
  46. },
  47. detail: {
  48. show: false
  49. }
  50. }
  51. ])
  52. export const { allSchemas } = useCrudSchemas(crudSchemas)