父组件
<maintenance-super :show="{'modalSuper':modalSuper,'myData':myData}" @on-close="closeModal" ></maintenance-super>

 

父组件
<maintenance-super :show="{'modalSuper':modalSuper,'myData':myData}" @on-close="closeModal" ></maintenance-super>
 export default {
components: { MaintenanceSuper},
data() {
return {
value:{
telephone:null,
},
myData: {
pageNum: 1,
pageSize: 10,
total: 0,
userModel: {
id: null,
account: null,
director: null, //负责人
}
},
}

子组件

<template>
<div>
<!-- =================== 管理员:表格 =================================== -->
<Modal :title="title" v-model="modalSuper" width="800" :closable="false" @on-hide="hide">
<Table border :columns="superColumns" :data="superData">
<template slot-scope="{ row, index }" slot="action">
<Button type="primary" size="small" @click="restPassWordInfo(row,index)">重置密码</Button>
<Button type="error" size="small" @click="disableAccount(row,index)">警用</Button>
</template>
</Table>
<!-- ======================= 分页 ==================================== -->
<Page
:total="superForm.total"
:current="superForm.pageNum"
:page-size="superForm.pageSize"
@on-change="handlePageSuper"
@on-page-size-change="handlePageSizeSuper"
class="tablePage"
/> <div style="text-align: right;margin-top: 10px;">
<Button @click="handleResetSuper('searchData')">取消</Button>
<Button icon="md-add" type="primary" @click="toSuperModalAdd">新建管理员账户</Button>
</div>
<div slot="footer"></div>
</Modal>
</div>
</template>
props:['show','myData'],
  watch: {
show(validate) {
console.log(validate,'1')
if (validate.modalSuper == true) {
this.modalSuper = validate.modalSuper;
this.getTableDataPage();
}
}

传值给父,弹框关闭

    handleResetSuper(name) {
// this.modelSuperAdd = false;
// this.$refs[name].resetFields();
this.modalSuper = false;
this.$emit("on-close", false);
},
onClose() {
this.$emit("on-close", false);
},

父组件接收到子组件的传值

  methods: {
closeModal(newVal) {
this.modalSuper = newVal;
}
}

 

最新文章

  1. 第五次团队作业——第一次项目冲刺——Alpha版本
  2. 从零自学Hadoop(15):Hive表操作
  3. [.NET]二维码生成
  4. 一个多重阴影的DIV框框
  5. 移动安全初探:窃取微信聊天记录、Hacking Android with Metasploit
  6. api将一统江湖,再无app
  7. java的基本程序设计之个人总结要点
  8. 64位WIN7下安装MPICH2
  9. [.net 面向对象编程基础] (18) 泛型
  10. UIView 的属性opaque详解
  11. mysql重点--执行计划
  12. eclipse下的Tomcat安装与web项目 搭建
  13. 复习知识点:XML解析数据,JOSN解析数据,GET请求数据,POST请求数据
  14. Drupal 7 模 .info 文件描述
  15. vue的ajax请求之axios
  16. gitlab 存储仓库目录设置及数据迁移
  17. djang-rest-framework学习-day1
  18. sql 根据另一个表的数据更新当前表
  19. 原理分析之一:从JDBC到Mybatis
  20. less使用总结

热门文章

  1. 极*Java速成教程 - (8)
  2. 通过metaclass实现精简的ORM框架
  3. RabbitMQ事务和Confirm发送方消息确认
  4. 剑指offer-树的子结构-python
  5. SpringMVC_放行静态资源
  6. python中的@property
  7. c/c++基础篇之数据类型转换
  8. 理解长短期记忆网络(LSTM NetWorks)
  9. 64bit机器编译32bit汇编
  10. [每日一学]apache camel|XSLT|SAXON