邓洁 : 修改搜索框bug
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<view class="input-and-swiper-root">
|
||||
<view class="search-box" v-if="type!=='0'">
|
||||
<view class="search-box-input">
|
||||
<u-input placeholder="请输入店铺名称进行搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="changeInput">
|
||||
<u-input v-model="keyword" placeholder="请输入店铺名称进行搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @clear="handleClear" clearable @change="changeInput">
|
||||
<template slot="suffix">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<u-icon name="map-fill" color="#329866" size="22"></u-icon>
|
||||
@@ -36,26 +36,46 @@
|
||||
type: {
|
||||
type: String,
|
||||
default: '1'
|
||||
},
|
||||
refresh: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
position: uni.getStorageSync('city') + uni.getStorageSync('district').slice(0, 2),
|
||||
currentNum: ''
|
||||
currentNum: '',
|
||||
keyword:''
|
||||
};
|
||||
},
|
||||
options: {
|
||||
styleIsolation: 'shared', // 解除样式隔离
|
||||
},
|
||||
watch: {
|
||||
refresh(newVal, oldVal) {
|
||||
console.log('newVal',newVal);
|
||||
if(newVal){
|
||||
this.keyword=''
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (this.type !== '0') {
|
||||
this.open()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
changeInput(e){
|
||||
this.$emit('getQueryInfo',e)
|
||||
},
|
||||
handleClear(e){
|
||||
|
||||
console.log('handleClear',e);
|
||||
},
|
||||
open() {
|
||||
if (!uni.getStorageSync('city') && !uni.getStorageSync('district')) {
|
||||
uni.getSystemInfo({
|
||||
|
||||
Reference in New Issue
Block a user