pinia.d.ts 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. id:string;
  12. account:string;
  13. realName:string;
  14. phone:string;
  15. idCardNum:string;
  16. email:string;
  17. accountType:number;
  18. avatar:string;
  19. address:string;
  20. signature:string;
  21. orgId:string;
  22. orgName:string;
  23. tenantId:string;
  24. langCode:string;
  25. currentTenantId:string;
  26. [key: string]: T;
  27. }
  28. declare interface UserInfosState {
  29. userInfos: UserInfos;
  30. constList: T[];
  31. dictList: T;
  32. }
  33. // 路由缓存列表
  34. declare interface KeepAliveNamesState {
  35. keepAliveNames: string[];
  36. cachedViews: string[];
  37. }
  38. // 后端返回原始路由(未处理时)
  39. declare interface RequestOldRoutesState {
  40. requestOldRoutes: string[];
  41. }
  42. // TagsView 路由列表
  43. declare interface TagsViewRoutesState<T = any> {
  44. tagsViewRoutes: T[];
  45. isTagsViewCurrenFull: Boolean;
  46. }
  47. // 路由列表
  48. declare interface RoutesListState<T = any> {
  49. routesList: T[];
  50. isColumnsMenuHover: Boolean;
  51. isColumnsNavHover: Boolean;
  52. }
  53. // 布局配置
  54. declare interface ThemeConfigState {
  55. themeConfig: {
  56. isDrawer: boolean; // 是否开启抽屉配置
  57. primary: string; // 主题颜色
  58. topBar: string; // 顶部栏背景
  59. topBarColor: string; // 顶部栏背景色
  60. isTopBarColorGradual: boolean; // 是否顶部栏背景渐变
  61. menuBar: string; // 侧边栏菜单栏背景
  62. menuBarColor: string; // 侧边栏菜单栏背景色
  63. menuBarActiveColor: string; // 侧边栏激活项背景色
  64. isMenuBarColorGradual: boolean; // 是否侧边栏菜单栏背景渐变
  65. columnsMenuBar: string; // 侧边栏菜单栏背景
  66. columnsMenuBarColor: string; // 侧边栏菜单栏背景
  67. isColumnsMenuBarColorGradual: boolean; // 是否侧边栏菜单栏背景渐变
  68. isColumnsMenuHoverPreload: boolean; // 是否鼠标悬停预加载路由
  69. columnsLogoHeight: number; // 侧边栏logo高度
  70. columnsMenuWidth: number; // 侧边栏宽度
  71. columnsMenuHeight: number; // 侧边栏高度
  72. isCollapse: boolean; // 是否水平折叠收起菜单(支持手机端)
  73. isUniqueOpened: boolean; // 是否只保持一个菜单的展开
  74. isFixedHeader: boolean; // 是否固定头部
  75. isFixedHeaderChange: boolean; // 是否固定头部
  76. isClassicSplitMenu: boolean; // 是否分割菜单
  77. isLockScreen: boolean; // 是否开启锁屏
  78. lockScreenTime: number; // 锁屏时间
  79. isShowLogo: boolean; // 是否显示logo
  80. isShowLogoChange: boolean; // 是否显示logo动画
  81. isBreadcrumb: boolean; // 是否显示面包屑
  82. isTagsview: boolean; // 是否显示多标签页
  83. isBreadcrumbIcon: boolean; // 是否显示面包屑图标
  84. isTagsviewIcon: boolean; // 是否显示多标签页图标
  85. isCacheTagsView: boolean; // 是否缓存 TagsView
  86. isSortableTagsView: boolean; // 是否开启拖拽排序
  87. isShareTagsView: boolean; // 是否开启多标签页缓存
  88. isFooter: boolean; // 是否显示页脚
  89. isGrayscale: boolean; // 是否灰度模式
  90. isInvert: boolean; // 是否色弱模式
  91. isIsDark: boolean; // 是否暗黑模式
  92. isWatermark: boolean; // 是否开启水印
  93. watermarkText: string; // 水印内容
  94. tagsStyle: string; // 标签页主题
  95. animation: string; // 动画
  96. columnsAsideStyle: string; // 侧边栏主题
  97. columnsAsideLayout: string; // 侧边栏布局
  98. layout: string; // 布局模式
  99. isRequestRoutes: boolean; // 是否开启路由懒加载
  100. globalI18n: string; // 是否开启国际化
  101. globalComponentSize: string; // 全局组件大小
  102. globalTitle: string; // 全局标题
  103. globalViceTitle: string; // 全局副标题
  104. globalViceTitleMsg: string; // 全局副标题消息
  105. copyright: string; // 版权信息
  106. logoUrl: string; // 系统 logo 地址
  107. icp: string; // Icp备案号
  108. icpUrl: string; // Icp地址
  109. secondVer: boolean; // 是否开启二级验证
  110. registration: boolean; // 是否开启注册功能
  111. hideTenantForLogin: boolean; // 登陆时隐藏租户
  112. captcha: boolean; // 是否开启验证码
  113. isLoaded: boolean; // 是否加载完成
  114. /** 平台参数「登录页默认账号」sys_login_default_account */
  115. loginDefaultAccount: string;
  116. /** 平台参数「默认密码」sys_password,登录页预填用 */
  117. loginDefaultPassword: string;
  118. };
  119. }