index.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. // 接口类型声明
  2. // 布局配置
  3. export interface ThemeConfigState {
  4. themeConfig: {
  5. isDrawer: boolean;
  6. primary: string;
  7. topBar: string;
  8. topBarColor: string;
  9. isTopBarColorGradual: boolean;
  10. menuBar: string;
  11. menuBarColor: string;
  12. isMenuBarColorGradual: boolean;
  13. columnsMenuBar: string;
  14. columnsMenuBarColor: string;
  15. isColumnsMenuBarColorGradual: boolean;
  16. isCollapse: boolean;
  17. isUniqueOpened: boolean;
  18. isFixedHeader: boolean;
  19. isFixedHeaderChange: boolean;
  20. isClassicSplitMenu: boolean;
  21. isLockScreen: boolean;
  22. lockScreenTime: number;
  23. isShowLogo: boolean;
  24. isShowLogoChange: boolean;
  25. isBreadcrumb: boolean;
  26. isTagsview: boolean;
  27. isBreadcrumbIcon: boolean;
  28. isTagsviewIcon: boolean;
  29. isCacheTagsView: boolean;
  30. isSortableTagsView: boolean;
  31. isShareTagsView: boolean;
  32. isFooter: boolean;
  33. isGrayscale: boolean;
  34. isInvert: boolean;
  35. isIsDark: boolean;
  36. isWartermark: boolean;
  37. wartermarkText: string;
  38. tagsStyle: string;
  39. animation: string;
  40. columnsAsideStyle: string;
  41. columnsAsideLayout: string;
  42. layout: string;
  43. isRequestRoutes: boolean;
  44. globalTitle: string;
  45. globalViceTitle: string;
  46. globalI18n: string;
  47. globalComponentSize: string;
  48. };
  49. }
  50. // 路由列表
  51. export interface RoutesListState {
  52. routesList: object[];
  53. isColumnsMenuHover: Boolean;
  54. isColumnsNavHover: Boolean;
  55. }
  56. // 路由缓存列表
  57. export interface KeepAliveNamesState {
  58. keepAliveNames: string[];
  59. }
  60. // TagsView 路由列表
  61. export interface TagsViewRoutesState {
  62. tagsViewRoutes: object[];
  63. isTagsViewCurrenFull: Boolean;
  64. }
  65. // 用户信息
  66. export interface UserInfosState {
  67. userInfos: {
  68. id:number;
  69. userName: string;
  70. userNickname:string;
  71. avatar: string;
  72. roles: string[];
  73. time: number;
  74. };
  75. permissions:string[]
  76. }
  77. // 后端返回原始路由(未处理时)
  78. export interface RequestOldRoutesState {
  79. requestOldRoutes: object[];
  80. }
  81. // 主接口(顶级类型声明)
  82. export interface RootStateTypes {
  83. themeConfig: ThemeConfigState;
  84. routesList: RoutesListState;
  85. keepAliveNames: KeepAliveNamesState;
  86. tagsViewRoutes: TagsViewRoutesState;
  87. userInfos: UserInfosState;
  88. requestOldRoutes: RequestOldRoutesState;
  89. }
  90. // global
  91. export interface GlobalState {
  92. resize: {
  93. innerHeight: number;
  94. innerWidth: number;
  95. };
  96. }