|
@@ -1,8 +1,10 @@
|
|
|
<template>
|
|
|
<view class="My_search" :style="{ background: bgColor }">
|
|
|
<slot name="left" />
|
|
|
- <u-search v-model="value" :focus="focus" :showAction="false" @search="onSearch" @custom="onSearch" @clear="onSearch"
|
|
|
- :placeholder="placeholder" />
|
|
|
+ <u-search v-if="ispad" v-model="value" :focus="focus" :showAction="false" height="60" @search="onSearch"
|
|
|
+ @custom="onSearch" @clear="onSearch" :placeholder="placeholder" />
|
|
|
+ <u-search v-else v-model="value" :focus="focus" :showAction="false" @search="onSearch" @custom="onSearch"
|
|
|
+ @clear="onSearch" :placeholder="placeholder" />
|
|
|
<view v-if="isFilter" @click="startFilter" class="filtrate" hover-class="navigator-hover">
|
|
|
<text class="iconfont icon-shaixuan" />筛选
|
|
|
</view>
|
|
@@ -47,9 +49,18 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- value: ""
|
|
|
+ value: "",
|
|
|
+ ispad: false
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ let that = this;
|
|
|
+ uni.getSystemInfo({
|
|
|
+ success: ({ deviceType }) => that.ispad = deviceType == "pad"
|
|
|
+ })
|
|
|
+ // #endif
|
|
|
+ },
|
|
|
methods: {
|
|
|
onSearch(value) {
|
|
|
this.$emit("startSearch", value)
|
|
@@ -92,8 +103,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /deep/ .u-search .u-search__content {
|
|
|
- height: 29px !important;
|
|
|
+ /deep/ .u-search__content {
|
|
|
+ height: 30px !important;
|
|
|
}
|
|
|
|
|
|
/deep/ .u-icon__icon {
|