Browse Source

添加房间助力清除按钮

tangning 3 years ago
parent
commit
0ae036c7cb
3 changed files with 15 additions and 0 deletions
  1. 6 0
      pages/room/add.js
  2. 2 0
      pages/room/add.wxml
  3. 7 0
      pages/room/add.wxss

+ 6 - 0
pages/room/add.js

@@ -243,6 +243,12 @@ Page({
       this.toReport()
       this.toReport()
     }
     }
   },
   },
+  assistantClear(){
+    this.setData({
+      'detail.assistant': '',
+      'detail.assistantUserId': '',
+    })
+  },
   toReport: function(e) {
   toReport: function(e) {
     return wx.showToast({
     return wx.showToast({
       title: '暂无数据',
       title: '暂无数据',

+ 2 - 0
pages/room/add.wxml

@@ -55,6 +55,8 @@
           <text style="margin-right:30rpx;">选择助理</text>
           <text style="margin-right:30rpx;">选择助理</text>
           <text class="value {{ detail.assistant ? '' : 'tipsClass'}}">{{detail.assistant || '请选择助理'}}</text>
           <text class="value {{ detail.assistant ? '' : 'tipsClass'}}">{{detail.assistant || '请选择助理'}}</text>
         </view>
         </view>
+        
+        <image src="/static/images/clear_input.png" catchtap="assistantClear" wx:if="{{detail.assistant}}" class="clear"></image>
         <image src="/static/images/go.png" class="go"></image>
         <image src="/static/images/go.png" class="go"></image>
       </view>
       </view>
     </picker>
     </picker>

+ 7 - 0
pages/room/add.wxss

@@ -86,6 +86,13 @@
   height: 20rpx;
   height: 20rpx;
 }
 }
 
 
+.order-list-v .navigator .clear {
+  flex: 0 0 auto;
+  width: 40rpx;
+  height: 40rpx;
+  margin-right:30rpx
+}
+
 .order-list-v .navigator view {
 .order-list-v .navigator view {
   margin-left: 14rpx;
   margin-left: 14rpx;
   font-size: 30rpx;
   font-size: 30rpx;