In plain js we could write:
data() {
return {
form: {
name: '',
password: ''
}
}
}
But how to achieve this using typescript (vue-property-decorator)? I've read this should be implemented using interfaces, like that:
interface Form {
name: string
password: string
}
@Component
export default class Login extends Vue {
// how to use interface here?
}
I'm using this as v-model on input:
<input v-model="form.email">