index.vue 738 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <div class="logo">
  3. <img :src="websiteConfig.logo" alt="" :class="{ 'mr-2': !collapsed }" />
  4. <h2 v-show="!collapsed" class="title">{{ 'MECMP' }}</h2>
  5. </div>
  6. </template>
  7. <script lang="ts">
  8. import { websiteConfig } from '@/config/website.config'
  9. export default {
  10. name: 'Index',
  11. props: {
  12. collapsed: {
  13. type: Boolean
  14. }
  15. },
  16. data() {
  17. return {
  18. websiteConfig
  19. }
  20. }
  21. }
  22. </script>
  23. <style lang="less" scoped>
  24. .mr-2 {
  25. margin-right: 10px;
  26. }
  27. .logo {
  28. display: flex;
  29. align-items: center;
  30. justify-content: center;
  31. height: 64px;
  32. line-height: 64px;
  33. overflow: hidden;
  34. white-space: nowrap;
  35. img {
  36. width: auto;
  37. height: 32px;
  38. }
  39. .title {
  40. margin-bottom: 0;
  41. }
  42. }
  43. </style>