You've already forked guangan-mp
1.0.0
This commit is contained in:
39
components/i-search/i-search.vue
Normal file
39
components/i-search/i-search.vue
Normal file
@ -0,0 +1,39 @@
|
||||
<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>
|
Reference in New Issue
Block a user