Rap 原分销系统代码Web
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

83743363e71e31b38dfa0df620dfeafb6e97f757.svn-base 1.7KB

5ヶ月前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <div class="sidebar-logo-container" :class="{'collapse':collapse}">
  3. <transition name="sidebarLogoFade">
  4. <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
  5. <img v-if="logo" :src="logo" class="sidebar-logo">
  6. <h1 v-else class="sidebar-title">{{ title }} </h1>
  7. </router-link>
  8. <router-link v-else key="expand" class="sidebar-logo-link" to="/">
  9. <img v-if="logo" :src="logo" class="sidebar-logo">
  10. <h1 class="sidebar-title">{{ title }} </h1>
  11. </router-link>
  12. </transition>
  13. </div>
  14. </template>
  15. <script>
  16. import Logo from '@/assets/images/logo.png'
  17. export default {
  18. name: 'SidebarLogo',
  19. props: {
  20. collapse: {
  21. type: Boolean,
  22. required: true
  23. }
  24. },
  25. data() {
  26. return {
  27. title: '旺嘉分销-后台管理',
  28. logo: Logo
  29. }
  30. }
  31. }
  32. </script>
  33. <style lang="scss" scoped>
  34. .sidebarLogoFade-enter-active {
  35. transition: opacity 1.5s;
  36. }
  37. .sidebarLogoFade-enter,
  38. .sidebarLogoFade-leave-to {
  39. opacity: 0;
  40. }
  41. .sidebar-logo-container {
  42. position: relative;
  43. width: 100%;
  44. height: 50px;
  45. line-height: 50px;
  46. text-align: center;
  47. overflow: hidden;
  48. & .sidebar-logo-link {
  49. height: 100%;
  50. width: 100%;
  51. & .sidebar-logo {
  52. width: 32px;
  53. height: 32px;
  54. vertical-align: middle;
  55. margin-right: 6px;
  56. }
  57. & .sidebar-title {
  58. display: inline-block;
  59. margin: 0;
  60. color: #fff;
  61. font-weight: 600;
  62. line-height: 50px;
  63. font-size: 14px;
  64. font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
  65. vertical-align: middle;
  66. }
  67. }
  68. &.collapse {
  69. .sidebar-logo {
  70. margin-right: 0px;
  71. }
  72. }
  73. }
  74. </style>