Commit 5d6ab129 authored by 纪泽龙's avatar 纪泽龙

访客添加考试题目的时候都要有表单验证

parent 5e599d6e
...@@ -50,15 +50,11 @@ ...@@ -50,15 +50,11 @@
:label="'选项' + (index + 1)" :label="'选项' + (index + 1)"
:key="question.key" :key="question.key"
:prop="'questions.' + index + '.value'" :prop="'questions.' + index + '.value'"
:rules=" :rules="{
index === 0 required: true,
? { message: '第一项不能为空不能为空',
required: true, trigger: 'blur',
message: '第一项不能为空不能为空', }"
trigger: 'blur',
}
: {}
"
> >
<div class="add-select flex"> <div class="add-select flex">
<el-input <el-input
...@@ -128,7 +124,10 @@ ...@@ -128,7 +124,10 @@
</div> </div>
</el-form-item> --> </el-form-item> -->
<div style="padding-left: 55px" v-if="form.topicType != 3"> <div style="padding-left: 55px" v-if="form.topicType != 3">
<el-button size="mini" type="primary" @click.prevent="add(addValue)" <el-button
size="mini"
style="background: #0bab0c; color: #fff; border: 1px solid #0bab0c"
@click.prevent="add(addValue)"
>新增选项</el-button >新增选项</el-button
> >
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment