linwenxin 2 ay önce
ebeveyn
işleme
3282ff822f
1 değiştirilmiş dosya ile 16 ekleme ve 9 silme
  1. 16 9
      src/views/mallManagement/setActivity/answer.vue

+ 16 - 9
src/views/mallManagement/setActivity/answer.vue

@@ -238,7 +238,7 @@ export default {
                 formItemAttributes: {
                   label: '限制数量',
                   prop: 'answer',
-                  rules: []
+                  rules: [{ required: true, message: '请填写', trigger: 'blur' }]
                 },
                 render: (h, { props, onInput }) => {
                   var { value } = props
@@ -248,14 +248,21 @@ export default {
                         return (
                           <div>
                             <div>
-                              <el-input
-                                type="number"
-                                placeholder="请输入限制长度"
-                                value={this.formData.answer[index].option_limit}
-                                onInput={val => {
-                                  this.formData.answer[index].option_limit = val
-                                }}
-                              ></el-input>
+                              <el-form-item
+                                label=""
+                                lebel-width="0px"
+                                prop={`answer.${index}.option_limit`}
+                                rules={[{ required: true, message: '请填写', trigger: 'blur' }]}
+                              >
+                                <el-input
+                                  type="number"
+                                  placeholder="请输入限制长度"
+                                  value={this.formData.answer[index].option_limit}
+                                  onInput={val => {
+                                    this.formData.answer[index].option_limit = val
+                                  }}
+                                ></el-input>
+                              </el-form-item>
                             </div>
                           </div>
                         )