<template>
  <el-dialog v-model="visible" title="清单二维码">
    <div id="printContainer">
      <part-qr-code :info="info" />
      <el-divider content-position="left">APP-待排查-清单扫描</el-divider>
    </div>
    <template #footer>
      <el-button @click="visible = false">关闭</el-button>
      <el-button v-print="'#printContainer'" type="primary">打 印</el-button>
    </template>
  </el-dialog>
</template>

<script setup>
import { useVModel } from "@vueuse/core";
import PartQrCode from "./part_qr_code.vue";

const props = defineProps({
  visible: {
    type: Boolean,
    required: true,
    default: false,
  },
  info: {
    type: Object,
    required: true,
    default: () => ({}),
  },
});
const emits = defineEmits(["update:visible"]);
const visible = useVModel(props, "visible", emits);
</script>

<style scoped lang="scss"></style>
