@@ -0,0 +1,32 @@
+let count = null;
+Component({
+ properties: {
+ inputSharch: {
+ type: Function
+ }
+ },
+ data: {
+ isClear: false
+ options: {
+ addGlobalClass: true,
+ methods: {
+ textChange(e) {
+ clearTimeout(count);
+ if (this.data.isClear) {
+ this.triggerEvent("inputSharch");
+ this.setData({
+ })
+ return;
+ e.type == "change" ? count = setTimeout(() => this.triggerEvent("inputSharch", e.detail.trim()), 1000) : this.triggerEvent("inputSharch", e.detail.trim());
+ onClear() {
+ isClear: true
+})
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
@@ -0,0 +1,12 @@
+.right {
+ position: relative;
+ width: 40px;
+ height: 100%;
+ text-align: center;
+ line-height: 100%;
+ color: #ffffff;
+ padding-top: 6rpx;
+ text{
+ font-size: 46rpx;
@@ -0,0 +1,5 @@
+<van-search value="{{ value }}" shape="round" bind:change='textChange' bind:clear='onClear' bind:search='textChange' background="var(--bgColor)" use-action-slot placeholder="请输入搜索关键词">
+ <view slot='action' class="right">
+ <text class="iconfont icon-paixu" />
+ </view>
+</van-search>