LoginLayout.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <div id="dw-layout" :style="{height: pageH}" class="dw-layout-body" >
  3. <el-container style="padding: 0px;">
  4. <el-header height="80" style="padding: 0px;" >
  5. <dw-header-login></dw-header-login>
  6. </el-header>
  7. <el-container style="z-index: 1;">
  8. <el-container>
  9. <el-main style="padding: 20px 0px;" >
  10. <router-view></router-view>
  11. </el-main>
  12. <el-footer height="80" class="dw-footer-container"><dw-footer></dw-footer></el-footer>
  13. </el-container>
  14. </el-container>
  15. </el-container>
  16. </div>
  17. </template>
  18. <script>
  19. import DwHeader from '@/components/layouts/DwHeader.vue'
  20. import DwHeaderLogin from '@/components/layouts/DwHeaderLogin.vue'
  21. import DwNavMenu from '@/components/layouts/DwNavMenu.vue'
  22. import DwFooter from '@/components/layouts/DwFooter.vue'
  23. export default {
  24. name: 'Layout',
  25. components: {
  26. 'dw-nav-menu': DwNavMenu,
  27. 'dw-header': DwHeader,
  28. 'dw-header-login': DwHeaderLogin,
  29. 'dw-footer': DwFooter
  30. },
  31. data () {
  32. return {
  33. currentHeader: 'dw-header',
  34. pageH: '600px'
  35. }
  36. },
  37. mounted () {
  38. this.loginStatus()
  39. this.pageH = `${window.innerHeight}px`
  40. },
  41. methods: {
  42. loginStatus () {
  43. const fullPath = this.$route.fullPath
  44. if (fullPath.indexOf('login') >= 0) {
  45. this.currentHeader = 'dw-header-login'
  46. } else {
  47. this.currentHeader = 'dw-header'
  48. }
  49. }
  50. }
  51. }
  52. </script>
  53. <style scoped>
  54. body{
  55. background-color: #F1F1F1;
  56. /*#ffb25c*/
  57. }
  58. .dw-footer-container{
  59. position: fixed;
  60. bottom: 0px;
  61. width: 100%;
  62. text-align: center;
  63. background: #F1F1F1;
  64. padding-top: 20px;
  65. }
  66. .dw-layout-body{
  67. background-image: url("/static/diaowen/images/style-model/login_bg/1.jpg");
  68. -moz-background-size: auto 100%;
  69. background-size: auto 100%;
  70. background-repeat: no-repeat;
  71. }
  72. </style>