Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix printing qr code #2869

Merged
merged 9 commits into from
Oct 23, 2023
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
Loading