Navbar.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <div>
  3. <div class="left-menu">
  4. <hamburger class="hamburger-container" :is-active="opened" @toggleClick="toggleSideBar" />
  5. <div>
  6. <el-image class="img" :src="src" alt=""></el-image>
  7. </div>
  8. <div class="title">
  9. <div class="tit">智慧运营管理中心</div>
  10. <div class="tit2">Intelligent operation and managenemnt center</div>
  11. </div>
  12. <el-select class="select-btn" v-model="value" placeholder="主语国际3号楼">
  13. <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
  14. </el-option>
  15. </el-select>
  16. </div>
  17. <div class="right-menu">
  18. <el-image class="phone" :src="src" alt=""></el-image>
  19. <el-image class="help" :src="src" alt=""></el-image>
  20. <el-image class="notification" :src="src" alt="" ></el-image>
  21. <div class="avatar"><el-avatar :size="50" :src="circleUrl"></el-avatar></div>
  22. <div class="info">
  23. <i class="el-icon-user"></i>
  24. {{ name }}
  25. </div>
  26. </div>
  27. </div>
  28. </template>
  29. <script>
  30. import hamburger from '@/components/Hamburger/index'
  31. export default {
  32. components: { hamburger },
  33. name: "Navbar",
  34. data() {
  35. return {
  36. value:'test',
  37. options: {
  38. },
  39. opened:true,
  40. name: "test",
  41. src:"https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png",
  42. circleUrl: "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png",
  43. isCollapse: true
  44. }
  45. },
  46. methods: {
  47. toggleSideBar(){
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="less" scoped>
  53. .left-menu {
  54. float: left;
  55. height: 100%;
  56. line-height: 35px;
  57. width: 700px;
  58. .hamburger-container {
  59. position: absolute;
  60. line-height: 64px;
  61. left: 0;
  62. width:64px;
  63. float: left;
  64. cursor: pointer;
  65. transition: background .3s;
  66. -webkit-tap-highlight-color:transparent;
  67. &:hover {
  68. background: rgba(0, 0, 0, .025)
  69. }
  70. &:hover {
  71. background: rgba(247, 243, 243, 0.966)
  72. }
  73. }
  74. .img {
  75. display: flex;
  76. position: absolute;
  77. left: 70px;
  78. top: 3px;
  79. width: 58px;
  80. height: 57px;
  81. bottom: 4px;
  82. }
  83. .title {
  84. position: absolute;
  85. // margin-top: 4px;
  86. // margin-bottom: 4px;
  87. left: 130px;
  88. // top: 4px;
  89. width: 302px;
  90. height: 64px;
  91. color: rgba(255, 255, 255, 1);
  92. // font-size: 18px;
  93. text-align: left;
  94. .tit {
  95. left: 130px;
  96. margin-top: 4px;
  97. width: 302px;
  98. height: 29px;
  99. color: rgba(255, 255, 255, 1);
  100. font-size: 18px;
  101. text-align: left;
  102. }
  103. .tit2 {
  104. left: 130px;
  105. top: 33px;
  106. width: 302px;
  107. height: 29px;
  108. color: rgba(255, 255, 255, 1);
  109. font-size: 14px;
  110. text-align: left;
  111. align-content: center;
  112. }
  113. }
  114. .select-btn {
  115. position: absolute;
  116. left: 442px;
  117. top: 15px;
  118. width: 205px;
  119. height: 36px;
  120. line-height: 23px;
  121. border-radius: 4px;
  122. color: rgba(226, 229, 231, 1);
  123. font-size: 16px;
  124. text-align: center;
  125. /deep/.el-input__inner {
  126. background-color: #045bb8;
  127. color: rgba(226, 229, 231, 1);
  128. border: 1px solid #3a8ee6;
  129. }
  130. }
  131. }
  132. .right-menu {
  133. float: right;
  134. height: 100%;
  135. line-height: 50px;
  136. width: 344px;
  137. &:focus {
  138. outline: none;
  139. }
  140. .phone {
  141. position: absolute;
  142. float: right;
  143. right: 320px;
  144. top: 20px;
  145. width: 24px;
  146. height: 24px;
  147. }
  148. .help {
  149. position: absolute;
  150. float: right;
  151. right: 278px;
  152. top: 20px;
  153. width: 24px;
  154. height: 24px;
  155. }
  156. .notification {
  157. position: absolute;
  158. float: right;
  159. right: 236px;
  160. top: 20px;
  161. width: 24px;
  162. height: 24px;
  163. }
  164. .avatar {
  165. position: absolute;
  166. float: right;
  167. right: 166px;
  168. top: 6px;
  169. width: 50px;
  170. height: 50px;
  171. }
  172. .info {
  173. position: absolute;
  174. float: right;
  175. right: 86px;
  176. width: 98px;
  177. height: 50px;
  178. top: 7px;
  179. bottom: 7px;
  180. color: rgba(255, 255, 255, 1);
  181. }
  182. }
  183. </style>