index.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <div style="min-width: 1184px;">
  3. <!-- 搜索框 -->
  4. <div class="default-width py-5">
  5. <div class="search d-flex align-center">
  6. <v-text-field
  7. v-model="inputVal"
  8. placeholder="请输入关键词"
  9. color="primary"
  10. variant="plain"
  11. density="compact"
  12. clearable
  13. :hide-details="true"
  14. class="ml-3 px-2"
  15. style="height: 100%; line-height: 100%;"
  16. @keyup.enter="handleSearch"
  17. ></v-text-field>
  18. <v-btn class="searchBtn" prepend-icon="mdi-shopping-search-outline" @click="handleSearch">搜索</v-btn>
  19. </div>
  20. </div>
  21. <!-- 轮播图 -->
  22. <Carousel />
  23. </div>
  24. </template>
  25. <script setup>
  26. defineOptions({ name: 'mall-home-index'})
  27. import { ref } from 'vue'
  28. import Carousel from './components/carousel.vue'
  29. const inputVal = ref('')
  30. const handleSearch = () => {}
  31. </script>
  32. <style scoped lang="scss">
  33. .search {
  34. height: 50px;
  35. width: 800px;
  36. border: 2px solid var(--v-primary-base);
  37. border-radius: 5px;
  38. margin: 0 auto;
  39. .searchBtn {
  40. width: 180px;
  41. height: 50px;
  42. line-height: 48px;
  43. text-align: center;
  44. font-size: 18px;
  45. color: #fff;
  46. background-color: var(--v-primary-base);
  47. cursor: pointer;
  48. }
  49. }
  50. </style>