You've already forked guangan-mp
39 lines
724 B
Vue
39 lines
724 B
Vue
<template>
|
|
<view>
|
|
<view class="border rounded-lg overflow-hidden flex align-stretch">
|
|
<input :placeholder="placeholder" v-model="value" class="flex-1 font30 py-2 px-3" />
|
|
<view class=" font30 flex-shrink px-3 py-2 flex align-center border-left" @click="toSearch">
|
|
<uni-icons type="search" size="16" color="#666666"></uni-icons>
|
|
<text class="ml-1">搜索</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name:"i-search",
|
|
props:{
|
|
placeholder:{
|
|
type: String,
|
|
default() {
|
|
return null;
|
|
},
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
value:null
|
|
};
|
|
},
|
|
methods:{
|
|
toSearch(){
|
|
this.$emit('click',this.value)
|
|
}
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
</style> |