Header.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <div>
  3. <div style="display: flex; width: 100vw; justify-content: space-between; align-items: center">
  4. <div style="display: flex; padding-left: 10%">
  5. <div style="width: 120px; height: 55px; background-color: brown" />
  6. <a-menu v-model:selectedKeys="current" mode="horizontal" theme="light" style="line-height: 55px">
  7. <a-menu-item style="margin-left: 10px; margin-right: 10px" key="1">首页</a-menu-item>
  8. <a-menu-item style="margin-left: 10px; margin-right: 10px" key="2">资源中心</a-menu-item>
  9. <a-menu-item style="margin-left: 10px; margin-right: 10px" key="3">资源管理</a-menu-item>
  10. </a-menu>
  11. </div>
  12. <div class="header-right">
  13. <!-- <a-input-search placeholder="输入关键词搜索" style="width: 200px" /> -->
  14. <div style="display: flex">
  15. <SearchOutlined :style="{ fontSize: '16px', color: '#00000083' }" />
  16. <div style="width: 5px"></div>
  17. <span style="font-size: 12px; color: #00000083">搜索</span>
  18. </div>
  19. <div style="width: 20px"></div>
  20. <div style="display: flex">
  21. <UserOutlined :style="{ fontSize: '16px', color: '#00000083' }" />
  22. <div style="width: 5px"></div>
  23. <span style="font-size: 12px; color: #00000083">登录</span>
  24. </div>
  25. <div style="width: 20px"></div>
  26. <div style="display: flex">
  27. <span style="font-size: 12px; color: #00000083">注册</span>
  28. </div>
  29. <!-- <a-button type="primary">登录</a-button>
  30. <a-button>注册</a-button> -->
  31. </div>
  32. </div>
  33. <div class="line" style=""></div>
  34. </div>
  35. </template>
  36. <script setup>
  37. import { ref } from 'vue'
  38. const current = ref(['2']) // 默认选中“资源中心”
  39. </script>
  40. <style scoped>
  41. .header {
  42. display: flex;
  43. align-items: center;
  44. justify-content: space-between;
  45. padding: 0 50px;
  46. }
  47. .header-right {
  48. display: flex;
  49. align-items: center;
  50. margin-right: 20%;
  51. }
  52. .line {
  53. width: 100%;
  54. height: 0.25px;
  55. background-color: #00000013;
  56. }
  57. </style>