props: ["isAdd", "oldusername"], data() { return { username: "", password: "", dialogFormVisible: false }; }, watch: { oldusername: function (newVal, oldVal) { // console.log(newVal); this.username = newVal; } }, watch中不要用箭头函数!!!