Skip to content

Commit

Permalink
fix printing qr code
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Wiaderek authored and Tomasz Wiaderek committed Oct 18, 2023
1 parent 22ebd8d commit 45f0480
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/topbar/MenuQrCode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</template>

<script lang="ts">
import { defineComponent, ref } from "vue";
import { ComponentPublicInstance, defineComponent, ref } from "vue";
import { mdiPrinter } from "@mdi/js";
export default defineComponent({
Expand All @@ -24,13 +24,13 @@ export default defineComponent({
},
},
setup() {
const qrCode = ref<HTMLDivElement | null>(null);
const qrCode = ref<ComponentPublicInstance<HTMLInputElement>>();
const openPrintMenu = () => {
const win = window.open();
if (qrCode.value !== null) {
win?.document.write(qrCode.value.$el.innerHTML);
win?.document.write(qrCode.value!.$el.innerHTML);
win?.print();
win?.close();
}
Expand Down

0 comments on commit 45f0480

Please sign in to comment.