watch: {
'form.typeId': {
handler: function() {
if (!this.form.typeId) {
this.form.typeName = null
return
}
this.form.typeName = this.projectTypeOptions.find(item => { return item.key === this.form.typeId }).display_name
}
}
}
转自:https://www.cnblogs.com/asker009/p/13064013.html