footer.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <footer class="footer">
  3. <div class="container">
  4. <div class="footer-main">
  5. <p class="footer-main-title">Element {{ version }} Lithium</p>
  6. <a href="https://github.com/ElemeFE/element/issues" class="footer-main-link" target="_blank">{{ langConfig.feedback }}</a>
  7. <a :href="`https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.${ lang }.md`" class="footer-main-link" target="_blank">{{ langConfig.contribution }}</a>
  8. </div>
  9. <div class="footer-social">
  10. <el-popover
  11. ref="weixin"
  12. placement="top"
  13. width="120"
  14. popper-class="footer-popover"
  15. trigger="hover">
  16. <div class="footer-popover-title">{{ langConfig.eleme }} UED</div>
  17. <img src="../assets/images/qrcode.png" alt="">
  18. </el-popover>
  19. <i class="doc-icon-weixin elementdoc" v-popover:weixin></i>
  20. <a href="//github.com/elemefe" target="_blank">
  21. <i class="doc-icon-github elementdoc"></i>
  22. </a>
  23. </div>
  24. </div>
  25. </footer>
  26. </template>
  27. <style>
  28. .footer {
  29. height: 120px;
  30. background-color: #324057;
  31. color: #a4aebd;
  32. width: 100%;
  33. z-index: 1000;
  34. margin-top: -120px;
  35. * {
  36. word-spacing: 0;
  37. }
  38. .container {
  39. height: 100%;
  40. box-sizing: border-box;
  41. }
  42. .footer-main {
  43. font-size: 0;
  44. padding-top: 40px;
  45. display: inline-block;
  46. .footer-main-title {
  47. line-height: 1;
  48. font-size: 22px;
  49. margin: 0;
  50. }
  51. .footer-main-link {
  52. display: inline-block;
  53. margin: 12px 18px 0 0;
  54. line-height: 1;
  55. font-size: 12px;
  56. color: #768193;
  57. a {
  58. color: #768193;
  59. text-decoration: none;
  60. }
  61. }
  62. }
  63. .footer-social {
  64. float: right;
  65. line-height: 120px;
  66. .elementdoc {
  67. transition: .3s;
  68. display: inline-block;
  69. line-height: 32px;
  70. text-align: center;
  71. color: #8D99AB;
  72. background-color: transparent;
  73. size: 32px;
  74. font-size: 32px;
  75. vertical-align: middle;
  76. &:hover {
  77. transform: scale(1.2);
  78. }
  79. }
  80. .doc-icon-weixin {
  81. margin-right: 36px;
  82. &:hover {
  83. color: #fff;
  84. }
  85. }
  86. .doc-icon-github {
  87. margin-right: 0;
  88. &:hover {
  89. color: #fff;
  90. }
  91. }
  92. }
  93. }
  94. .footer-popover {
  95. padding: 0;
  96. min-width: 120px;
  97. line-height: normal;
  98. box-shadow: 0 0 11px 0 rgba(174, 187, 211, 0.24);
  99. .footer-popover-title {
  100. border-bottom: solid 1px #eaeefb;
  101. height: 30px;
  102. line-height: 30px;
  103. text-align: center;
  104. color: #99a9bf;
  105. background-color: #f8f9fe;
  106. }
  107. img {
  108. size: 100px;
  109. margin: 10px;
  110. }
  111. }
  112. @media (max-width: 768px) {
  113. .footer {
  114. .footer-social {
  115. display: none;
  116. }
  117. }
  118. }
  119. </style>
  120. <script type="text/babel">
  121. import compoLang from '../i18n/component.json';
  122. import { version } from 'main/index.js';
  123. export default {
  124. data() {
  125. return {
  126. version
  127. };
  128. },
  129. computed: {
  130. lang() {
  131. return this.$route.path.split('/')[1];
  132. },
  133. langConfig() {
  134. return compoLang.filter(config => config.lang === this.lang)[0]['footer'];
  135. }
  136. }
  137. };
  138. </script>