LoginLayout.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <div class="login-container">
  3. <el-row :gutter="20" class="top">
  4. <el-col :span="6" :offset="1">
  5. <div style="display: flex; flex-direction: row; align-items: center">
  6. <a href="/">
  7. <div v-if="siteData.frontLogo">
  8. <img :src="siteData.frontLogo" />
  9. </div>
  10. <div
  11. v-else
  12. style="
  13. font-weight: 700;
  14. font-size: 26px;
  15. color: #eee;
  16. flex-grow: 1;
  17. text-align: left;
  18. padding-left: 10px;
  19. "
  20. >
  21. {{ siteData.siteName }}
  22. </div>
  23. </a>
  24. </div>
  25. </el-col>
  26. <el-col :span="12" style="line-height: 60px; text-align: right" />
  27. </el-row>
  28. <el-row :gutter="20" class="content">
  29. <el-col :span="18" :offset="3">
  30. <app-main />
  31. </el-col>
  32. <!-- <div class="loginImgBox">
  33. <img src="@/assets/web/images/login3.png" />
  34. </div> -->
  35. </el-row>
  36. <el-row :gutter="20" class="footer">
  37. <!-- <el-col :span="18" :offset="3">
  38. <div v-html="siteData.copyRight" />
  39. </el-col> -->
  40. <div class="flex">
  41. <div v-html="siteData.copyRight" />
  42. </div>
  43. </el-row>
  44. </div>
  45. </template>
  46. <script>
  47. import { mapGetters } from "vuex";
  48. import AppMain from "@/layout/components/AppMain";
  49. export default {
  50. name: "LoginLayout",
  51. components: { AppMain },
  52. data() {
  53. return {
  54. activeIndex: "",
  55. };
  56. },
  57. computed: {
  58. ...mapGetters(["siteData"]),
  59. },
  60. methods: {
  61. isActive(url) {
  62. if (this.activeIndex === url) {
  63. return "nav active";
  64. }
  65. return "nav";
  66. },
  67. },
  68. };
  69. </script>
  70. <style scoped>
  71. @import "~@/styles/login.css";
  72. ::v-deep .app-main {
  73. min-height: 84vh;
  74. width: 100%;
  75. }
  76. .header-bg {
  77. height: 60px;
  78. background: #4377fb;
  79. }
  80. .right-user {
  81. display: flex;
  82. justify-content: flex-end;
  83. flex-direction: row;
  84. line-height: 60px;
  85. align-items: center;
  86. }
  87. .right-user :nth-child(1),
  88. .right-user :nth-child(2) {
  89. margin-right: 10px;
  90. }
  91. .right-user a {
  92. color: #efefef;
  93. font-size: 14px;
  94. font-weight: 500;
  95. }
  96. .right-user a:first-child {
  97. margin-right: 10px;
  98. }
  99. .right-user a:hover {
  100. color: #ffd550;
  101. }
  102. .nav {
  103. color: #333;
  104. border: none;
  105. background: transparent;
  106. font-weight: 500;
  107. font-size: 14px;
  108. padding: 5px 10px 5px 10px;
  109. margin-right: 20px;
  110. background: #fff;
  111. }
  112. .active {
  113. color: #000055;
  114. background: #ffd550;
  115. }
  116. .nav:hover {
  117. color: #000055;
  118. background: #ffd550;
  119. }
  120. .col-logo {
  121. display: flex;
  122. align-items: center;
  123. justify-content: flex-start;
  124. height: 60px;
  125. }
  126. /deep/ .top-avatar {
  127. text-align: right;
  128. display: flex;
  129. align-items: center;
  130. margin-right: 5px !important;
  131. }
  132. /deep/ .top-avatar div {
  133. display: flex;
  134. align-items: center;
  135. margin-right: -10px !important;
  136. }
  137. /deep/ .top-avatar img {
  138. width: 30px;
  139. height: 30px;
  140. border-radius: 15px;
  141. }
  142. .footer .flex {
  143. width: 100%;
  144. display: flex;
  145. justify-content: center;
  146. align-items: center;
  147. }
  148. </style>
  149. <style lang="scss" scoped>
  150. .loginImgBox {
  151. position: absolute;
  152. height: 100%;
  153. width: 100%;
  154. img {
  155. width: 100%;
  156. height: 100%;
  157. background-size: 100% 100%;
  158. }
  159. }
  160. </style>