Skip to content

Commit

Permalink
fix printing qr code (#2869)
Browse files Browse the repository at this point in the history
* fix printing qr code

---------

Co-authored-by: Tomasz Wiaderek <[email protected]>
  • Loading branch information
wiaderwek and Tomasz Wiaderek authored Oct 23, 2023
1 parent 69eb8c0 commit 7bc2bb2
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<HTMLDivElement>>();
const openPrintMenu = () => {
const win = window.open();
if (qrCode.value !== null) {
win?.document.write(qrCode.value.innerHTML);
win?.document.write(qrCode.value!.$el.innerHTML);
win?.print();
win?.close();
}
Expand Down

0 comments on commit 7bc2bb2

Please sign in to comment.