vue页面点击按钮拉起弹窗
vue页面点击按钮拉起弹窗// 1、使用插槽slot-scope="scope"<template slot-scope="scope">//父传子将id传入拉起得子页面detailHandle(scope.row.id)//通过点击时间拉起弹窗,并将数据传给子级<el-button @click="detailHandle(scope.row.id)" type="text"
·
vue页面点击按钮拉起弹窗
// 1、使用插槽 slot-scope="scope"
<template slot-scope="scope">
//父传子将id传入拉起得子页面detailHandle(scope.row.id)
//通过点击时间拉起弹窗,并将数据传给子级
<el-button @click="detailHandle(scope.row.id)" type="text" size="small">拉起页面</el-button>
//<!-- 融资申请详情对话框 (被拉起来的弹窗)-->
//<!--子传父的方法: @refreshDataList="getDataList"-->
//<!--引入的弹窗组件: ref="detail" -->
<detail v-if="detailVisiable" ref="detail" @refreshDataList="getDataList" :pwidth="dWidth"></detail>
</template>
export default {
import detail from '../financingApply/financingApply-detail';
name: "applyAndStatistical",
data() {
return {
detailVisiable:false, //设置默认弹窗为隐藏
}
}
methods: {
detailHandle(id){
//设置弹窗的显示隐藏
this.detailVisiable=true;
//父传子
this.$nextTick(() => {
this.$refs.detail.init(id);
});
},
}
}
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)