vg-print-vue2 1.0.313 → 1.0.314

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/dist/style.css CHANGED
@@ -1099,6 +1099,35 @@ font-weight: normal;*/
1099
1099
  display: block;
1100
1100
  }
1101
1101
 
1102
+ .hiprint-printPaper table.hiprint-printElement-tableTarget,
1103
+ .hiprint-printPaper table.hiprint-static-grid-table {
1104
+ border-collapse: collapse !important;
1105
+ border-spacing: 0 !important;
1106
+ margin: 0 !important;
1107
+ max-width: none !important;
1108
+ box-sizing: border-box !important;
1109
+ }
1110
+
1111
+ .hiprint-printPaper table.hiprint-printElement-tableTarget th,
1112
+ .hiprint-printPaper table.hiprint-printElement-tableTarget td,
1113
+ .hiprint-printPaper table.hiprint-static-grid-table th,
1114
+ .hiprint-printPaper table.hiprint-static-grid-table td {
1115
+ padding: 0 !important;
1116
+ margin: 0 !important;
1117
+ line-height: normal !important;
1118
+ text-indent: 0 !important;
1119
+ letter-spacing: normal !important;
1120
+ box-sizing: border-box !important;
1121
+ background-clip: padding-box;
1122
+ }
1123
+
1124
+ .hiprint-printPaper .hiprint-printElement-staticGridTable,
1125
+ .hiprint-printPaper .hiprint-printElement-staticGridTable .hiprint-printElement-html-content,
1126
+ .hiprint-printPaper .hiprint-printElement-staticGridTable .html-content-wrapper {
1127
+ overflow: visible !important;
1128
+ box-sizing: border-box !important;
1129
+ }
1130
+
1102
1131
  .hiprint-printElement-staticGridTable .hiprint-static-grid-table {
1103
1132
  width: 100%;
1104
1133
  height: 100%;
@@ -51186,6 +51186,35 @@ font-weight: normal;*/
51186
51186
  display: block;
51187
51187
  }
51188
51188
 
