element Dialog子组件弹框

1 篇文章 0 订阅
1 篇文章 0 订阅
//父组件
<div> 
  <tipDialog :DialogTipShow="DialogTipShow" @closeDialog="closeDialog"></tipDialog>
</div>
import tipDialog from '../components/tipDialog'
 export default {
  components: {
      tipDialog
    },
 data() {
   return {
     DialogTipShow:false
   }
},
methods: {
closeDialog() {
   this.DialogTipShow = false
   }
}
//子组件
<template>
  <div>
    <el-dialog
      title=""
      :visible.sync="DialogTip"
      width="30%"
      center
    >
     <div>
         <span>按照GB50014-2006《室外排水设计规范》,重力流污水管道应按非满流计算,其最大设计充满度, 应按下表取值:</span>
         <table class="formData"  width="100%" border="0" cellspacing="2" cellpadding="0">
         <tr collspan="2" rowspan="2">
             <td >管径或渠高(mm)</td>
             <td>最大设计充满度</td>
         </tr>
          <tr>
             <td>200-300</td>
             <td>0.55</td>
         </tr>
          <tr>
             <td>350-450</td>
             <td>0.65</td>
         </tr>
          <tr>
             <td>500-900</td>
             <td>0.70</td>
         </tr>
          <tr>
             <td>1000</td>
             <td>0.75</td>
         </tr>
         </table>
         <span>超过最大设计充满度(简称超载)说明管道内部承受额外水压,影响管道寿命,超载管段长度是发生超载管段的里程累加</span>
     </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeDialog()" size="mini">取 消</el-button>
        <el-button type="primary" @click="closeDialog()" size="mini"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>

<script>
  export default {
    name: 'tipDialog',
    props: {
      DialogTipShow: Boolean
    },
    data() {
      return {
        DialogTip: false
      }
    },
    watch: {
      DialogTipShow(val) {
        this.DialogTip = val
      },
      deep: true
    },
    methods: {
      closeDialog() {
        this.DialogTip = false
        this.$emit('closeDialog', false)
      }
    }
  }
</script>

<style lang="scss" scoped>
.el-dialog__header{
    display: none !important;
}
.formData{
      border-collapse: collapse;
      margin:10px 0 ;
    tr{
           text-align: center;
        td{
            border: 1px solid #CFCFCF;
            text-align: center;
        }
    }
}
.el-icon-question:before{
   color: #D8D8D8 !important;
}
</style>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值