修复bug
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
/* eslint-disable no-undef */
|
||||
import { hiprint } from 'vue-plugin-hiprint'
|
||||
export const customProvider = function (options) {
|
||||
|
||||
export const customProvider = function () {
|
||||
const addElementTypes = function (context) {
|
||||
context.removePrintElementTypes('customProvider')
|
||||
context.addPrintElementTypes('customProvider', [
|
||||
@@ -24,11 +26,9 @@ export const customProvider = function (options) {
|
||||
printData = sukData
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
$('body').append(`<div id="codewrapper-${elId}" style="width: ${codeWidth}pt">
|
||||
<svg id="${elId}" width="100%" display="block" height="100%" class="hibarcode_imgcode" preserveAspectRatio="none slice"></svg>
|
||||
</div>`)
|
||||
// eslint-disable-next-line no-undef
|
||||
JsBarcode('#' + elId, printData.labelCode, {
|
||||
format: 'CODE128B',
|
||||
width: 2,
|
||||
@@ -37,13 +37,11 @@ export const customProvider = function (options) {
|
||||
displayValue: false
|
||||
})
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
const codeHtml = $(`#codewrapper-${elId}`).html()
|
||||
// eslint-disable-next-line no-undef
|
||||
$(`body>#codewrapper-${elId}`).remove()
|
||||
// eslint-disable-next-line no-undef
|
||||
|
||||
const resizeObserver = new ResizeObserver(() => {
|
||||
JsBarcode('#' + elId, printData.labelCode, {
|
||||
JsBarcode('#' + elId, printData.labelCode, {
|
||||
format: "CODE128B",
|
||||
width: 2,
|
||||
height: parseInt(hinnn.pt.toPx(options.height - 22).toString()) * 0.6,
|
||||
|
||||
Reference in New Issue
Block a user