pinia.d.ts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. dictListInt: T;
  18. }
  19. // 路由缓存列表
  20. declare interface KeepAliveNamesState {
  21. keepAliveNames: string[];
  22. cachedViews: string[];
  23. }
  24. // 后端返回原始路由(未处理时)
  25. declare interface RequestOldRoutesState {
  26. requestOldRoutes: string[];
  27. }
  28. // TagsView 路由列表
  29. declare interface TagsViewRoutesState<T = any> {
  30. tagsViewRoutes: T[];
  31. isTagsViewCurrenFull: Boolean;
  32. }
  33. // 路由列表
  34. declare interface RoutesListState<T = any> {
  35. routesList: T[];
  36. isColumnsMenuHover: Boolean;
  37. isColumnsNavHover: Boolean;
  38. }
  39. // 布局配置
  40. declare interface ThemeConfigState {
  41. themeConfig: {
  42. isDrawer: boolean;
  43. primary: string;
  44. topBar: string;
  45. topBarColor: string;
  46. isTopBarColorGradual: boolean;
  47. menuBar: string;
  48. menuBarColor: string;
  49. menuBarActiveColor: string;
  50. isMenuBarColorGradual: boolean;
  51. columnsMenuBar: string;
  52. columnsMenuBarColor: string;
  53. isColumnsMenuBarColorGradual: boolean;
  54. isColumnsMenuHoverPreload: boolean;
  55. isCollapse: boolean;
  56. isUniqueOpened: boolean;
  57. isFixedHeader: boolean;
  58. isFixedHeaderChange: boolean;
  59. isClassicSplitMenu: boolean;
  60. isLockScreen: boolean;
  61. lockScreenTime: number;
  62. isShowLogo: boolean;
  63. isShowLogoChange: boolean;
  64. isBreadcrumb: boolean;
  65. isTagsview: boolean;
  66. isBreadcrumbIcon: boolean;
  67. isTagsviewIcon: boolean;
  68. isCacheTagsView: boolean;
  69. isSortableTagsView: boolean;
  70. isShareTagsView: boolean;
  71. isFooter: boolean;
  72. isGrayscale: boolean;
  73. isInvert: boolean;
  74. isIsDark: boolean;
  75. isWatermark: boolean;
  76. watermarkText: string;
  77. tagsStyle: string;
  78. animation: string;
  79. columnsAsideStyle: string;
  80. columnsAsideLayout: string;
  81. layout: string;
  82. isRequestRoutes: boolean;
  83. globalTitle: string;
  84. globalViceTitle: string;
  85. globalViceTitleMsg: string;
  86. copyright: string;
  87. globalI18n: string;
  88. globalComponentSize: string;
  89. };
  90. }