pinia.d.ts 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /**
  2. * pinia 类型定义
  3. */
  4. // 用户信息
  5. declare interface UserInfos<T = any> {
  6. token: string
  7. authBtnList: string[]
  8. photo: string
  9. roles: string[]
  10. time: number
  11. userName: string
  12. [key: string]: T
  13. }
  14. declare interface UserInfosState {
  15. userInfos: UserInfos
  16. }
  17. // 路由缓存列表
  18. declare interface KeepAliveNamesState {
  19. keepAliveNames: string[]
  20. cachedViews: string[]
  21. }
  22. // 后端返回原始路由(未处理时)
  23. declare interface RequestOldRoutesState {
  24. requestOldRoutes: string[]
  25. }
  26. // TagsView 路由列表
  27. declare interface TagsViewRoutesState<T = any> {
  28. tagsViewRoutes: T[]
  29. isTagsViewCurrenFull: Boolean
  30. }
  31. // 路由列表
  32. declare interface RoutesListState<T = any> {
  33. routesList: T[]
  34. isColumnsMenuHover: Boolean
  35. isColumnsNavHover: Boolean
  36. }
  37. // 布局配置
  38. declare interface ThemeConfigState {
  39. themeConfig: {
  40. isDrawer: boolean
  41. primary: string
  42. topBar: string
  43. topBarColor: string
  44. isTopBarColorGradual: boolean
  45. menuBar: string
  46. menuBarColor: string
  47. menuBarActiveColor: string
  48. isMenuBarColorGradual: boolean
  49. columnsMenuBar: string
  50. columnsMenuBarColor: string
  51. columnsMenuBarActiveColor: string
  52. isColumnsMenuBarColorGradual: boolean
  53. isColumnsMenuHoverPreload: boolean
  54. isCollapse: boolean
  55. isUniqueOpened: boolean
  56. isFixedHeader: boolean
  57. isFixedHeaderChange: boolean
  58. isClassicSplitMenu: boolean
  59. isLockScreen: boolean
  60. lockScreenTime: number
  61. isShowLogo: boolean
  62. isShowLogoChange: boolean
  63. isBreadcrumb: boolean
  64. isTagsview: boolean
  65. isBreadcrumbIcon: boolean
  66. isTagsviewIcon: boolean
  67. isCacheTagsView: boolean
  68. isSortableTagsView: boolean
  69. isShareTagsView: boolean
  70. isFooter: boolean
  71. isGrayscale: boolean
  72. isInvert: boolean
  73. isIsDark: boolean
  74. isWatermark: boolean
  75. watermarkText: string
  76. tagsStyle: string
  77. animation: string
  78. columnsAsideStyle: string
  79. columnsAsideLayout: string
  80. layout: string
  81. isRequestRoutes: boolean
  82. globalTitle: string
  83. globalViceTitle: string
  84. globalViceTitleMsg: string
  85. globalI18n: string
  86. globalComponentSize: string
  87. isCreateWebHistory: boolean
  88. }
  89. }