panhui 4 лет назад
Родитель
Сommit
1086da6070
1 измененных файлов с 32 добавлено и 2 удалено
  1. 32 2
      src/main/comos/src/views/asset/Consignment.vue

+ 32 - 2
src/main/comos/src/views/asset/Consignment.vue

@@ -7,7 +7,22 @@
             </div>
             <div class="border border1"></div>
             <div class="content">
-                <van-field type="number" label="寄售价格(元)" placeholder="请设置寄售价格" v-model="price" />
+                <van-field label="寄售价格(元)">
+                    <template #input>
+                        <van-stepper
+                            v-model="price"
+                            min="0"
+                            max="100000"
+                            input-width="150"
+                            :show-plus="false"
+                            :show-minus="false"
+                            placeholder="请设置寄售价格"
+                            :decimal-length="2"
+                            :default-value="''"
+                            allow-empty
+                        />
+                    </template>
+                </van-field>
             </div>
             <div class="border"></div>
             <div class="input">
@@ -87,7 +102,11 @@ export default {
                 });
         },
         submit() {
-            if (this.price != '') {
+            if (Number(this.price)) {
+                this.$toast.loading({
+                    message: '加载中...',
+                    forbidClick: true
+                });
                 this.$http
                     .post('/user/verifyTradeCode', {
                         tradeCode: this.password
@@ -304,4 +323,15 @@ export default {
         }
     }
 }
+
+/deep/.van-stepper {
+    height: 24px;
+    .van-stepper__input {
+        margin: 0 0;
+        background-color: #fff;
+        text-align: left;
+        height: 24px;
+        line-height: 24px;
+    }
+}
 </style>