父组件:
<template> <Survey-form v-on:tranApi = "updataApi"></Survey-form> <!-- 通过 tranApi 接受参数。。。--> </template> <script> methods:{ updataApi:function(title,id,re_id,class_id,show1,a){ //title,id,re_id,class_id,show1,a 为子组件传来的参数
this.title = title this.id = id this.user_temp_id = re_id this.class_id = class_id this.show1 = show1 this.a = a }, </script>
子组件
<script> vm.$emit("tranApi",vm.Title,vm.su_id,vm.re_id,vm.class_id,vm.show1,vm.a) //通过 TranApi 传递参数 vm.Title,vm.su_id,vm.re_id,vm.class_id,vm.show1,vm.a
</script>