yh-hiprint 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HiprintDesigner.vue +5 -5
- package/column-field.js +1 -3
- package/designer.vue +4 -4
- package/font-size.js +2 -3
- package/index.js +1 -2
- package/libs/hiprint.bundle.js +331 -335
- package/libs/jquery.js +1 -2
- package/libs/jsbarcode/JsBarcode.js +251 -0
- package/libs/jsbarcode/barcodes/Barcode.js +17 -0
- package/libs/jsbarcode/barcodes/CODE128/CODE128.js +167 -0
- package/libs/jsbarcode/barcodes/CODE128/CODE128A.js +42 -0
- package/libs/jsbarcode/barcodes/CODE128/CODE128B.js +42 -0
- package/libs/jsbarcode/barcodes/CODE128/CODE128C.js +42 -0
- package/libs/jsbarcode/barcodes/CODE128/CODE128_AUTO.js +41 -0
- package/libs/jsbarcode/barcodes/CODE128/auto.js +73 -0
- package/libs/jsbarcode/barcodes/CODE128/constants.js +54 -0
- package/libs/jsbarcode/barcodes/CODE128/index.js +29 -0
- package/libs/jsbarcode/barcodes/CODE39/index.js +105 -0
- package/libs/jsbarcode/barcodes/EAN_UPC/EAN.js +92 -0
- package/libs/jsbarcode/barcodes/EAN_UPC/EAN13.js +119 -0
- package/libs/jsbarcode/barcodes/EAN_UPC/EAN2.js +58 -0
- package/libs/jsbarcode/barcodes/EAN_UPC/EAN5.js +65 -0
- package/libs/jsbarcode/barcodes/EAN_UPC/EAN8.js +81 -0
- package/libs/jsbarcode/barcodes/EAN_UPC/UPC.js +165 -0
- package/libs/jsbarcode/barcodes/EAN_UPC/UPCE.js +185 -0
- package/libs/jsbarcode/barcodes/EAN_UPC/constants.js +30 -0
- package/libs/jsbarcode/barcodes/EAN_UPC/encoder.js +27 -0
- package/libs/jsbarcode/barcodes/EAN_UPC/index.js +39 -0
- package/libs/jsbarcode/barcodes/GenericBarcode/index.js +55 -0
- package/libs/jsbarcode/barcodes/ITF/ITF.js +69 -0
- package/libs/jsbarcode/barcodes/ITF/ITF14.js +55 -0
- package/libs/jsbarcode/barcodes/ITF/constants.js +9 -0
- package/libs/jsbarcode/barcodes/ITF/index.js +19 -0
- package/libs/jsbarcode/barcodes/MSI/MSI.js +74 -0
- package/libs/jsbarcode/barcodes/MSI/MSI10.js +33 -0
- package/libs/jsbarcode/barcodes/MSI/MSI1010.js +35 -0
- package/libs/jsbarcode/barcodes/MSI/MSI11.js +33 -0
- package/libs/jsbarcode/barcodes/MSI/MSI1110.js +35 -0
- package/libs/jsbarcode/barcodes/MSI/checksums.js +29 -0
- package/libs/jsbarcode/barcodes/MSI/index.js +34 -0
- package/libs/jsbarcode/barcodes/codabar/index.js +92 -0
- package/libs/jsbarcode/barcodes/index.js +33 -0
- package/libs/jsbarcode/barcodes/index.tmp.js +33 -0
- package/libs/jsbarcode/barcodes/pharmacode/index.js +73 -0
- package/libs/jsbarcode/exceptions/ErrorHandler.js +54 -0
- package/libs/jsbarcode/exceptions/exceptions.js +67 -0
- package/libs/jsbarcode/help/fixOptions.js +17 -0
- package/libs/jsbarcode/help/getOptionsFromElement.js +41 -0
- package/libs/jsbarcode/help/getRenderProperties.js +108 -0
- package/libs/jsbarcode/help/linearizeEncodings.js +27 -0
- package/libs/jsbarcode/help/merge.js +11 -0
- package/libs/jsbarcode/help/optionsFromStrings.js +27 -0
- package/libs/jsbarcode/options/defaults.js +28 -0
- package/libs/jsbarcode/renderers/canvas.js +158 -0
- package/libs/jsbarcode/renderers/index.js +21 -0
- package/libs/jsbarcode/renderers/object.js +30 -0
- package/libs/jsbarcode/renderers/shared.js +101 -0
- package/libs/jsbarcode/renderers/svg.js +189 -0
- package/libs/plugins/jquery.hiwprint.js +9 -10
- package/libs/plugins/jquery.minicolors.js +65 -66
- package/package.json +1 -3
package/HiprintDesigner.vue
CHANGED
|
@@ -279,7 +279,7 @@
|
|
|
279
279
|
<script setup lang="ts">
|
|
280
280
|
// @ts-nocheck
|
|
281
281
|
import {onMounted, ref, onActivated, onDeactivated, computed, watch} from 'vue';
|
|
282
|
-
import {hiprint, defaultElementTypeProvider, fontSize, scale, zIndex, panel, usePaper, useScale, useDataSource
|
|
282
|
+
import {hiprint, defaultElementTypeProvider, fontSize, scale, zIndex, panel, usePaper, useScale, useDataSource} from 'yh-hiprint';
|
|
283
283
|
import {useRoute, onBeforeRouteUpdate} from 'vue-router';
|
|
284
284
|
import {ElMessageBox, ElMessage} from 'element-plus';
|
|
285
285
|
import axios from '@/libs/api.request';
|
|
@@ -492,8 +492,8 @@ function init() {
|
|
|
492
492
|
},
|
|
493
493
|
});
|
|
494
494
|
|
|
495
|
-
hiprint.PrintElementTypeManager.buildByHtml(
|
|
496
|
-
|
|
495
|
+
hiprint.PrintElementTypeManager.buildByHtml(hiprintJQuery('.ep-draggable-item'));
|
|
496
|
+
hiprintJQuery('#hiprint-printTemplate').empty();
|
|
497
497
|
let template = JSON.parse(detailData.value.json) || panel;
|
|
498
498
|
hiprintTemplate.value = new hiprint.PrintTemplate({
|
|
499
499
|
template,
|
|
@@ -528,7 +528,7 @@ function init() {
|
|
|
528
528
|
})
|
|
529
529
|
);
|
|
530
530
|
}
|
|
531
|
-
|
|
531
|
+
hiprintJQuery('.hiprint-designer').on('mousedown', '.hiprint-printElement', (e) => {
|
|
532
532
|
let t = e.currentTarget;
|
|
533
533
|
let pes = hiprintTemplate.value?.editingPanel.printElements;
|
|
534
534
|
let index = pes.map((item) => item.designTarget[0]).indexOf(t);
|
|
@@ -538,7 +538,7 @@ function init() {
|
|
|
538
538
|
listCode.value = pe.options.field;
|
|
539
539
|
}
|
|
540
540
|
});
|
|
541
|
-
|
|
541
|
+
hiprintJQuery('#PrintElementOptionSetting').on('input', 'input[type=number]', ($el) => {
|
|
542
542
|
let val = parseInt($el.target.value);
|
|
543
543
|
if (val < 1) {
|
|
544
544
|
$el.target.value = 1;
|
package/column-field.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import $ from "./lib/jquery";
|
|
2
|
-
|
|
3
1
|
export default function (tableFields) {
|
|
4
2
|
function t () {
|
|
5
3
|
this.name = "field";
|
|
@@ -9,7 +7,7 @@ export default function (tableFields) {
|
|
|
9
7
|
(t.prototype.createTarget = function (t, i, e) {
|
|
10
8
|
// t: 元素对象,i: 元素options, e: 元素printElementType
|
|
11
9
|
return (
|
|
12
|
-
(this.target =
|
|
10
|
+
(this.target = hiprintJQuery(
|
|
13
11
|
`<div class="hiprint-option-item">
|
|
14
12
|
<div class="hiprint-option-item-label">字段选择</div>
|
|
15
13
|
<div class="hiprint-option-item-field">
|
package/designer.vue
CHANGED
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
</template>
|
|
267
267
|
<script setup>
|
|
268
268
|
import { onMounted, ref, onActivated, onDeactivated, computed, watch, nextTick } from "vue";
|
|
269
|
-
import { hiprint, defaultElementTypeProvider, fontSize, scale, zIndex, panel, usePaper, useScale, useDataSource
|
|
269
|
+
import { hiprint, defaultElementTypeProvider, fontSize, scale, zIndex, panel, usePaper, useScale, useDataSource } from "yh-hiprint";
|
|
270
270
|
import { useRoute, onBeforeRouteUpdate } from "vue-router/dist/vue-router";
|
|
271
271
|
import { ElMessageBox } from "element-plus";
|
|
272
272
|
import axios from "@/libs/api.request";
|
|
@@ -470,8 +470,8 @@ function init() {
|
|
|
470
470
|
},
|
|
471
471
|
});
|
|
472
472
|
|
|
473
|
-
hiprint.PrintElementTypeManager.buildByHtml(
|
|
474
|
-
|
|
473
|
+
hiprint.PrintElementTypeManager.buildByHtml(hiprintJQuery(".ep-draggable-item"));
|
|
474
|
+
hiprintJQuery("#hiprint-printTemplate").empty();
|
|
475
475
|
let template = JSON.parse(detailData.value.json) || panel;
|
|
476
476
|
hiprintTemplate.value = new hiprint.PrintTemplate({
|
|
477
477
|
template,
|
|
@@ -519,7 +519,7 @@ function init() {
|
|
|
519
519
|
})
|
|
520
520
|
);
|
|
521
521
|
}
|
|
522
|
-
|
|
522
|
+
hiprintJQuery(".hiprint-designer").on("mousedown", ".hiprint-printElement", (e) => {
|
|
523
523
|
let t = e.currentTarget;
|
|
524
524
|
let pes = hiprintTemplate.value.editingPanel.printElements;
|
|
525
525
|
let index = pes.map((item) => item.designTarget[0]).indexOf(t);
|
package/font-size.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import $ from "./libs/jquery";
|
|
2
1
|
export default (function () {
|
|
3
2
|
function t () {
|
|
4
3
|
this.name = "fontSize"; // 重写的参数 key
|
|
@@ -19,8 +18,8 @@ export default (function () {
|
|
|
19
18
|
list.forEach(function (e) {
|
|
20
19
|
fontSizeList += '\n <option value="' + e + '">' + e + "pt</option>";
|
|
21
20
|
});
|
|
22
|
-
this.target =
|
|
23
|
-
this.target.find(".auto-submit").append(
|
|
21
|
+
this.target = hiprintJQuery(' <div class="hiprint-option-item">\n <div class="hiprint-option-item-label">\n 字体大小\n </div>\n <div class="hiprint-option-item-field">\n <select class="auto-submit"> </select>\n </div>\n </div>');
|
|
22
|
+
this.target.find(".auto-submit").append(hiprintJQuery(fontSizeList));
|
|
24
23
|
return this.target;
|
|
25
24
|
}),
|
|
26
25
|
// 获取值
|
package/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import "./libs/jquery";
|
|
1
2
|
export { hiprint, defaultElementTypeProvider, print, print2, usePaper, useScale, useDataSource } from "./hooks/useHiprint";
|
|
2
|
-
|
|
3
|
-
export { default as jquery } from "./libs/jquery";
|
|
4
3
|
export { default as fontSize } from "./font-size";
|
|
5
4
|
export { default as scale } from "./scale";
|
|
6
5
|
export { default as zIndex } from "./z-index";
|