0👍
This is a typescript
error. You can explicitly
give it an any
type. Or give it an actual type. Or change your typescript
settings to allow implicit any
.
const handleFormSubmit = (event:any) => {
event.preventDefault();
const email = event.target.elements.email?.value;
const password = event.target.elements.password?.value;
console.log(email, password);
};
- [Vuejs]-VueJS and dynamic reload ChartJS when screen resize
- [Vuejs]-Webpack: can't build correct font paths
-1👍
I tried casting the event.target as HTMLInputElement
as suggested here, but I still got complaints for missing parameters. I ended up doing this in the end
async function newPlayer(event: Event) {
event.preventDefault();
const form = event.target as HTMLFormElement;
const formData = new FormData(form);
console.log(formData.get("name"))
}
- [Vuejs]-Cannot use my compiled single file component
- [Vuejs]-Adding a preprocessor language to the style portion of a vueify component causes build to fail without error
Source:stackexchange.com