You have to add a ref to the HTML form
<form ref="form">
<input name="field" v-model="value">
</form>
Then inside your methods you can use the reference to submit the form
methods: {
send: function(){
this.$refs.form.submit()
}
}
and you can call the send method wherever your want.
You can learn more about ref attribute here
https://v3.vuejs.org/guide/component-template-refs.html
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…