search.vue 1.83 KB
<template>
  <div class="global-search nafmii-head-bg3">
    <nafm-header navClass="nafmii-head-bg3">
      <SearchInput class="search-input" v-model="keyword" :placeholder="$t('home.searchPlaceholder')" @search="handleSearch" />
    </nafm-header>
    <main>
      <div class="search-history-title">
        <span>搜索历史</span>
        <div class="clear">
          <img src="" alt="">
        </div>
      </div>
      <div class="search-history-values">
        <span>ksdj离开</span>
        <span>ksdj离开</span>
        <span>ksdj离开水电费会计师</span>
        <span>ksdj离开水电费会计师</span>
        <span>水电费会计师</span>
        <span>电费会计师</span>
      </div>
    </main>
  </div>
</template>

<script>
import SearchInput from '@/components/SearchInput'
export default {
  name: 'GlobalSearch',
  components: { SearchInput },
  data () {
    return {
      keyword: null
    }
  },
  methods: {
    handleSearch (val) {
    }
  }
}
</script>

<style lang="less" scoped>
.global-search {
  height: 100%;
  display: flex;
  flex-direction: column;
  .search-input {
    width: 100%;
    padding-left: 40px;
  }
  main {
    background: #fafafa;
    height: 100%;
    padding: 20px 15px;
    .search-history-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      span {
        color: #333333;
        font-size: 12px;
      }
      .clear {
        width: 25px;
        height: 25px;
        background: white;
      }
    }
    .search-history-values {
      padding-top: 5px;
      display: flex;
      flex-wrap: wrap;

      span {
        background: white;
        line-height: 30px;
        font-size: 12px;
        padding: 0 15px;
        border-radius: 15px;
        color: #161818;
        margin-right: 10px;
        margin-bottom: 10px;
      }
    }
  }
}
</style>