<template>
  <el-dialog
    :visible.sync="visible"
    width="50%"
    style="height: 98%"
    :before-close="handleClose"
    top="5vh"
    lock-scroll
    title="预览文物"
  >
    <div class="dialog-content">
      <CulturalRelicInfo :info="info" />
    </div>
  </el-dialog>
</template>

<script>
import CulturalRelicInfo from "@/components/CulturalRelicInfo";
export default {
  name: "PreviewDialog",
  components: {
    CulturalRelicInfo,
  },
  props: {
    info: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {
      visible: false,
    };
  },
  methods: {
    handleClose() {
      this.visible = false;
    },
  },
};
</script>

<style lang="scss" scoped>
.title {
  display: flex;
  margin-bottom: 16px;
  .divider {
    width: 8px;
    border-left: 4px solid #409eff;
    margin-right: 8px;
  }
  .label {
    font-weight: bold;
  }
}

.dialog-content {
  height: 65vh;
  overflow: auto;
}
</style>
