Mini Program mpvue submitted a form to obtain formId, Do not have handler

<template>
    <form class="wrapper" bindsubmit="testSubmit" report-submit="true">
        <button formType="submit"></button>
    </form>
</template>    
export default {
    methods:{
        testSubmit(e){
            console.log(e)
        }
    }
}

whether testSubmit is placed in methods or in the same level of create,onLoad, it prompts Do not have testSubmit handler

Mar.07,2021

bindsubmit = > @ submit


that's not how it works. You can use vue.

.

you should deal with button click events


although the code is finally compiled into Mini Program's language with mpvue, the syntax is still different


Hello, let me ask you a question. The formID value I got is "the formId is a mock one". This is not right. What kind of value did you get? Thank you

Menu