settings.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. interface SettingTy {
  2. title: string
  3. sidebarLogo: boolean
  4. showLeftMenu: boolean
  5. ShowDropDown: boolean
  6. showHamburger: boolean
  7. isNeedLogin: boolean
  8. isNeedNprogress: boolean
  9. showTagsView: boolean
  10. tagsViewNum: number
  11. openProdMock: boolean
  12. errorLog: string | Array<string>
  13. permissionMode: string
  14. delWindowHeight: string
  15. tmpToken: string
  16. showNavbarTitle: boolean
  17. showTopNavbar: boolean
  18. mainNeedAnimation: boolean
  19. viteBasePath: string
  20. }
  21. const setting: SettingTy = {
  22. title: 'Vue3 Admin Ts',
  23. /**
  24. * @type {boolean} true | false
  25. * @description Whether show the logo in sidebar
  26. */
  27. sidebarLogo: true,
  28. /**
  29. * @type {boolean} true | false
  30. * @description Whether show the title in Navbar
  31. */
  32. showNavbarTitle: false,
  33. /**
  34. * @type {boolean} true | false
  35. * @description Whether show the drop-down
  36. */
  37. ShowDropDown: true,
  38. /**
  39. * @type {boolean} true | false
  40. * @description Whether show Hamburger
  41. */
  42. showHamburger: true,
  43. /**
  44. * @type {boolean} true | false
  45. * @description Whether show the settings right-panel
  46. */
  47. showLeftMenu: true,
  48. /**
  49. * @type {boolean} true | false
  50. * @description Whether show TagsView
  51. */
  52. showTagsView: true,
  53. /**
  54. * @description TagsView show number
  55. */
  56. tagsViewNum: 6,
  57. /**
  58. * @type {boolean} true | false
  59. * @description Whether show the top Navbar
  60. */
  61. showTopNavbar: true,
  62. /* page animation related*/
  63. /**
  64. * @type {boolean} true | false
  65. * @description Whether need animation of main area
  66. */
  67. mainNeedAnimation: true,
  68. /**
  69. * @type {boolean} true | false
  70. * @description Whether need nprogress
  71. */
  72. isNeedNprogress: true,
  73. /*page login or other*/
  74. /**
  75. * @type {boolean} true | false
  76. * @description Whether need login
  77. */
  78. isNeedLogin: true,
  79. /**
  80. * @type {string} 'roles' | 'code'
  81. */
  82. permissionMode: 'roles',
  83. /**
  84. * @type {boolean} true | false
  85. * @description Whether open prod mock
  86. */
  87. openProdMock: true,
  88. /**
  89. * @type {string | array} 'dev' | ['prod','test','dev'] according to the .env file props of VITE_APP_ENV
  90. * @description Need show err logs component.
  91. * The default is only used in the production env
  92. * If you want to also use it in dev, you can pass ['dev', 'test']
  93. */
  94. errorLog: ['prod'],
  95. /*
  96. * table height(100vh-delWindowHeight)
  97. * */
  98. delWindowHeight: '210px',
  99. /*
  100. * setting dev token when isNeedLogin is setting false
  101. * */
  102. tmpToken: 'tmp_token',
  103. /*
  104. * vite.config.js base config
  105. * such as
  106. * */
  107. viteBasePath: './'
  108. }
  109. export default setting