index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <div class="container">
  3. <div class="left-side">
  4. <div class="panel">
  5. <Banner />
  6. <DataPanel />
  7. <ContentChart />
  8. </div>
  9. <a-grid :cols="24" :col-gap="16" :row-gap="16" style="margin-top: 16px">
  10. <a-grid-item
  11. :span="{ xs: 24, sm: 24, md: 24, lg: 12, xl: 12, xxl: 12 }"
  12. >
  13. <PopularContent />
  14. </a-grid-item>
  15. <a-grid-item
  16. :span="{ xs: 24, sm: 24, md: 24, lg: 12, xl: 12, xxl: 12 }"
  17. >
  18. <CategoriesPercent />
  19. </a-grid-item>
  20. </a-grid>
  21. </div>
  22. <div class="right-side">
  23. <a-grid :cols="24" :row-gap="16">
  24. <a-grid-item :span="24">
  25. <div class="panel moduler-wrap">
  26. <QuickOperation />
  27. <RecentlyVisited />
  28. </div>
  29. </a-grid-item>
  30. <a-grid-item class="panel" :span="24">
  31. <Carousel />
  32. </a-grid-item>
  33. <a-grid-item class="panel" :span="24">
  34. <Announcement />
  35. </a-grid-item>
  36. <a-grid-item class="panel" :span="24">
  37. <Docs />
  38. </a-grid-item>
  39. </a-grid>
  40. </div>
  41. </div>
  42. </template>
  43. <script lang="ts" setup>
  44. import Banner from './components/banner.vue';
  45. import DataPanel from './components/data-panel.vue';
  46. import ContentChart from './components/content-chart.vue';
  47. import PopularContent from './components/popular-content.vue';
  48. import CategoriesPercent from './components/categories-percent.vue';
  49. import RecentlyVisited from './components/recently-visited.vue';
  50. import QuickOperation from './components/quick-operation.vue';
  51. import Announcement from './components/announcement.vue';
  52. import Carousel from './components/carousel.vue';
  53. import Docs from './components/docs.vue';
  54. </script>
  55. <script lang="ts">
  56. export default {
  57. name: 'Dashboard', // If you want the include property of keep-alive to take effect, you must name the component
  58. };
  59. </script>
  60. <style lang="less" scoped>
  61. .container {
  62. background-color: var(--color-fill-2);
  63. padding: 16px 20px;
  64. padding-bottom: 0;
  65. display: flex;
  66. }
  67. .left-side {
  68. flex: 1;
  69. overflow: auto;
  70. }
  71. .right-side {
  72. width: 280px;
  73. margin-left: 16px;
  74. }
  75. .panel {
  76. background-color: var(--color-bg-2);
  77. border-radius: 4px;
  78. overflow: auto;
  79. }
  80. :deep(.panel-border) {
  81. margin-bottom: 0;
  82. border-bottom: 1px solid rgb(var(--gray-2));
  83. }
  84. .moduler-wrap {
  85. border-radius: 4px;
  86. background-color: var(--color-bg-2);
  87. :deep(.text) {
  88. font-size: 12px;
  89. text-align: center;
  90. color: rgb(var(--gray-8));
  91. }
  92. :deep(.wrapper) {
  93. margin-bottom: 8px;
  94. text-align: center;
  95. cursor: pointer;
  96. &:last-child {
  97. .text {
  98. margin-bottom: 0;
  99. }
  100. }
  101. &:hover {
  102. .icon {
  103. color: rgb(var(--arcoblue-6));
  104. background-color: #e8f3ff;
  105. }
  106. .text {
  107. color: rgb(var(--arcoblue-6));
  108. }
  109. }
  110. }
  111. :deep(.icon) {
  112. display: inline-block;
  113. width: 32px;
  114. height: 32px;
  115. margin-bottom: 4px;
  116. color: rgb(var(--dark-gray-1));
  117. line-height: 32px;
  118. font-size: 16px;
  119. text-align: center;
  120. background-color: rgb(var(--gray-1));
  121. border-radius: 4px;
  122. }
  123. }
  124. </style>
  125. <style lang="less" scoped>
  126. // responsive
  127. .mobile {
  128. .container {
  129. display: block;
  130. }
  131. .right-side {
  132. // display: none;
  133. width: 100%;
  134. margin-left: 0;
  135. margin-top: 16px;
  136. }
  137. }
  138. </style>