list.vue 2.35 KB
<template>
  <div class="list_container">
    <NafmHeader navClass="nafmii-head-bg3" title="资质查询">
      <template slot="bottom">
        <div class="search_bar">
          <van-field v-model="searchName" placeholder="请输入机构名称">
            <template #label>
              <div class="select" :style="searchName && searchName!== '' ? 'opacity: 1' : 'opacity: 0.6'">
                <van-icon name="search" />
                <span class="qulification_type">{{qulificationType}}</span>
                <van-icon name="play" />
              </div>
            </template>
          </van-field>
        </div>
      </template>
    </NafmHeader>
    <main class="list_content">
      <section class="content">
        <van-cell-group>
          <van-cell v-for="item in searchList" :key="item.id" icon="search">
            <template slot="title">
              <!-- <van-icon name="search" /> -->
              <!-- <span>{{item.name.replace(new RegExp(searchName, 'g'), '<span></span>')}}</span> -->
              <span>{{item.name}}</span>
            </template>
          </van-cell>
        </van-cell-group>
      </section>
    </main>
  </div>
</template>
<script>
export default {
  name: 'QulificationList',
  data() {
    return {
      searchName: 'aaa',
      qulificationType: '机构',
      searchList: [{name: 'aaaaaaabbbbb', id: 111}]
    }
  }
}
</script>
<style lang="less" scoped>
.search_bar {
  width: 384px;
  padding: 10px 15px;
  .van-cell {
    border-radius: 50px;
    background-color: rgba(255, 255, 255, 0.3);
    padding: 0px;
    ::v-deep .van-field__control {
      font-size: 12px;
      color: #ffffff;
    }
    ::v-deep input::-webkit-input-placeholder {
      color: rgba(255, 255, 255, 0.6);
    }
    ::v-deep input::-moz-input-placeholder {
      color: rgba(255, 255, 255, 0.6);
    }
    ::v-deep input::-ms-input-placeholder {
      color: rgba(255, 255, 255, 0.6);
    }
  }
}
.select {
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 0 10px 0 5px;
  font-size: 12px;
  .van-icon-search {
    margin: 0 11px;
  }
  .qulification_type {
    margin-right: 5px;
  }
  .van-icon-play {
    transform: rotate(90deg);
    -ms-transform: rotate(90deg); /* IE 9 */
    -moz-transform: rotate(90deg); /* Firefox */
    -webkit-transform: rotate(90deg); /* Safari 和 Chrome */
    -o-transform: rotate(90deg);
  }
}
</style>