search.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <view class="search-container">
  3. <view class="search-box">
  4. <uv-search :showAction="true" actionText="搜索" placeholder="请输入房源或项目名称" :animation="false"
  5. v-model="searchValue" @search="search" @custom="search">
  6. </uv-search>
  7. </view>
  8. <view class="search-tag">
  9. <view class="tag-title">标签列表</view>
  10. <view class="tag-list">
  11. <view class="tag-item" @click="search">
  12. 标签1
  13. </view>
  14. <view class="tag-item" @click="search">
  15. 标签2
  16. </view>
  17. <view class="tag-item" @click="search">
  18. 标签3
  19. </view>
  20. </view>
  21. <view class="tag-title">历史搜索</view>
  22. <view class="tag-list">
  23. <view class="tag-item" @click="search">
  24. 维绿大厦
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. searchValue: ''
  35. }
  36. },
  37. onShow() {},
  38. methods: {
  39. search() {
  40. this.$navigateTo('/pages/searchlist/searchlist?searchValue=' + this.searchValue);
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="scss">
  46. .search-container {
  47. .search-box {
  48. border-top: 1px solid $uni-border-1;
  49. background: #Fff;
  50. margin-bottom: 20rpx;
  51. padding: 20rpx 10rpx;
  52. padding-left: 20rpx;
  53. }
  54. .search-tag {
  55. background: #fff;
  56. padding: 30rpx 0 0 30rpx;
  57. .tag-title {
  58. font-size: 24rpx;
  59. font-weight: bold;
  60. color: $uni-base-color;
  61. margin-bottom: 20rpx;
  62. }
  63. .tag-list {
  64. display: flex;
  65. flex-wrap: wrap;
  66. }
  67. .tag-item {
  68. background: $uni-background-color;
  69. padding: 10rpx 20rpx;
  70. color: $uni-base-color;
  71. font-weight: 300;
  72. margin-right: 30rpx;
  73. margin-bottom: 30rpx;
  74. font-size: 24rpx;
  75. border-radius: 8rpx;
  76. }
  77. }
  78. }
  79. </style>