|
|
|
@ -45,7 +45,11 @@ |
|
|
|
<view class="box"> |
|
|
|
<view class="lf-m-b-20 lf-row-between"> |
|
|
|
<view class="lf-font-32 lf-color-black lf-font-bold">报价明细</view> |
|
|
|
<input placeholder="搜索物资" confirm-type="search" :value="searchValue" @input="inputChange" @confirm="inputConfirm" style="background: pink;" /> |
|
|
|
<view class="flex lf-row-between"> |
|
|
|
<u-icon name="search" class="search-icon" v-if="show_icon"></u-icon> |
|
|
|
<input placeholder="搜索物资" confirm-type="search" @focus="hideIcon()" class="search-self" :value="searchValue" @input="inputChange" @confirm="inputConfirm" /> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
<wyb-table :first-line-fixed="true" |
|
|
|
contentBgColor="#eef6fe" |
|
|
|
@ -78,6 +82,7 @@ |
|
|
|
}, |
|
|
|
data(){ |
|
|
|
return { |
|
|
|
show_icon: true, |
|
|
|
headers: [{ |
|
|
|
label: '物资名称', |
|
|
|
key: 'name', |
|
|
|
@ -173,6 +178,11 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
hideIcon() { |
|
|
|
if(this.searchValue != '') { |
|
|
|
this.show_icon = false; |
|
|
|
} |
|
|
|
}, |
|
|
|
// 搜索input值被改变 |
|
|
|
inputChange(event){ |
|
|
|
if(timer){ |
|
|
|
@ -182,6 +192,11 @@ |
|
|
|
timer = setTimeout(() => { |
|
|
|
this.searchValue = event.detail.value; |
|
|
|
}, 1000); |
|
|
|
if(event.detail.value == '') { |
|
|
|
this.show_icon = true; |
|
|
|
}else { |
|
|
|
this.show_icon = false; |
|
|
|
} |
|
|
|
}, |
|
|
|
// 搜索按下回车 |
|
|
|
inputConfirm(event){ |
|
|
|
@ -455,6 +470,22 @@ |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style lang="scss" scoped="scoped"> |
|
|
|
.search-icon { |
|
|
|
position: relative; |
|
|
|
left: 50rpx; |
|
|
|
color: #777; |
|
|
|
} |
|
|
|
.search-self { |
|
|
|
background: rgb(228,228,228); |
|
|
|
padding: 10rpx 0 10rpx 20rpx; |
|
|
|
border-radius: 40rpx; |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
.search-self .uni-input-placeholder { |
|
|
|
margin-left: 40rpx; |
|
|
|
color: #777; |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
.lf-m-t-5{ |
|
|
|
margin-top: 5rpx; |
|
|
|
} |
|
|
|
|