去除打印,抄表路线支持所有园区,支持部分选择框清除内容
This commit is contained in:
@@ -20,6 +20,7 @@ Component({
|
||||
hideBorder: Boolean,
|
||||
required: Boolean,
|
||||
transparent: Boolean,
|
||||
allowClear: Boolean,
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -42,12 +43,14 @@ Component({
|
||||
},
|
||||
onChangeText(e) {
|
||||
this.setData({ text: e.detail });
|
||||
console.log("----------")
|
||||
this.triggerEvent("changeText", e.detail)
|
||||
},
|
||||
onSearchKeyword() {
|
||||
this.triggerEvent("searchKeyword", this.data.keyword)
|
||||
this.setData({ keyword: "" })
|
||||
},
|
||||
onClear() {
|
||||
this.triggerEvent("clear")
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -4,7 +4,7 @@
|
||||
<view class="content" bind:tap="clickTime" bind:tap="onSearch" style="background-color: {{transparent ? 'transparent' : 'white'}};">
|
||||
<view class="text" wx:if="{{!text}}" style="color: #ccc;"> {{placeholder}} </view>
|
||||
<view class="text" wx:else> {{text}} </view>
|
||||
<!-- <van-icon name="close" custom-style="margin-right: 16rpx" /> -->
|
||||
<van-icon name="close" custom-style="margin-right: 16rpx" wx:if="{{allowClear}}" catch:tap="onClear" />
|
||||
<van-icon name="arrow-down" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user