<template>
  <div>
    <el-dialog
        title="查看视频文件"
        :visible="true"
        width="1100px"
        append-to-body
        :close-on-click-modal="false"
        @close="handleClose">

      <div class="addContract">
        <video id="video" width="100%" :height="contentHeight" :src="previewUrl" preload="auto" autoplay="autoplay"
               controls="" controlsList="nodownload noremote footbar"></video>
      </div>

      <span slot="footer" class="dialog-footer">
                <el-button @click="handleClose">关闭</el-button>
            </span>
    </el-dialog>

  </div>
</template>

<script>
export default {
  props: {
    previewUrl: {
      type: String,
      default: () => {
        return ''
      },
    },
  },
  data() {
    return {};
  },
  computed: {
    // 获取抽屉drawer的内容高度
    contentHeight() {
      let oh = document.documentElement.clientHeight;
      return oh - 330
    },

  },
  async created() {

  },
  mounted() {

  },
  beforeDestroy() {

  },
  methods: {
    handleClose() {
      // this.$emit('update:editSealFlag', false)
      this.$emit('update:visible', false)
    },

  }
};
</script>