vg-print 1.0.361 → 1.0.362

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.
@@ -52803,7 +52803,7 @@ var i18n$1 = {
52803
52803
  var je = this;
52804
52804
  this.designTarget.hidraggable({
52805
52805
  // 添加 draggable 属性
52806
- draggable: je.options.draggable,
52806
+ draggable: je.options.draggable === void 0 ? !0 : je.options.draggable,
52807
52807
  axis: je.options.axis ? je.options.axis : void 0,
52808
52808
  designTarget: je,
52809
52809
  onDrag: function(Ee, Se, Te) {
@@ -54210,7 +54210,7 @@ var i18n$1 = {
54210
54210
  <div class="hiprint-option-item-field">
54211
54211
  <select class="auto-submit">
54212
54212
  <option value="" >${i18n$1.__("默认")}</option>
54213
- <option value="" >${i18n$1.__("居左")}</option>
54213
+ <option value="left" >${i18n$1.__("居左")}</option>
54214
54214
  <option value="center" >${i18n$1.__("居中")}</option>
54215
54215
  <option value="right" >${i18n$1.__("居右")}</option>
54216
54216
  <option value="justify" >${i18n$1.__("两端对齐")}</option>
@@ -54794,7 +54794,7 @@ var i18n$1 = {
54794
54794
  </div>`), this.target;
54795
54795
  }, gr.prototype.getValue = function() {
54796
54796
  var nr = this.target.find("input").val();
54797
- if (nr) return nr.toString();
54797
+ return !nr || nr === "#" ? "" : nr.toString();
54798
54798
  }, gr.prototype.setValue = function(nr) {
54799
54799
  this.target.find("input").minicolors({
54800
54800
  defaultValue: nr || "",
@@ -55418,7 +55418,7 @@ var i18n$1 = {
55418
55418
  return gr.prototype.css = function(nr, Zr) {
55419
55419
  if (nr && nr.length) {
55420
55420
  if (Zr) return nr.css("color", Zr), "color:" + Zr;
55421
- nr[0].style.color = "";
55421
+ nr.css("color", ""), nr[0].style.color = "";
55422
55422
  }
55423
55423
  return null;
55424
55424
  }, gr.prototype.createTarget = function() {
@@ -55428,11 +55428,14 @@ var i18n$1 = {
55428
55428
  </div>
55429
55429
  <div class="hiprint-option-item-field">
55430
55430
  <input type="text" class="auto-submit"/>
55431
+ <span class="hiprint-bg-clear" style="position: absolute;right: 25px;top: 4px;cursor: pointer;color: #ccc;z-index: 10; font-family: sans-serif; font-size: 12px;">X</span>
55431
55432
  </div>
55432
- </div>`), this.target;
55433
+ </div>`), this.target.find(".hiprint-bg-clear").click(function() {
55434
+ $$h(this).parent().find("input").minicolors("value", ""), $$h(this).parent().find("input").val("").trigger("change");
55435
+ }), this.target;
55433
55436
  }, gr.prototype.getValue = function() {
55434
55437
  var nr = this.target.find("input").val();
55435
- if (nr) return nr.toString();
55438
+ return !nr || nr === "#" ? "" : nr.toString();
55436
55439
  }, gr.prototype.setValue = function(nr) {
55437
55440
  this.target.find("input").minicolors({
55438
55441
  defaultValue: nr || "",
@@ -55808,7 +55811,7 @@ var i18n$1 = {
55808
55811
  }), this.target;
55809
55812
  }, gr.prototype.getValue = function() {
55810
55813
  var nr = this.target.find("input").val();
55811
- if (nr) return nr.toString();
55814
+ return !nr || nr === "#" ? "" : nr.toString();
55812
55815
  }, gr.prototype.setValue = function(nr) {
55813
55816
  this.target.find("input").val(nr);
55814
55817
  }, gr.prototype.refresh = function(nr, Zr, _n) {
@@ -55962,21 +55965,16 @@ var i18n$1 = {
55962
55965
  return gr.prototype.css = function(nr, Zr) {
55963
55966
  if (nr && nr.length) {
55964
55967
  if (Zr) return nr.css("background-color", Zr), "background-color:" + Zr;
55965
- nr[0].style.backgroundColor = "";
55968
+ nr.css("background-color", ""), nr[0].style.backgroundColor = "", nr.css("background", ""), nr[0].style.background = "";
55966
55969
  }
55967
55970
  return null;
55968
55971
  }, gr.prototype.createTarget = function() {
55969
- return this.target = $$h(`<div class="hiprint-option-item">
55970
- <div class="hiprint-option-item-label">
55971
- ${i18n$1.__("背景颜色")}
55972
- </div>
55973
- <div class="hiprint-option-item-field">
55974
- <input type="text" class="auto-submit"/>
55975
- </div>
55976
- </div>`), this.target;
55972
+ return this.target = $$h(`<div class="hiprint-option-item"><div class="hiprint-option-item-label">${i18n$1.__("背景颜色")}</div><div class="hiprint-option-item-field"><input type="text" class="auto-submit"/><span class="hiprint-bg-clear" style="position: absolute;right: 25px;top: 4px;cursor: pointer;color: #ccc;z-index: 10; font-family: sans-serif; font-size: 12px;">X</span></div></div>`), this.target.find(".hiprint-bg-clear").click(function() {
55973
+ $$h(this).parent().find("input").minicolors("value", ""), $$h(this).parent().find("input").val("").trigger("change");
55974
+ }), this.target;
55977
55975
  }, gr.prototype.getValue = function() {
55978
55976
  var nr = this.target.find("input").val();
55979
- if (nr) return nr.toString();
55977
+ return !nr || nr === "#" ? "" : nr.toString();
55980
55978
  }, gr.prototype.setValue = function(nr) {
55981
55979
  this.target.find("input").minicolors({
55982
55980
  defaultValue: nr || "",
@@ -57149,6 +57147,7 @@ var i18n$1 = {
57149
57147
  <div class="hiprint-option-item-field">
57150
57148
  <select class="auto-submit">
57151
57149
  <option value="" >${i18n$1.__("默认")}</option>
57150
+ <option value="top" >${i18n$1.__("居顶")}</option>
57152
57151
  <option value="middle" >${i18n$1.__("垂直居中")}</option>
57153
57152
  <option value="bottom" >${i18n$1.__("底部")}</option>
57154
57153
 
@@ -60853,7 +60852,7 @@ ${i18n$1.__("转大小写")}
60853
60852
  Se.append('<span class="title">' + Ee.name + "</span>");
60854
60853
  var Te = $$h("<ul></ul>");
60855
60854
  Se.append(Te), Ee.printElementTypes.forEach(function(Pe) {
60856
- Te.append('<li><a class="ep-draggable-item" tid="' + Pe.tid + '"> ' + Pe.getText() + " </a></li>");
60855
+ Te.append('<li><a class="ep-draggable-item" tid="' + Pe.tid + '" draggable="true"> ' + Pe.getText() + " </a></li>");
60857
60856
  }), Be.append(Se);
60858
60857
  }), $$h(Ae).append(Be), Be.find(".ep-draggable-item");
60859
60858
  }, Ie;
@@ -61519,7 +61518,7 @@ ${i18n$1.__("转大小写")}
61519
61518
  var Be = Ie.prototype.getDesignTarget.call(this, je);
61520
61519
  return Be.find(".hiprint-printElement-html-content").css("border", "1px dashed #999"), Be;
61521
61520
  }, Ae.prototype.updateTargetStyle = function(je) {
61522
- this.options.textAlign && je.css("text-align", this.options.textAlign), this.options.lineHeight && je.css("line-height", this.options.lineHeight + "pt"), this.options.fontFamily && je.css("font-family", this.options.fontFamily), this.options.fontSize && je.css("font-size", this.options.fontSize + "pt"), this.options.fontWeight && je.css("font-weight", this.options.fontWeight), this.options.letterSpacing && je.css("letter-spacing", this.options.letterSpacing + "pt"), this.options.color && je.css("color", this.options.color), this.options.backgroundColor && je.css("background-color", this.options.backgroundColor);
61521
+ this.options.textAlign ? je.css("text-align", this.options.textAlign) : je.css("text-align", ""), this.options.lineHeight ? je.css("line-height", this.options.lineHeight + "pt") : je.css("line-height", ""), this.options.fontFamily ? je.css("font-family", this.options.fontFamily) : je.css("font-family", ""), this.options.fontSize ? je.css("font-size", this.options.fontSize + "pt") : je.css("font-size", ""), this.options.fontWeight ? je.css("font-weight", this.options.fontWeight) : je.css("font-weight", ""), this.options.letterSpacing ? je.css("letter-spacing", this.options.letterSpacing + "pt") : je.css("letter-spacing", ""), this.options.color ? je.css("color", this.options.color) : je.css("color", ""), this.options.backgroundColor ? je.css("background-color", this.options.backgroundColor) : je.css("background-color", "");
61523
61522
  }, Ae.prototype.updateDesignViewFromOptions = function() {
61524
61523
  if (this.designTarget) {
61525
61524
  var je = this._currenttemplateData;
@@ -66427,7 +66426,7 @@ ${i18n$1.__("转大小写")}
66427
66426
  }
66428
66427
  };
66429
66428
  })();
66430
- const version = "1.0.361";
66429
+ const version = "1.0.362";
66431
66430
  let autoConnect$1 = function(Ie) {
66432
66431
  console.log("autoConnect"), window.autoConnect = !0, window.hiwebSocket && window.hiwebSocket.hasIo() && window.hiwebSocket.start(Ie);
66433
66432
  }, disAutoConnect$1 = function() {
@@ -85519,8 +85518,7 @@ const t = (Ie) => i18n && i18n.global && typeof i18n.global.t == "function" ? i1
85519
85518
  height: 17,
85520
85519
  fontSize: 16.5,
85521
85520
  fontWeight: "700",
85522
- textAlign: "center",
85523
- hideTitle: !0
85521
+ textAlign: "center"
85524
85522
  }
85525
85523
  },
85526
85524
  {
@@ -85533,8 +85531,7 @@ const t = (Ie) => i18n && i18n.global && typeof i18n.global.t == "function" ? i1
85533
85531
  height: 16,
85534
85532
  fontSize: 15,
85535
85533
  fontWeight: "700",
85536
- textAlign: "center",
85537
- hideTitle: !0
85534
+ textAlign: "center"
85538
85535
  }
85539
85536
  },
85540
85537
  {
@@ -85605,8 +85602,7 @@ const t = (Ie) => i18n && i18n.global && typeof i18n.global.t == "function" ? i1
85605
85602
  height: 17,
85606
85603
  fontSize: 16.5,
85607
85604
  fontWeight: "700",
85608
- textAlign: "center",
85609
- hideTitle: !0
85605
+ textAlign: "center"
85610
85606
  }
85611
85607
  },
85612
85608
  {