<template>
  <div>
    <el-dialog title="材料预览" :visible.sync="Visible" width="50%" top="2vh">
      <div class="main flex flexc aic">
        <div class="header tac mb20">
          <div class="materals-name mb10">分公司登记申请书</div>
          <p class="abbreviation">材料全称：公司登记申请书</p>
        </div>
        <div class="preview-box">
          <img
            class="sample-sheet-img"
            src="../../../../assets/img/yangbiao.png"
          />
        </div>
      </div>
      <!-- <span slot="footer" class="dialog-footer">
        <el-button size="small" type="primary" @click="Visible = false"
          >确 定</el-button
        >
        <el-button size="small" @click="Visible = false">取 消</el-button>
      </span> -->
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    materalsInfo: {
      type: Object,
      required: true,
      default: () => {
        return {};
      },
    },
    previewVisible: {
      type: Boolean,
      required: true,
      default: false,
    },
  },
  computed: {
    Visible: {
      get() {
        return this.previewVisible;
      },
      set(val) {
        this.$emit("update:previewVisible", val);
      },
    },
  },
};
</script>

<style lang="less" scoped>
/deep/.el-dialog__body {
  max-height: 86vh;
  overflow-y: auto;
  &::-webkit-scrollbar {
    width: 6px;
    overflow-y: auto;
  }

  &::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background-color: rgba(144, 147, 153, 0.5);
  }

  &::-webkit-scrollbar-track {
    border-radius: 6px;
    background: #fff;
  }
}
.main {
  width: 100%;
  .materals-name {
    font-size: 18px;
  }
  .abbreviation {
    font-size: 14px;
    color: #999;
  }

  .preview-box {
    width: 80%;
    // box-shadow: 2px 2px 8px 8px #ccc;
    .sample-sheet-img {
      width: 100%;
      object-fit: contain;
    }
  }
}
</style>