App.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <script setup lang="ts">
  2. import { RouterView } from 'vue-router';
  3. import { NConfigProvider, NMessageProvider } from 'naive-ui';
  4. import type { GlobalThemeOverrides } from 'naive-ui';
  5. import { SelectProps, InputProps, TableProps } from 'naive-ui'
  6. // type SelectThemeOverrides = NonNullable<SelectProps['themeOverrides']>
  7. // type SelectThemeOverrides = NonNullable<InputProps['themeOverrides']>
  8. const primaryColor = '#1A2029';
  9. /**
  10. * @type import('naive-ui').GlobalThemeOverrides
  11. */
  12. const themeOverrides: GlobalThemeOverrides = {
  13. common: {
  14. primaryColor: '#2454FF',
  15. primaryColorHover: '#2454FF',
  16. primaryColorPressed: '#2454FF',
  17. tableHeaderColor: '#F3F6F9',
  18. },
  19. Menu: {
  20. itemTextColor: primaryColor,
  21. itemTextColorActive: primaryColor,
  22. itemTextColorActiveHover: primaryColor,
  23. itemTextColorChildActiveHover: primaryColor,
  24. itemTextColorChildActive: primaryColor,
  25. itemColorActive: '#FCFDFE',
  26. itemColorActiveHover: '#FCFDFE',
  27. arrowColorChildActive: primaryColor
  28. },
  29. Scrollbar: {
  30. width: '0px',
  31. },
  32. Select: {
  33. peers: {
  34. InternalSelection: {
  35. textColor: '#5E5E5E',
  36. borderHover: '1px solid #2454FF',
  37. borderFocus: '1px solid #2454FF',
  38. placeholderColor: '#ccc',
  39. borderRadius: '8px'
  40. }
  41. },
  42. },
  43. Input: {
  44. border: '0px',
  45. borderHover: '0px ',
  46. borderFocus: '0px ',
  47. borderFocusWarning: '0px',
  48. boxShadowFocus: 'none',
  49. fontSizeMedium: '15px',
  50. textColor: '#1A2029',
  51. placeholderColor: 'rgba(158, 158, 158, 0.6)',
  52. },
  53. Tabs: {
  54. tabBorderColor: '#DAE5ED',
  55. tabFontSizeMedium: '12px',
  56. tabTextColorLine: '#272D35',
  57. tabFontWeightActive: 'bold'
  58. },
  59. LoadingBar: {
  60. colorLoading: '#000',
  61. },
  62. Button: {
  63. colorHoverPrimary: '#1D43CC',
  64. colorPressedPrimary: '#1D43CC',
  65. borderPressedPrimary: '#1D43CC',
  66. },
  67. DataTable: {
  68. // thTextColor: '#1A2029',
  69. // tdTextColor: primaryColor,
  70. // borderRadius: '4px',
  71. // borderColor: '#D7D7D7',
  72. // thPaddingMedium: '8px 10px',
  73. // tdPaddingMedium: '7px 10px',
  74. // fontSizeMedium: '11px'
  75. }
  76. // Menu: {
  77. // itemTextColorHorizontal: '#161616',
  78. // itemTextColorHoverHorizontal: '#2A68FF',
  79. // itemTextColor: '#161616',
  80. // itemColorHover: 'rgba(42, 104, 255, 0.1)',
  81. // itemTextColorHover: '#2A68FF',
  82. // },
  83. // Pagination: {
  84. // itemColorActiveHover: '#0092FF',
  85. // itemColorActive: '0092FF',
  86. // itemColor: "#f7f7f7",
  87. // itemTextColorActive: '#fff',
  88. // itemTextColorHover: '#fff',
  89. // itemColorHover: '#0092FF',
  90. // }
  91. }
  92. </script>
  93. <template>
  94. <NConfigProvider :theme-overrides="themeOverrides">
  95. <NMessageProvider>
  96. <RouterView />
  97. </NMessageProvider>
  98. </NConfigProvider>
  99. </template>
  100. <style scoped lang="scss">
  101. header {
  102. @include flex(x, center, cetner);
  103. background: $el-bg-color;
  104. line-height: 1.5;
  105. max-height: 100vh;
  106. img {
  107. width: 200px;
  108. }
  109. }
  110. .logo {
  111. display: block;
  112. margin: 0 auto 2rem;
  113. }
  114. nav {
  115. width: 100%;
  116. font-size: 12px;
  117. text-align: center;
  118. margin-top: 2rem;
  119. }
  120. nav a.router-link-exact-active {
  121. color: var(--color-text);
  122. }
  123. nav a.router-link-exact-active:hover {
  124. background-color: transparent;
  125. }
  126. nav a {
  127. display: inline-block;
  128. padding: 0 1rem;
  129. border-left: 1px solid var(--color-border);
  130. }
  131. nav a:first-of-type {
  132. border: 0;
  133. }
  134. @media (min-width: 1024px) {
  135. header {
  136. display: flex;
  137. place-items: center;
  138. padding-right: calc(var(--section-gap) / 2);
  139. }
  140. .logo {
  141. margin: 0 2rem 0 0;
  142. }
  143. header .wrapper {
  144. display: flex;
  145. place-items: flex-start;
  146. flex-wrap: wrap;
  147. }
  148. nav {
  149. text-align: left;
  150. margin-left: -1rem;
  151. font-size: 1rem;
  152. padding: 1rem 0;
  153. margin-top: 1rem;
  154. }
  155. }
  156. </style>