<el-form-item label="隨機區(qū)間" prop="randowMin" v-if="infoData.type !== 4 && infoData.isRandow === 1">
<div class="input_item">
<div class="input_item_value input_item_value2">
<el-input v-model="infoData.randowMin" placeholder="請輸入內(nèi)容"></el-input>
</div>
<span>-</span>
<div class="input_item_value input_item_value2">
<el-input v-model="infoData.randowMax" placeholder="請輸入內(nèi)容"></el-input>
</div>
</div>
</el-form-item>
data() {
const valTowValue = (rule, value, callback) => {
if (value == "" || value == undefined || value == null) {
callback(new Error("請輸入隨機區(qū)間"));
} else {
if (!this.infoData.randowMax) {
callback(new Error("請輸入最大值"));
} else if (!this.infoData.randowMin) {
callback(new Error("請輸入最小值"));
} else if (Number(this.infoData.randowMin) >= Number(this.infoData.randowMax)) {
callback(new Error("請輸入正確的范圍值"));
} else {
callback();
}
}
};
}
rules: {
randowMin: [{ validator: valTowValue, trigger: "blur" }],
},