Index1.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <div class="index">
  3. <div class="index-header">
  4. <img src="@/sites/assets/images/logo-red.png" alt="" srcset="" />
  5. <div class="info">
  6. <h1>Nut UI</h1>
  7. <p>一套京东风格的轻量级移动端 Vue 组件库</p>
  8. </div>
  9. </div>
  10. <div class="index-components">
  11. <ol v-for="_nav in nav" :key="_nav">
  12. <li>{{ _nav.name }}</li>
  13. <ul>
  14. <li v-for="_package in _nav.packages" :key="_package">
  15. <router-link :to="_package.name.toLocaleLowerCase()">{{ _package.name }}&nbsp;&nbsp;{{ _package.cName }}
  16. </router-link>
  17. </li>
  18. </ul>
  19. </ol>
  20. </div>
  21. </div>
  22. </template>
  23. <script lang="ts">
  24. import { defineComponent, reactive } from 'vue';
  25. import { nav, versions } from '@/config';
  26. export default defineComponent({
  27. name: 'doc',
  28. components: {},
  29. setup() {
  30. return reactive({
  31. nav,
  32. versions
  33. });
  34. }
  35. });
  36. </script>
  37. <style lang="scss" scoped>
  38. .index {
  39. height: 100%;
  40. width: 100%;
  41. padding-top: 30px;
  42. &-header {
  43. display: flex;
  44. align-items: center;
  45. padding: 0 34px;
  46. height: 117px;
  47. > img {
  48. width: 67px;
  49. height: 67px;
  50. margin-right: 18px;
  51. flex-shrink: 0;
  52. }
  53. .info {
  54. display: flex;
  55. flex-direction: column;
  56. h1 {
  57. height: 48px;
  58. line-height: 48px;
  59. font-size: 34px;
  60. color: rgba(51, 51, 51, 1);
  61. }
  62. p {
  63. height: 18px;
  64. line-height: 18px;
  65. font-size: 12px;
  66. color: rgba(154, 155, 157, 1);
  67. }
  68. }
  69. }
  70. &-components {
  71. background: #f7f8fa;
  72. border-radius: 30px 30px 0 0;
  73. overflow: hidden;
  74. padding: 30px 25px;
  75. > ol {
  76. margin-bottom: 17px;
  77. > li {
  78. line-height: 20px;
  79. font-size: 14px;
  80. color: rgba(144, 156, 164, 1);
  81. margin-bottom: 10px;
  82. }
  83. > ul {
  84. li {
  85. padding: 0 24px;
  86. width: 100%;
  87. height: 45px;
  88. line-height: 45px;
  89. background: rgba(255, 255, 255, 1);
  90. border-radius: 22px;
  91. box-shadow: 0px 1px 4px 0px rgba(102, 102, 102, 0.06);
  92. margin-bottom: 13px;
  93. a {
  94. width: 100%;
  95. height: 100%;
  96. font-size: 15px;
  97. font-weight: bold;
  98. display: block;
  99. color: rgba(51, 51, 51, 1);
  100. }
  101. }
  102. }
  103. }
  104. }
  105. }
  106. </style>