瀏覽代碼

[fix] input

wenliming 2 年之前
父節點
當前提交
4ab8413393
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/view/iframe/publish/give-dialog.vue

+ 2 - 2
src/view/iframe/publish/give-dialog.vue

@@ -1563,7 +1563,7 @@ const onCountInput = () => {
     if (val == 0) {
         val = "";
     }
-    val = val.replace(/^\D*(\d*(?:\.\d{0,18})?).*$/g, '$1');
+    val = val.replace(/[^\d]/g, "");
 
     if(val > maxCount) {
         val = maxCount
@@ -1689,7 +1689,7 @@ const checkTreasureAmountRange = (isInTemplate) => {
 
             const isAvgForbidden = treasureFormData.fansUnitAmount !== '' && currentLuckDropConfig?.minAvgUsdAmount ? treasureFormData.fansUnitAmount < minAmount || treasureFormData.fansUnitAmount < currentLuckDropConfig?.minAvgUsdAmount : false;
 
-            forbiddenText = isAmountForbidden || isAvgForbidden ? txt : '';
+            forbiddenText = isAmountForbidden && isAvgForbidden ? txt : '';
         }
     }
     return forbiddenText;