<template>
  <el-dialog
    :visible.sync="visible"
    width="70%"
    style="height: 98%"
    :before-close="handleClose"
    top="5vh"
    lock-scroll
    title="预览展览"
  >
    <div class="dialog-content">
      <el-tabs v-model="activeName">
        <el-tab-pane name="基本信息" label="基本信息">
          <DisplayBaseInfo :info="info" />
        </el-tab-pane>
        <el-tab-pane name="效果预览" label="效果预览">
          <DislplayRender :info="info" />
        </el-tab-pane>
      </el-tabs>
    </div>
  </el-dialog>
</template>

<script>
import DisplayBaseInfo from "@/components/DisplayBaseInfo";
import DislplayRender from "@/components/DisplayRender";
export default {
  name: "PreviewDialog",
  components: {
    DisplayBaseInfo,
    DislplayRender,
  },
  props: {
    info: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {
      visible: false,
      activeName: "基本信息",
    };
  },
  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>
