You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
1.3 KiB
77 lines
1.3 KiB
11 months ago
|
<template>
|
||
|
<view class="content">
|
||
|
<view class="screen-input">
|
||
|
<u-search
|
||
|
:show-action='false'
|
||
|
:bg-color="search.bgBolor ||'white'"
|
||
|
:border-color="search.borderColor ||'#E4E4E4'"
|
||
|
:shape="search.shape ||'square'"
|
||
|
:height="search.height || 80"
|
||
|
:placeholder="search.placeholder ||'请输入设备编码或设备名称'"
|
||
|
:clearabled="true">
|
||
|
</u-search>
|
||
|
</view>
|
||
|
<view class="screen-btn" @click="screen" v-if="isShowScreen">
|
||
|
<image src="../../static/icon/screen.png" mode="widthFix"></image>
|
||
|
<view>筛选</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
props: {
|
||
|
searchData:{
|
||
|
type: Object,
|
||
|
default:()=>{return {}},
|
||
|
require:false
|
||
|
},
|
||
|
isShowScreen: {
|
||
|
type: Boolean,
|
||
|
default:()=>{return true},
|
||
|
require:false
|
||
|
},
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
keyWord: '',
|
||
|
}
|
||
|
},
|
||
|
methods: {
|
||
|
// 搜索
|
||
|
search() {
|
||
|
this.$emit('search', this.keyWord)
|
||
|
},
|
||
|
// 筛选
|
||
|
screen() {
|
||
|
this.$emit('screen')
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss" scoped>
|
||
|
.content {
|
||
|
padding: 20rpx;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
background: white;
|
||
|
|
||
|
.screen-input {
|
||
|
flex: 1;
|
||
|
width: 0px;
|
||
|
}
|
||
|
|
||
|
.screen-btn {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
margin-left:20rpx;
|
||
|
|
||
|
image {
|
||
|
width: 30rpx;
|
||
|
margin-right: 6rpx;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
</style>
|