:
<el-form-item label=":" :label-width="formLabelWidth" prop="installed_path">
<el-input v-if="editMode" class="edit-input" size="small" v-model.trim="installed_path" :placeholder="pathPlaceholder"></el-input>
<span v-else>{{get_content.installed_path}}</span>
</el-form-item>
rules:
installed_path: [
{ validator: validateInstalledPath, trigger: "blur" }
],
validator:
var validateInstalledPath = (rule, value, callback) => {
console.log("value",value)
console.log("rule.field",rule.field)
console.log("this.installed_path", this.installed_path)
every time after typing in the input box, the value read by validator is always the old value, not the value you just filled in. Check that this.installed_path is the value you just filled in