ソースを参照

添加金额1万元提示

martin.ma 4 年 前
コミット
0e802f91fb
2 ファイル変更8 行追加2 行削除
  1. 1 2
      components/works/editor.vue
  2. 7 0
      pages/frontend/skill/create.vue

+ 1 - 2
components/works/editor.vue

@@ -425,11 +425,10 @@ import {
         this.$message.info('先保存项目作品,才能上传作品资源');
       },
       priceChange(e) {
-        if(e >= 10000) {
+        if(e > 10000) {
           this.price = 10000;
           this.$toast("最高金额10000元")
         }
-        // console.log(e)
       },
     },
   };

+ 7 - 0
pages/frontend/skill/create.vue

@@ -33,6 +33,7 @@
                             :class="{ 'is-error': priceError }"
                             type="number"
                             placeholder="请输入价格"
+                            @input="handlePriceInput"
                             v-model="price"></el-input>
                         <span class="yuan">元</span>
                     </div>
@@ -400,6 +401,12 @@ export default {
                 return
             }
             this._publishSkillData('pcreate')
+        },
+        handlePriceInput(e){
+          if(e > 10000){
+            this.price = 10000
+            this.$toast("最高金额10000元")
+          }
         }
     }
 }