//dom区
   <div v-for="(form,index) in formList" :key="index">
           <fm-generate-form
             :data="form"
             :remote="remoteFuncs"
             :value="editData"
             :remote-option="dynamicData"
             ref="generateForm"
           >
           </fm-generate-form>
           <el-button type="primary" @click="handleSubmit(index)">下一步</el-button>
       </div>


//方法区

   methods: {
            //todo 提交表单
            handleSubmit (index) {
                this.$refs.generateForm[index].getData().then(data => {
                    // Data verification succeeded
                    alert(JSON.stringify(data))
                }).catch(e => {
                    // Data verification failed
                })
            },

}

加上索引

Logo

前往低代码交流专区

更多推荐