//a.vue页面调用
<user-detail ref="detailRef" :detail-visible="detailVisible" @changeShow="showDetail" />
//引入components: {UserDetail}
import UserDetail from './detail.vue'
handleDetail(id) { this.detailVisible = true this.$nextTick(() => { this.$refs.detailRef.dataInitialization(id) }) },
detail.vue页面接收
dataInitialization(id) { this.userId = id getEmployeeByEid({ eid: this.userId }).then(res => { this.form = res.data }) }