<template>
  <div style="width:100%;height: 100%;">
    <iframe style="width:100%;height: 100%;" :src="url" frameborder="0" ref="iframe"></iframe>
  </div>
</template>
<script setup>
const url = ref('/externalPrint');
const iframe = ref(null);
onMounted(() => {
  iframe.value.onload = function() {
    setTimeout(() => {
      iframe.value.contentWindow.postMessage('print', '*');
    }, 1000);
  };
});
</script>
<style></style>
