UserLayout.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <div :class="['user-layout-wrapper', isMobile && 'mobile']">
  3. <div class="container">
  4. <router-view />
  5. <div class="footer">
  6. <!-- <div class="copyright">Copyright &copy; 2018 vueComponent</div> -->
  7. </div>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. import { deviceMixin } from '@/store/device-mixin'
  13. export default {
  14. name: 'UserLayout',
  15. mixins: [deviceMixin],
  16. mounted () {
  17. }
  18. }
  19. </script>
  20. <style lang="less" scoped>
  21. .user-layout-wrapper {
  22. height: 100%;
  23. &.mobile {
  24. .container {
  25. .main {
  26. max-width: 368px;
  27. width: 98%;
  28. }
  29. }
  30. }
  31. .container {
  32. position: relative;
  33. width: 100%;
  34. height: 100%;
  35. background-image: url(~@/assets/background.jpg);
  36. text-align: center;
  37. &::before {
  38. display: inline-block;
  39. height: 100%;
  40. vertical-align: middle;
  41. content: '';
  42. }
  43. a {
  44. text-decoration: none;
  45. }
  46. .header {
  47. margin-bottom: 40px;
  48. .logo {
  49. height: 44px;
  50. vertical-align: top;
  51. margin-right: 16px;
  52. border-style: none;
  53. }
  54. .title {
  55. font-size: 28px;
  56. color: rgba(0, 0, 0, 0.85);
  57. font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
  58. position: relative;
  59. }
  60. }
  61. .main {
  62. display: inline-block;
  63. vertical-align: middle;
  64. min-width: 260px;
  65. width: 460px;
  66. margin: -80px auto 0 auto;
  67. padding: 70px 60px;
  68. background: rgba(255, 255, 255, 0.48);
  69. // box-shadow: 0 2px 30px rgba(177, 177, 177, 0.14);
  70. text-align: left;
  71. }
  72. .footer {
  73. position: absolute;
  74. width: 100%;
  75. bottom: 0;
  76. padding: 0 16px;
  77. margin: 48px 0 24px;
  78. text-align: center;
  79. .copyright {
  80. color: rgba(0, 0, 0, 0.45);
  81. font-size: 14px;
  82. }
  83. }
  84. }
  85. }
  86. </style>