邓洁:搜索框吸顶

This commit is contained in:
邓洁
2023-11-27 23:47:51 +08:00
parent 096440bbfc
commit 93d2bb04c7
9 changed files with 59 additions and 80 deletions

View File

@@ -2,8 +2,9 @@
<view class="input-and-swiper-root">
<view class="search-box" v-if="type!=='0'">
<view class="search-box-input">
<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">
<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>
@@ -46,7 +47,7 @@
return {
position: uni.getStorageSync('city') + uni.getStorageSync('district').slice(0, 2),
currentNum: '',
keyword:''
keyword: ''
};
},
options: {
@@ -54,9 +55,9 @@
},
watch: {
refresh(newVal, oldVal) {
console.log('newVal',newVal);
if(newVal){
this.keyword=''
console.log('newVal', newVal);
if (newVal) {
this.keyword = ''
}
}
},
@@ -66,15 +67,15 @@
}
},
created() {
},
methods: {
changeInput(e){
this.$emit('getQueryInfo',e)
changeInput(e) {
this.$emit('getQueryInfo', e)
},
handleClear(e){
console.log('handleClear',e);
handleClear(e) {
console.log('handleClear', e);
},
open() {
if (!uni.getStorageSync('city') && !uni.getStorageSync('district')) {