pinia.d.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /**
  2. * pinia 类型定义
  3. */
  4. // 用户信息
  5. declare interface UserInfosState<T = any> {
  6. userInfos: {
  7. id: number;
  8. authBtnList: string[];
  9. permList: string[];
  10. photo: string;
  11. roles: string[];
  12. time: number;
  13. userName: string;
  14. [key: string]: T;
  15. };
  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. prefix:string,
  41. isDrawer: boolean;
  42. primary: string;
  43. topBar: string;
  44. topBarColor: string;
  45. isTopBarColorGradual: boolean;
  46. menuBar: string;
  47. menuBarColor: string;
  48. menuBarActiveColor: string;
  49. isMenuBarColorGradual: boolean;
  50. columnsMenuBar: string;
  51. columnsMenuBarColor: 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. isWartermark: boolean;
  75. wartermarkText: 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. };
  88. }