pinia.d.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /**
  2. * pinia 类型定义
  3. */
  4. // 用户信息
  5. declare interface UserInfos<T = any> {
  6. authBtnList: string[];
  7. photo: string;
  8. roles: string[];
  9. time: number;
  10. userName: string;
  11. [key: string]: T;
  12. }
  13. declare interface UserInfosState {
  14. userInfos: UserInfos;
  15. constList: T[];
  16. dictList: T[];
  17. }
  18. // 路由缓存列表
  19. declare interface KeepAliveNamesState {
  20. keepAliveNames: string[];
  21. cachedViews: string[];
  22. }
  23. // 后端返回原始路由(未处理时)
  24. declare interface RequestOldRoutesState {
  25. requestOldRoutes: string[];
  26. }
  27. // TagsView 路由列表
  28. declare interface TagsViewRoutesState<T = any> {
  29. tagsViewRoutes: T[];
  30. isTagsViewCurrenFull: Boolean;
  31. }
  32. // 路由列表
  33. declare interface RoutesListState<T = any> {
  34. routesList: T[];
  35. isColumnsMenuHover: Boolean;
  36. isColumnsNavHover: Boolean;
  37. }
  38. // 布局配置
  39. declare interface ThemeConfigState {
  40. themeConfig: {
  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. 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. };
  88. }