vue methods cannot get data value
export default {
name: "sysAdd",
data() {
return {
form: {
name: "",
region: "",
date1: "",
date2: "",
delivery: false,
type: [],
resource: "",
desc: ""
},
formLabelWidth: "120px",
visible:false
};
},
props:["show"],
watch:{
show(){
this.visible = this.show;
}
},
methods:{
save(){
console.info(this.from,this.formLabelWidth,this.$options.data().form);
saveAdd(this.from).then(response => {
console.info("222"+ response.data);
})
},
close_dialog_event(){
//show
this.$emit("dialog_event");
}
}
}