I have a simple form asking for username and password. Those are my Vue.js data
data: {
app_images:[
{ app: '../assets/img/logos/logo.png' }
],
json_repository:[],
user: {
username: null,
password: null
},
submitted: null
}
Username and password field in the form are bound to user.username and user.password. Pressing a sign in button execute doLogin function
methods: {
doLogin: function() {
this.submitted = this.user;
},
Problem is that from this moment on, every edit in the form also change the value in "submitted" field and i want to avoid that