70 lines
1.4 KiB
Vue
70 lines
1.4 KiB
Vue
<template>
|
|
<view class="searchShuru">
|
|
<view class="shuru">
|
|
<img src="../../static/img/search1.png" alt class="search" />
|
|
<input type="text" :placeholder="content" style="width:620upx" @confirm="sousuo" />
|
|
<!-- <img src="../../static/img/del.png" alt class="del" v-if="isdel" /> -->
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "searchShuru",
|
|
props: {
|
|
isdel: {
|
|
type: Boolean
|
|
},
|
|
content: {
|
|
type: String,
|
|
value: ""
|
|
}
|
|
},
|
|
methods:{
|
|
sousuo(a){
|
|
console.log(a.detail.value)
|
|
this.$emit("sousuo",a.detail.value)
|
|
}
|
|
}
|
|
};
|
|
// isdel 是否有错号 content: placeholder提示的内容
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.searchShuru {
|
|
.shuru {
|
|
width: 704upx;
|
|
height: 50upx;
|
|
margin: 0 auto;
|
|
border-radius: 25upx;
|
|
color: black;
|
|
background-color: #efefef;
|
|
font-size: 22upx;
|
|
text-indent: 79upx;
|
|
line-height: 50upx;
|
|
// position: relative;
|
|
align-items: center;
|
|
display: flex;
|
|
justify-content: center;
|
|
top: 24rpx;
|
|
}
|
|
.search {
|
|
width: 26upx;
|
|
height: 25upx;
|
|
// position: relative;
|
|
z-index: 999;
|
|
top: -30rpx;
|
|
left: 56upx;
|
|
}
|
|
.del {
|
|
width: 26upx;
|
|
height: 25upx;
|
|
// position: relative;
|
|
z-index: 999;
|
|
top: -32rpx;
|
|
left: 630upx;
|
|
}
|
|
}
|
|
input::-webkit-input-placeholder {
|
|
}
|
|
</style> |