<template>
    <el-dialog title="二维码查看" top="10px" :visible.sync="visible" width="30%" v-dialogDrag :close-on-click-modal="false"
      :before-close="cancel">
      <div class="dia-box" style="text-align:center">
            <vue-qr
                ref="qrcodeRef"
                :text="archiveNo"
                :margin="12"
                colorDark="#010101"
                colorLight="#fff"
                :dotScale="1"
                :logoSrc="downloadData.icon"
                :logoScale="0.2"
                :size="240"
              ></vue-qr>
            
        <div style="text-align:right;margin:15px 0 20px;">
          <el-button size="mini" @click="cancel">关闭</el-button>
        </div>
      </div>
    </el-dialog>
  </template>
  <script>
    import logo256 from "@/assets/img/logo256.jpg";
    import {
      message
    } from "@/utils/common";
    export default {
      props: {
        visible: {
          type: Boolean,
          default: () => false
        },
        archiveNo: {
          type: String,
          default: () => ''
        },
      },
      data() {
        return {
          // 二维码生成所需地址和图片
        downloadData: {
            icon: logo256,
        },
        };
      },
      methods: {
        cancel() {
          this.$emit("cancel");
        },
      }
    };
  
  </script>
  