diff --git a/src/demo/design/index.vue b/src/demo/design/index.vue index 4578dc191de19320c277c2b98bea4ebc5c765bbc..e96ea6947461762059571a18906fd9054a86574d 100644 --- a/src/demo/design/index.vue +++ b/src/demo/design/index.vue @@ -214,6 +214,17 @@ export default { hiprint.init({ providers: [new defaultElementTypeProvider()] }); + //手动连接socket + // hiprint.init({ + // providers: [new defaultElementTypeProvider()] + // },true); + // hiprint.connectSocket.start(function(){ + // //成功回调 + // //获取打印机列表 直接打印等操作需在成功回调内执行 + // },function(){ + // //失败回调 + // //若无失败回调则默认执行成功回调 + // }) // 还原配置 hiprint.setConfig() // 替换配置 diff --git a/src/hiprint/css/hiprint.css b/src/hiprint/css/hiprint.css index 36892781ab118b1a53aefb650be652dfd6eac4e0..3e58135e6a231aa68d08ebff3e5253c09d252d6e 100644 --- a/src/hiprint/css/hiprint.css +++ b/src/hiprint/css/hiprint.css @@ -669,7 +669,9 @@ font-weight: normal;*/ border-top: 1px solid rgb(201, 190, 190); border-left: 1px solid rgb(201, 190, 190); padding-left: 15px; - margin: -16px + padding-top:15px; + margin: -16px; + box-sizing: content-box!important; } .hiprint_rul_wrapper .h_img { diff --git a/src/hiprint/css/image/l_img.svg b/src/hiprint/css/image/l_img.svg new file mode 100644 index 0000000000000000000000000000000000000000..75e47935b7f01059469ca11999a4fa70e7fcbe89 --- /dev/null +++ b/src/hiprint/css/image/l_img.svg @@ -0,0 +1 @@ +0801602403504012020028039020100180260370601402203303001090170250360501302103202903011019027038070150230340310 \ No newline at end of file diff --git a/src/hiprint/css/image/v_img.svg b/src/hiprint/css/image/v_img.svg new file mode 100644 index 0000000000000000000000000000000000000000..895b1fa053932b2c99c47401c3258a7be9be34d0 --- /dev/null +++ b/src/hiprint/css/image/v_img.svg @@ -0,0 +1 @@ +801602403504012020028039020100180260370601402203303001090170250360501302103202903011019027038070150230340310 \ No newline at end of file diff --git a/src/hiprint/hiprint.bundle.js b/src/hiprint/hiprint.bundle.js index f1ebd92862f9239f912f1a800b9349f1c9235024..9da723c85a75a5758bc704182a24978c1e4c0806 100644 --- a/src/hiprint/hiprint.bundle.js +++ b/src/hiprint/hiprint.bundle.js @@ -50,7 +50,9 @@ import './plugins/JsBarcode.all.min.js' import './plugins/qrcode.js' // 直接打印需要 import io from './plugins/socket.io' - +//引入标尺 +import lImg from './css/image/l_img.svg' +import vImg from './css/image/v_img.svg' window.io = io; // pdf import jsPDF from './plugins/jspdf/jspdf.min.js' @@ -6504,7 +6506,7 @@ var hiprint = function (t) { }, t.prototype.getContentHeight = function (t) { return this.getPaperFooter(t) - this.paperHeader; }, t.prototype.createRuler = function () { - this.target.append('
\n \n \n
'); + this.target.append('
\n \n \n
'); }, t.prototype.displayHeight = function () { return this.mmheight - p.a.instance.paperHeightTrim + "mm"; }, t.prototype.displayWidth = function () { diff --git a/yarn.lock b/yarn.lock index 7b889f91c0cff3e103c40e798e037a1c28dfbff1..8e233520244cbf77c463f0dfd45c2e62f7112725 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2751,6 +2751,11 @@ concat-stream@^1.5.0: readable-stream "^2.2.2" typedarray "^0.0.6" +concurrent-tasks@^1.0.7: + version "1.0.7" + resolved "https://registry.npmmirror.com/concurrent-tasks/-/concurrent-tasks-1.0.7.tgz#fb3f11bc80ea5bc12f3055c25cb7c679459a77a0" + integrity sha512-2FJzuFm0eK8jmPIazy/Un9r6eo+bBeSC36ONvopgNBEL3NB0ck44I9kLu+NJgyuuLjwwtaAreujTKOBCmfCgDg== + connect-history-api-fallback@^1.6.0: version "1.6.0" resolved "https://registry.npmmirror.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc"