token.data.ts 1018 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
  2. const { t } = useI18n() // 国际化
  3. // CrudSchema
  4. const crudSchemas = reactive<VxeCrudSchema>({
  5. primaryKey: 'id',
  6. primaryType: null,
  7. action: true,
  8. columns: [
  9. {
  10. title: '用户编号',
  11. field: 'userId',
  12. isSearch: true
  13. },
  14. {
  15. title: '访问令牌',
  16. field: 'accessToken'
  17. },
  18. {
  19. title: '刷新令牌',
  20. field: 'refreshToken'
  21. },
  22. {
  23. title: '客户端编号',
  24. field: 'clientId',
  25. isSearch: true
  26. },
  27. {
  28. title: '用户类型',
  29. field: 'userType',
  30. dictType: DICT_TYPE.USER_TYPE,
  31. dictClass: 'number',
  32. isSearch: true
  33. },
  34. {
  35. title: t('common.createTime'),
  36. field: 'createTime',
  37. formatter: 'formatDate',
  38. isForm: false
  39. },
  40. {
  41. title: '过期时间',
  42. field: 'expiresTime',
  43. formatter: 'formatDate',
  44. isForm: false
  45. }
  46. ]
  47. })
  48. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)