主页面的模板层
....
<template>
<el-table>
<el-table-column label="操作" align="center" min-width="2">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleEdit(scope.row)">修改</el-button>
</template>
</el-table-column>
</el-table>
<update-modal ref="UpdateModalForm" @ok="modalFormOk" />
</<template>
.......
主页面的引入
import UpdateModal from './modules/UpdateModal'
主页面注册
components: { UpdateModal }
主页面的方法
.....
handleEdit: function(record) {
this.$refs.UpdateModalForm.edit(record)
this.$refs.UpdateModalForm.title = '编辑'
this.$refs.UpdateModalForm.disableSubmit = false