51189
+ .hiprint-printPaper table.hiprint-printElement-tableTarget,
51190
+ .hiprint-printPaper table.hiprint-static-grid-table {
51191
+ border-collapse: collapse !important;
51192
+ border-spacing: 0 !important;
51193
+ margin: 0 !important;
51194
+ max-width: none !important;
51195
+ box-sizing: border-box !important;
51196
+ }
51197
+
51198
+ .hiprint-printPaper table.hiprint-printElement-tableTarget th,
51199
+ .hiprint-printPaper table.hiprint-printElement-tableTarget td,
51200
+ .hiprint-printPaper table.hiprint-static-grid-table th,
51201
+ .hiprint-printPaper table.hiprint-static-grid-table td {
51202
+ padding: 0 !important;
51203
+ margin: 0 !important;
51204
+ line-height: normal !important;
51205
+ text-indent: 0 !important;
51206
+ letter-spacing: normal !important;
51207
+ box-sizing: border-box !important;
51208
+ background-clip: padding-box;
51209
+ }
51210
+
51211
+ .hiprint-printPaper .hiprint-printElement-staticGridTable,
51212
+ .hiprint-printPaper .hiprint-printElement-staticGridTable .hiprint-printElement-html-content,
51213
+ .hiprint-printPaper .hiprint-printElement-staticGridTable .html-content-wrapper {
51214
+ overflow: visible !important;
51215
+ box-sizing: border-box !important;
51216
+ }
51217
+
51189
51218
  .hiprint-printElement-staticGridTable .hiprint-static-grid-table {
51190
51219
  width: 100%;
51191
51220
  height: 100%;
@@ -56051,20 +56080,21 @@ var hiprint$3 = function(t4) {
56051
56080
  }
56052
56081
  return t5.prototype.createTarget = function(t6, o2) {
56053
56082
  var n4 = this;
56083
+ var syncVal = o2 && o2.coordinateSync;
56054
56084
  n4.target = $$i(`<div class="hiprint-option-item">
56055
56085
  <div class="hiprint-option-item-label">
56056
56086
  ${i18n.__("位置坐标")}
56057
56087
  </div>
56058
56088
  <div class="hiprint-option-item-field" style="width:75%;display: flex;align-items: baseline;">
56059
56089
 
56060
- <input type="number" style="width:48%" placeholder="${i18n.__("X位置(左)")}" class="auto-submit" />
56090
+ <input type="number" step="0.1" inputmode="decimal" style="width:48%" placeholder="${i18n.__("X位置(左)")}" class="auto-submit" />
56061
56091
 
56062
- <input type="number" style="width:48%" placeholder="${i18n.__("Y位置(上)")}" class="auto-submit" />
56092
+ <input type="number" step="0.1" inputmode="decimal" style="width:48%" placeholder="${i18n.__("Y位置(上)")}" class="auto-submit" />
56063
56093
 
56064
56094
  </div>
56065
56095
 
56066
56096
  </div>`);
56067
- n4.syncLock = o2.coordinateSync || false;
56097
+ n4.syncLock = syncVal === true || syncVal === "true";
56068
56098
  n4.createSyncLock(n4.syncLock);
56069
56099
  return n4.target;
56070
56100
  }, t5.prototype.createSyncLock = function(t6) {
@@ -56079,12 +56109,12 @@ var hiprint$3 = function(t4) {
56079
56109
  n4.syncLock = !n4.syncLock;
56080
56110
  });
56081
56111
  n4.target.find("input:first").after(n4.lockTarget);
56082
- n4.target.find("input:first").change(function() {
56112
+ n4.target.find("input:first").on("input change", function() {
56083
56113
  if (n4.syncLock) {
56084
56114
  n4.target.find("input:last").val($$i(this).val());
56085
56115
  }
56086
56116
  });
56087
- n4.target.find("input:last").change(function() {
56117
+ n4.target.find("input:last").on("input change", function() {
56088
56118
  if (n4.syncLock) {
56089
56119
  n4.target.find("input:first").val($$i(this).val());
56090
56120
  }
@@ -56104,8 +56134,8 @@ var hiprint$3 = function(t4) {
56104
56134
  left: 0,
56105
56135
  top: 0
56106
56136
  };
56107
- v3.left = parseFloat(this.target.find("input:first").val() || 0);
56108
- v3.top = parseFloat(this.target.find("input:last").val() || 0);
56137
+ v3.left = Math.round((parseFloat(this.target.find("input:first").val() || 0) || 0) * 10) / 10;
56138
+ v3.top = Math.round((parseFloat(this.target.find("input:last").val() || 0) || 0) * 10) / 10;
56109
56139
  return v3;
56110
56140
  }, t5.prototype.setValue = function(t6, el2) {
56111
56141
  this.el = el2.designTarget || el2;
@@ -56120,20 +56150,21 @@ var hiprint$3 = function(t4) {
56120
56150
  }
56121
56151
  return t5.prototype.createTarget = function(t6, o2) {
56122
56152
  var n4 = this;
56153
+ var syncVal = o2 && o2.widthHeightSync;
56123
56154
  n4.target = $$i(`<div class="hiprint-option-item">
56124
56155
  <div class="hiprint-option-item-label">
56125
56156
  ${i18n.__("宽高大小")}
56126
56157
  </div>
56127
56158
  <div class="hiprint-option-item-field" style="width:75%;display: flex;align-items: baseline;">
56128
56159
 
56129
- <input type="number" style="width:48%" placeholder="${i18n.__("宽")}" class="auto-submit" />
56160
+ <input type="number" step="0.1" inputmode="decimal" style="width:48%" placeholder="${i18n.__("宽")}" class="auto-submit" />
56130
56161
 
56131
- <input type="number" style="width:48%" placeholder="${i18n.__("高")}" class="auto-submit" />
56162
+ <input type="number" step="0.1" inputmode="decimal" style="width:48%" placeholder="${i18n.__("高")}" class="auto-submit" />
56132
56163
 
56133
56164
  </div>
56134
56165
 
56135
56166
  </div>`);
56136
- n4.syncLock = o2.widthHeightSync || false;
56167
+ n4.syncLock = syncVal === true || syncVal === "true";
56137
56168
  n4.createSyncLock(n4.syncLock);
56138
56169
  return n4.target;
56139
56170
  }, t5.prototype.createSyncLock = function(t6) {
@@ -56148,12 +56179,12 @@ var hiprint$3 = function(t4) {
56148
56179
  n4.syncLock = !n4.syncLock;
56149
56180
  });
56150
56181
  n4.target.find("input:first").after(n4.lockTarget);
56151
- n4.target.find("input:first").change(function() {
56182
+ n4.target.find("input:first").on("input change", function() {
56152
56183
  if (n4.syncLock) {
56153
56184
  n4.target.find("input:last").val($$i(this).val());
56154
56185
  }
56155
56186
  });
56156
- n4.target.find("input:last").change(function() {
56187
+ n4.target.find("input:last").on("input change", function() {
56157
56188
  if (n4.syncLock) {
56158
56189
  n4.target.find("input:first").val($$i(this).val());
56159
56190
  }
@@ -56173,8 +56204,8 @@ var hiprint$3 = function(t4) {
56173
56204
  width: 0,
56174
56205
  height: 0
56175
56206
  };
56176
- v3.width = parseFloat(this.target.find("input:first").val() || 0);
56177
- v3.height = parseFloat(this.target.find("input:last").val() || 0);
56207
+ v3.width = Math.round((parseFloat(this.target.find("input:first").val() || 0) || 0) * 10) / 10;
56208
+ v3.height = Math.round((parseFloat(this.target.find("input:last").val() || 0) || 0) * 10) / 10;
56178
56209
  return v3;
56179
56210
  }, t5.prototype.setValue = function(t6, el2) {
56180
56211
  this.el = el2.designTarget || el2;
@@ -61501,6 +61532,9 @@ ${i18n.__("转大小写")}
61501
61532
  }, TablePrintElement.prototype.updateDesignViewFromOptions = function() {
61502
61533
  if (this.designTarget) {
61503
61534
  var t4 = this.designTarget.find(".hiprint-printElement-table-content"), e2 = this.getHtml(this.designPaper, void 0, "design");
61535
+ this.designTarget.css("left", this.options.displayLeft());
61536
+ this.designTarget.css("top", this.options.displayTop());
61537
+ this.updateTargetSize(this.designTarget);
61504
61538
  t4.html(""), t4.append(e2[0].target.find(".table-grid-row")), this.printElementType.editable && this.setHitable(), this.setColumnsOptions();
61505
61539
  this.css(this.designTarget, this.getData());
61506
61540
  }
@@ -65441,6 +65475,9 @@ ${i18n.__("转大小写")}
65441
65475
  }, e.prototype.updateDesignViewFromOptions = function() {
65442
65476
  if (this.designTarget) {
65443
65477
  var t4 = this._currenttemplateData;
65478
+ this.designTarget.css("left", this.options.displayLeft());
65479
+ this.designTarget.css("top", this.options.displayTop());
65480
+ this.updateTargetSize(this.designTarget);
65444
65481
  this.css(this.designTarget, t4);
65445
65482
  this.updateTargetHtml();
65446
65483
  }
@@ -73901,6 +73938,7 @@ ${i18n.__("转大小写")}
73901
73938
  }]);
73902
73939
  var defaultElementTypeProvider$1 = defaultTypeProvider(hiprint$3);
73903
73940
  (function($2) {
73941
+ var corePrintCss = "<style>" + hiprintCss + "</style><style>" + printLockCss + "</style>";
73904
73942
  $2.fn.hiwprint = function(options2) {
73905
73943
  var usedFrame = document.getElementById("hiwprint_iframe");
73906
73944
  if (usedFrame)
@@ -73908,7 +73946,7 @@ var defaultElementTypeProvider$1 = defaultTypeProvider(hiprint$3);
73908
73946
  var opt2 = $2.extend({}, $2.fn.hiwprint.defaults, options2);
73909
73947
  var $element = this;
73910
73948
  var $iframe = $2('<iframe id="hiwprint_iframe" style="visibility: hidden; height: 0; width: 0; position: absolute;"></iframe>');
73911
- var css = "<style>" + hiprintCss + "</style><style>" + printLockCss + "</style>";
73949
+ var css = "";
73912
73950
  if (opt2.importCss) {
73913
73951
  if (opt2.styleHandler) {
73914
73952
  css += opt2.styleHandler();
@@ -73947,6 +73985,7 @@ var defaultElementTypeProvider$1 = defaultTypeProvider(hiprint$3);
73947
73985
  });
73948
73986
  }
73949
73987
  }
73988
+ css += corePrintCss;
73950
73989
  $iframe[0].srcdoc = '<!DOCTYPE html><html><head><title></title><meta charset="UTF-8">' + css + "</head><body></body></html>";
73951
73990
  $iframe[0].onload = function() {
73952
73991
  var printDocument = $iframe[0].contentWindow || $iframe[0].contentDocument;
@@ -77291,7 +77330,7 @@ async function ensureHttpClient() {
77291
77330
  }
77292
77331
  const name = "vg-print-vue2";
77293
77332
  const description = "vg-print supports visual drag and drop design templates, with functions such as previewing and exporting PDFs/images. Silent printing can be achieved in conjunction with a dedicated client";
77294
- const version = "1.0.313";
77333
+ const version = "1.0.314";
77295
77334
  const author = "gmcSimple";
77296
77335
  const license = "MIT";
77297
77336
  const main = "dist/vg-print-vue2.cjs.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vg-print-vue2",
3
3
  "description": "vg-print supports visual drag and drop design templates, with functions such as previewing and exporting PDFs/images. Silent printing can be achieved in conjunction with a dedicated client",
4
- "version": "1.0.313",
4
+ "version": "1.0.314",
5
5
  "author": "gmcSimple",
6
6
  "license": "MIT",
7
7
  "main": "dist/vg-print-vue2.cjs.js",