1、自定义页脚
首先弃用“on-ok='ok'”,"on-cal='cancel'"
<!-- 对话框页脚 -->
<div slot="footer" class="create">
<i-button class="ivu-btn-primary ivu-btn-large" @click="onKey">一键生成</i-button>
<div class="createRight">
<i-button @click="cancel" >取消</i-button>
<i-button @click="ok" class="ivu-btn-primary ivu-btn-large" >生成报告</i-button>
</div>
</div>
关闭弹窗事件
<Modal v-model="modal.show" :title="modal.title" width="960" :mask-closable="false" ></Modal>
//在data中设置
modal:{
show:false,
},
//在methods中
cancel(){
this.modal.show=false;
},