Commit aca5d480 by 杨北旺

fix:修复查询监听问题

1 parent 1b14d129
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
@search="onSearch" @search="onSearch"
right-icon="search" right-icon="search"
left-icon="" left-icon=""
v-on:click-right-icon="onSearchRight"
@input="changeValue"
/> />
</div> </div>
</template> </template>
...@@ -33,6 +35,15 @@ export default { ...@@ -33,6 +35,15 @@ export default {
methods: { methods: {
onSearch (e) { onSearch (e) {
this.$emit('search', e) this.$emit('search', e)
},
onSearchRight(){
this.$emit('rightSearch',this.inputValue)
},
changeValue(e){
this.inputValue = e
if(!e){
this.$emit('search', e)
}
} }
} }
} }
......
<template> <template>
<div class="container"> <div class="container">
<div class="search sticky"> <div class="search sticky">
<search placeholder="输入客户姓名、手机号、车架号" @search="search" /> <search placeholder="输入客户姓名、手机号、车架号" @rightSearch="toIconSearch" @search="search" />
</div> </div>
<div class="tab_widget"> <div class="tab_widget">
<div v-for="(item, index) in tabs" :key="index" class="tab_pannel flex_ccc"> <div v-for="(item, index) in tabs" :key="index" class="tab_pannel flex_ccc">
...@@ -160,6 +160,9 @@ export default { ...@@ -160,6 +160,9 @@ export default {
this.getServicesList() this.getServicesList()
this.getOrderCount(e) this.getOrderCount(e)
}, },
toIconSearch(e){
this.search(e)
},
changeTab(e) { changeTab(e) {
this.currentTabIndex = e this.currentTabIndex = e
let dataPerfection = e == 2 ? 1 : e == 1 ? 0 : 3 let dataPerfection = e == 2 ? 1 : e == 1 ? 0 : 3
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!