the problem encountered now: in a form, there are An and B select drop-down boxes. When A drop-down box contains a specific value, B drop-down box is required, otherwise it is optional. I tried to write this in rules:
rules:{
overseasStudents:[{ required:!this.overseasStatus,message:"",trigger:"blur" }]
}
realize the value of required
by manipulating the Boolean value of required
, but no, I just want to recognize the initialization value. If the initialization is true, it is required, and later changes will not respond. (the version of ElementUI I use is 1.4)