示例:
<el-form :rules="rules" >
<el-form-item label="审核备注" :label-width="formLabelWidth" prop="priceRemark" :rules="this.dialogForm.priceStatus!=3?rules.priceRemark:[{ required: false, message: '请填写审核备注', trigger: 'blur' }]">
<el-input type="textarea" v-model="dialogForm.priceRemark" :disabled="!dialogSendData.isAdd" ></el-input>
</el-form-item>
</el-form>
data中的relus
rules: {
priceRemark: [
{ required: true, message: '请填写审核备注', trigger: 'blur' }
]
}
网友评论