pinia.d.ts 2.0 KB

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