ts-glitter 22.1.2 → 22.1.3

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/lowcode/Entry.js CHANGED
@@ -154,7 +154,7 @@ export class Entry {
154
154
  }
155
155
  window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
156
156
  console.log(`Entry-time:`, window.renderClock.stop());
157
- glitter.share.editerVersion = 'V_22.1.2';
157
+ glitter.share.editerVersion = 'V_22.1.3';
158
158
  glitter.share.start = new Date();
159
159
  const vm = { appConfig: [] };
160
160
  window.saasConfig = {
package/lowcode/Entry.ts CHANGED
@@ -159,7 +159,7 @@ export class Entry {
159
159
  }
160
160
  (window as any).renderClock = (window as any).renderClock ?? createClock();
161
161
  console.log(`Entry-time:`, (window as any).renderClock.stop());
162
- glitter.share.editerVersion = 'V_22.1.2';
162
+ glitter.share.editerVersion = 'V_22.1.3';
163
163
  glitter.share.start = new Date();
164
164
  const vm = { appConfig: [] };
165
165
  (window as any).saasConfig = {
@@ -104,8 +104,8 @@ export class Glitter {
104
104
  </html>
105
105
  `);
106
106
  printWindow.document.querySelector('img').onload = function () {
107
- printWindow.focus();
108
- printWindow.print();
107
+ printWindow.document.close();
108
+ setTimeout(() => printWindow.print(), 200);
109
109
  printWindow.onafterprint = () => printWindow.close();
110
110
  };
111
111
  },
@@ -781,8 +781,11 @@ ${(!error.message) ? `` : `錯誤訊息:${error.message}`}${(!error.lineNumber)
781
781
 
782
782
  // 等待圖片加載完成後執行列印
783
783
  printWindow.document.querySelector('img').onload = function() {
784
- printWindow.focus();
785
- printWindow.print();
784
+ printWindow.document.close();
785
+
786
+ // 啟動列印功能
787
+ setTimeout(() => printWindow.print(), 200);
788
+
786
789
  // 選擇性:列印後關閉視窗
787
790
  printWindow.onafterprint = () => printWindow.close();
788
791
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-glitter",
3
- "version": "22.1.2",
3
+ "version": "22.1.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {