Banner.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <el-carousel height="580px" class="el-carousel">
  3. <el-carousel-item
  4. class="carosel-inner"
  5. v-for="(item, index) in bannerList"
  6. :key="index"
  7. >
  8. <div class="carousel-wrap">
  9. <div class="carousel-caption">
  10. <h1 class="bounce">{{ item.title }}</h1>
  11. <ul>
  12. <li
  13. v-for="(descItem, descIndex) in item.descList"
  14. :key="`desc-${index}-${descIndex}`"
  15. >
  16. {{ descItem }}
  17. </li>
  18. </ul>
  19. <el-button round @click="goFile">{{ item.btn }}</el-button>
  20. <div class="version-wrapper">
  21. <a
  22. class="version-item"
  23. v-for="(linkItem, linkIndex) in item.linkList"
  24. :key="`link-${index}-${linkIndex}`"
  25. :href="linkItem.link"
  26. target="_blank"
  27. >
  28. <span class="version-number">{{ linkItem.versionNo }}</span>
  29. <span>{{ linkItem.date }} &gt;&gt;</span>
  30. </a>
  31. </div>
  32. </div>
  33. <div class="carousel-img">
  34. <img :src="item.bannerImg" />
  35. </div>
  36. </div>
  37. </el-carousel-item>
  38. </el-carousel>
  39. </template>
  40. <script>
  41. export default {
  42. name: 'Banner',
  43. data() {
  44. return {
  45. bannerList: [
  46. {
  47. title: '一款功能齐全的文件管理系统',
  48. descList: [
  49. '文件传输,安全快捷',
  50. '在线解压缩,一触即达',
  51. '回收站,防止文件误删'
  52. ],
  53. btn: '开源免费,立即体验',
  54. linkList: [
  55. {
  56. versionNo: '最新版本v1.4.0',
  57. date: '2021年5月14日发布',
  58. link: 'https://gitee.com/qiwen-cloud/qiwen-file'
  59. }
  60. ],
  61. bannerImg: require('_a/images/home/banner/banner1.png')
  62. }
  63. ]
  64. }
  65. },
  66. methods: {
  67. // 跳转到网盘页面
  68. goFile() {
  69. this.$router.push({ name: 'File', query: { filePath: '/', fileType: 0 } })
  70. }
  71. }
  72. }
  73. </script>
  74. <style lang="stylus" scoped>
  75. @import '~_a/styles/varibles.styl';
  76. .el-carousel {
  77. width: 100%;
  78. display: block;
  79. background: linear-gradient(to right, #409EFF, #79bbff);
  80. .carosel-inner {
  81. width: 100%;
  82. .carousel-wrap {
  83. position: relative;
  84. margin: 0 auto;
  85. width: 85%;
  86. height: 100%;
  87. .carousel-caption {
  88. position: absolute;
  89. left: 0;
  90. top: 140px;
  91. text-shadow: none;
  92. max-width: 550px;
  93. color: #fff;
  94. text-align: center;
  95. h1 {
  96. font-weight: normal;
  97. margin: 0;
  98. font-size: 30px;
  99. animation-delay: 1s;
  100. }
  101. ul {
  102. padding: 25px 0 25px 20px;
  103. li {
  104. line-height: 2.2;
  105. font-size: 15px;
  106. }
  107. }
  108. >>> .el-button {
  109. border-width: 2px;
  110. background: transparent;
  111. color: #fff;
  112. &:hover {
  113. border-color: transparent;
  114. background: $Warning;
  115. }
  116. }
  117. .version-wrapper {
  118. margin: 0 0 10px;
  119. .version-item {
  120. display: inline-block;
  121. margin: 50px 0 0 18px;
  122. color: rgba(255, 255, 255, 0.8);
  123. &:hover {
  124. text-decoration: underline;
  125. color: #fff;
  126. }
  127. .version-number {
  128. margin-right: 16px;
  129. }
  130. }
  131. }
  132. }
  133. .carousel-img {
  134. max-width: 580px;
  135. position: absolute;
  136. right: 0px;
  137. top: 0;
  138. img {
  139. max-width: 100%;
  140. vertical-align: middle;
  141. }
  142. }
  143. }
  144. }
  145. }
  146. </style>