<!--
 * @Descripttion: 
 * @version: 
 * @Author: JC9527
 * @Date: 2023-09-20 14:14:24
 * @LastEditors: JC9527
 * @LastEditTime: 2023-09-22 11:04:22
-->
<template>
  <el-dialog
    :visible.sync="dialogVisible"
    :destroy-on-close="true"
    :close-on-click-modal="false"
    append-to-body
    custom-class="dialog-boxed"
    :width="width"
  >
    <div slot="title">
      <div class="titleText">{{ title }}</div>
    </div>
    <div class="dialog-slot">
      <slot></slot>
    </div>
  </el-dialog>
</template>
<script>
export default {
  data() {
    return {
      dialogVisible: false,
    }
  },
  props:{
    width:{
      type:String,
      default:'35%'
    },
    title:{
      type:String,
      default:'查看详情'
    }
  },
  methods:{
    open() {
      this.dialogVisible = true;
    },
    Close() {
      this.dialogVisible = false;
    }
  },
}
</script>
<style lang="scss" scoped>
.titleText {
  font-family: "Alibaba-PuHuiTi-Regular";
  font-weight: bold;
  color: #4c4949;
  padding-left: 15px;
  font-size: 16px;
  position: relative;
  &::before {
    position: absolute;
    top: 3.8px;
    left: 0;
    content: "";
    width: 5px;
    height: 15px;
    background: #f8414d;
  }
}
::v-deep .el-dialog__body {
  padding: 0;
}
::v-deep .el-dialog__header {
  padding: 10px;
  padding-left: 15px;
  background: #f7f5f5;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
::v-deep .el-dialog__headerbtn {
  top: 12px;
}
.dialog-slot {
  padding: 20px 30px;
  .closeClick {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px 20px;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    background: #f8f9fa;
    box-shadow: 0px 1px 0px 0px #dbe0e8;
    background-color: #e0eaf8;
    img {
      width: 18px;
      height: 18px;
      cursor: pointer;
    }
    .newplan {
      display: flex;
      align-items: center;
      .line {
        margin-right: 10px;
        width: 5px;
        height: 16px;
        background-color: #1e70de;
      }
      .span {
        font-size: 16px;
        font-family: "Alibaba PuHuiTi";
        font-weight: bold;
        color: #1e70de;
      }
    }
  }
}
</style>
