|
@@ -2,8 +2,8 @@
|
|
<view class="content">
|
|
<view class="content">
|
|
<view class="search-box">
|
|
<view class="search-box">
|
|
<!-- mSearch组件 如果使用原样式,删除组件元素-->
|
|
<!-- mSearch组件 如果使用原样式,删除组件元素-->
|
|
- <mSearch class="mSearch-input-box" :mode="2" button="inside" :placeholder="defaultKeyword"
|
|
|
|
- @search="doSearch(false)" @input="inputChange" @confirm="doSearch(false)" :oldsearch='keyword2' v-model="keyword"></mSearch>
|
|
|
|
|
|
+ <mSearch ref='msearch' class="mSearch-input-box" :mode="2" button="inside" :placeholder="defaultKeyword"
|
|
|
|
+ @search="doSearch(false)" @input="inputChange" @confirm="doSearch(false)" v-model="keyword"></mSearch>
|
|
<view class="cancel" @click="cancel">
|
|
<view class="cancel" @click="cancel">
|
|
取消
|
|
取消
|
|
</view>
|
|
</view>
|
|
@@ -96,33 +96,35 @@
|
|
this.init();
|
|
this.init();
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- searchcontent:{
|
|
|
|
- handler(oldValue, newValue) {
|
|
|
|
- this.keyword=oldValue
|
|
|
|
- // if (val != '') {
|
|
|
|
- // this.place = val
|
|
|
|
- // }
|
|
|
|
- },
|
|
|
|
- deep:true,
|
|
|
|
- immediate:true,
|
|
|
|
- },
|
|
|
|
- keyword:{
|
|
|
|
- handler(oldValue, newValue) {
|
|
|
|
- this.keyword2=oldValue
|
|
|
|
- console.log(oldValue, newValue,11111111)
|
|
|
|
- // if (val != '') {
|
|
|
|
- // this.place = val
|
|
|
|
- // }
|
|
|
|
- },
|
|
|
|
- deep:true,
|
|
|
|
- immediate:true,
|
|
|
|
- },
|
|
|
|
|
|
+ // searchcontent:{
|
|
|
|
+ // handler(oldValue, newValue) {
|
|
|
|
+ // this.keyword=oldValue
|
|
|
|
+ // // if (val != '') {
|
|
|
|
+ // // this.place = val
|
|
|
|
+ // // }
|
|
|
|
+ // },
|
|
|
|
+ // deep:true,
|
|
|
|
+ // immediate:true,
|
|
|
|
+ // },
|
|
|
|
+ // keyword:{
|
|
|
|
+ // handler(oldValue, newValue) {
|
|
|
|
+ // this.keyword2=oldValue
|
|
|
|
+ // console.log(oldValue, newValue,11111111)
|
|
|
|
+ // // if (val != '') {
|
|
|
|
+ // // this.place = val
|
|
|
|
+ // // }
|
|
|
|
+ // },
|
|
|
|
+ // deep:true,
|
|
|
|
+ // immediate:true,
|
|
|
|
+ // },
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
cancel() {
|
|
cancel() {
|
|
this.$emit('searchVal', '')
|
|
this.$emit('searchVal', '')
|
|
},
|
|
},
|
|
init() {
|
|
init() {
|
|
|
|
+ this.$refs.msearch.getFocus()
|
|
|
|
+ console.log(this.$refs.msearch)
|
|
this.loadDefaultKeyword();
|
|
this.loadDefaultKeyword();
|
|
this.loadOldKeyword();
|
|
this.loadOldKeyword();
|
|
this.loadHotKeyword();
|
|
this.loadHotKeyword();
|