SearchFirst.vue 782 Bytes
<template>
  <div class="search_container" @click="jumpPage">
    <van-icon name="search" color="#fff" size="18" class="search_first" />
    <span class="text">{{placeholder}}</span>
  </div>
</template>
<script>
export default {
  name: 'SearchFirst',
  props: {
    placeholder: {
      type: String
    }
  },
  methods: {
    jumpPage() {
      this.$emit('jumpPage')
    }
  }
}
</script>
<style lang="less" scoped>
.search_container {
  width: 384px;
  margin: 10px auto;
  display: flex;
  height: 33px;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 16px;
  .search_first {
    opacity: 1;
    margin-left: 10px;
    margin-right: 5px;
  }
  .text {
    color: #fff;
    opacity: 0.8;
    font-size: 12px;
  }
}
</style>