top.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <div id="top">
  3. <el-row v-show="siteInfo.display">
  4. <el-col :span="24" class="main">
  5. <div class="w_1200">
  6. <el-col :span="24" class="one">
  7. <el-col :span="20" class="left" @click.native="$router.push('/')">
  8. <el-col :span="3" class="image">
  9. <el-image :src="siteInfo.logo_url"></el-image>
  10. </el-col>
  11. <el-col :span="21" class="other">
  12. <el-col :span="24" class="zhTitle textOver">
  13. {{ siteInfo.zhTitle }}
  14. </el-col>
  15. <el-col :span="24" class="enTitle textOver">
  16. {{ siteInfo.enTitle }}
  17. </el-col>
  18. </el-col>
  19. </el-col>
  20. <el-col :span="4" class="right">
  21. <slot name="deRight"></slot>
  22. </el-col>
  23. </el-col>
  24. </div>
  25. </el-col>
  26. </el-row>
  27. </div>
  28. </template>
  29. <script>
  30. import { mapState, createNamespacedHelpers } from 'vuex';
  31. export default {
  32. name: 'top',
  33. props: {
  34. siteInfo: { type: Object, default: () => {} },
  35. },
  36. components: {},
  37. data: function() {
  38. return {};
  39. },
  40. created() {},
  41. methods: {},
  42. computed: {
  43. ...mapState(['user']),
  44. },
  45. metaInfo() {
  46. return { title: this.$route.meta.title };
  47. },
  48. watch: {
  49. test: {
  50. deep: true,
  51. immediate: true,
  52. handler(val) {},
  53. },
  54. },
  55. };
  56. </script>
  57. <style lang="less" scoped>
  58. .main {
  59. .one {
  60. min-height: 130px;
  61. .left {
  62. .image {
  63. padding: 16px 0;
  64. text-align: center;
  65. .el-image {
  66. width: 90px;
  67. height: 90px;
  68. }
  69. }
  70. .other {
  71. padding: 30px 0;
  72. .zhTitle {
  73. font-size: 35px;
  74. font-family: cursive;
  75. font-weight: 700;
  76. }
  77. .enTitle {
  78. font-size: 15px;
  79. text-transform: capitalize;
  80. }
  81. }
  82. }
  83. }
  84. }
  85. </style>