four.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <div id="index">
  3. <el-row>
  4. <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
  5. <el-col :span="24" class="one">
  6. <el-image class="image" :src="news" fit="fill" />
  7. <div class="input">
  8. <a-tabs v-model:activeKey="activeKey" centered>
  9. <a-tab-pane key="1" tab="全部"> </a-tab-pane>
  10. <a-tab-pane key="2" tab="找专家"> </a-tab-pane>
  11. <a-tab-pane key="3" tab="找资源"> </a-tab-pane>
  12. <a-tab-pane key="4" tab="找需求"> </a-tab-pane>
  13. <a-tab-pane key="5" tab="更多+"> </a-tab-pane>
  14. </a-tabs>
  15. <a-input-search
  16. v-model:value="searchValue"
  17. placeholder="请输入想要搜索的内容"
  18. enter-button="搜索"
  19. size="large"
  20. @search="onSearch"
  21. />
  22. <div class="hot">
  23. <div class="hot_1">热门搜索:</div>
  24. <div class="hot_2">
  25. <span>商贸</span>
  26. <span>红旗</span>
  27. <span>有机发光器件</span>
  28. <span>车载显示屏</span>
  29. <span>政府质量奖</span>
  30. <span>科技</span>
  31. </div>
  32. </div>
  33. </div>
  34. </el-col>
  35. <el-col :span="24" class="two">
  36. <home v-if="activeKey == '1'"></home>
  37. <expert v-if="activeKey == '2'"></expert>
  38. <demand v-if="activeKey == '4'"></demand>
  39. </el-col>
  40. </el-col>
  41. </el-row>
  42. </div>
  43. </template>
  44. <script setup>
  45. // 组件
  46. import expert from '@/views/expert/index.vue'
  47. import demand from '@/views/demand/index.vue'
  48. import home from '@/views/home/index.vue'
  49. // 图片引入
  50. import news from '/images/bg.png'
  51. // 加载中
  52. const loading = ref(false)
  53. const activeKey = ref('1')
  54. // 请求
  55. onMounted(async () => {
  56. loading.value = true
  57. await search()
  58. loading.value = false
  59. })
  60. const search = async () => {}
  61. </script>
  62. <style scoped lang="scss">
  63. .main {
  64. .one {
  65. position: relative;
  66. .image {
  67. width: 100%;
  68. height: 200px;
  69. }
  70. .input {
  71. width: 800px;
  72. position: absolute;
  73. left: 25%;
  74. bottom: 25%;
  75. .hot {
  76. display: flex;
  77. margin: 10px 0 0 0;
  78. padding: 10px;
  79. .hot_2 {
  80. span {
  81. margin: 0 10px;
  82. font-size: $global-font-size-16;
  83. font-family:
  84. PingFangSC-Regular,
  85. PingFang SC;
  86. font-weight: 400;
  87. color: #666;
  88. line-height: $global-font-size-18;
  89. cursor: pointer;
  90. }
  91. span:hover {
  92. color: #1989fa;
  93. }
  94. }
  95. }
  96. }
  97. }
  98. }
  99. </style>