去除打印,抄表路线支持所有园区,支持部分选择框清除内容

This commit is contained in:
2025-11-13 17:10:33 +08:00
parent d7d5366230
commit edfd386e1b
16 changed files with 100 additions and 28 deletions

View File

@@ -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")
}
}
})

View File

@@ -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>