<template>
|
<div class="custom-search1">
|
<input class="input-inner" type="text" autocapitalize="off" placeholder="请输入检索词" v-model="searchName"/>
|
<div class="input-append" v-on:click="$emit('search',searchName)">
|
<span class="iconfont"></span>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
name: "CustomSearch1",
|
data() {
|
return {
|
searchName: ""
|
}
|
}
|
}
|
</script>
|
|
<style scoped>
|
@font-face {
|
font-family: 'iconfont';
|
src: url('../assets/icon/iconfont.woff2') format('woff2'),
|
url('../assets/icon/iconfont.woff') format('woff'),
|
url('../assets/icon/iconfont.ttf') format('truetype');
|
}
|
|
.iconfont {
|
font-family: "iconfont" !important;
|
font-size: 2.68rem;
|
color: #EFC587;
|
font-style: normal;
|
-webkit-font-smoothing: antialiased;
|
-moz-osx-font-smoothing: grayscale;
|
}
|
|
.custom-search1 {
|
width: 99%;
|
height: 8vh;
|
border: 0.25rem solid #EFC587;
|
box-sizing: border-box;
|
border-radius: 200px;
|
background-color: rgba(0, 0, 0, 0.23);
|
|
display: flex;
|
flex-direction: row;
|
flex-wrap: nowrap;
|
justify-content: center;
|
align-items: center;
|
}
|
|
.custom-search1 .input-inner {
|
width: 80%;
|
height: 95%;
|
border: 0;
|
border-radius: 200px;
|
background-color: rgba(0, 0, 0, 0);
|
|
font-size: 1.75rem;
|
font-family: Microsoft YaHei;
|
font-weight: 400;
|
line-height: 1.25rem;
|
color: #EFC587;
|
opacity: 1;
|
}
|
|
.custom-search1 .input-inner:focus {
|
outline: none;
|
}
|
|
.custom-search1 .input-append {
|
width: 9%;
|
cursor: pointer;
|
}
|
|
.custom-search1 .input-append svg {
|
max-width: 2.68rem;
|
width: 100%;
|
height: 100%;
|
}
|
</style>
|