Quellcode durchsuchen

表单长度限制

youyawu vor 4 Jahren
Ursprung
Commit
f86ed0ff72
1 geänderte Dateien mit 9 neuen und 5 gelöschten Zeilen
  1. 9 5
      src/views/info/add.vue

+ 9 - 5
src/views/info/add.vue

@@ -17,31 +17,35 @@
             :label="`${$t('page.views.info.add.purchaseTitle')}`"
             prop="purchaseTitle"
           >
-            <el-input v-model="form.purchaseTitle"></el-input>
+            <el-input v-model="form.purchaseTitle" maxlength="100"></el-input>
           </el-form-item>
           <el-form-item
             :label="`${$t('page.views.info.add.summaryOfNeeds')}:`"
             prop="summaryOfNeeds"
           >
-            <el-input v-model="form.summaryOfNeeds"></el-input>
+            <el-input v-model="form.summaryOfNeeds" maxlength="1000"></el-input>
           </el-form-item>
           <el-form-item
             :label="`${$t('page.views.info.add.demandDetails')}:`"
             prop="demandDetails"
           >
-            <el-input v-model="form.demandDetails" type="textarea"></el-input>
+            <el-input
+              v-model="form.demandDetails"
+              type="textarea"
+              maxlength="2000"
+            ></el-input>
           </el-form-item>
           <el-form-item
             :label="`${$t('page.views.info.add.contacts')}:`"
             prop="contacts"
           >
-            <el-input v-model="form.contacts"></el-input>
+            <el-input v-model="form.contacts" maxlength="20"></el-input>
           </el-form-item>
           <el-form-item
             :label="`${$t('page.views.info.add.contactNumber')}:`"
             prop="contactNumber"
           >
-            <el-input v-model="form.contactNumber"></el-input>
+            <el-input v-model="form.contactNumber" maxlength="12"></el-input>
           </el-form-item>
         </el-form>
         <div class="line"></div>