changes
This commit is contained in:
25
app/components/imports/Barcode.vue
Normal file
25
app/components/imports/Barcode.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<script setup>
|
||||
import JsBarcode from "jsbarcode";
|
||||
|
||||
const props = defineProps({
|
||||
imei: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const barcodeSvg = useTemplateRef("barcode");
|
||||
onMounted(() => {
|
||||
if (barcodeSvg.value)
|
||||
JsBarcode(barcodeSvg.value, props.imei, {
|
||||
background: "transparent",
|
||||
width: 1,
|
||||
height: 15,
|
||||
displayValue: false,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<svg ref="barcode"></svg>
|
||||
</template>
|
||||
Reference in New Issue
Block a user