ztxkui 4.2.16 → 4.2.18

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.
@@ -64,7 +64,9 @@ import { Button, Spin, message, Modal, Dropdown, Menu } from '../../index';
64
64
  import PrintModal from './PrintModal';
65
65
  // 其他文件
66
66
  import { printCurrentDom, htmlToPdfNoCanvas, htmlToPdf, addWaterHandle, removeWaterHandle, htmlToPdfUseCanvas, } from 'ztxkutils/dist/print';
67
- import { createDownloadUrlNoBase, createDownloadUrl, } from 'ztxkutils/dist/fileOperation';
67
+ import {
68
+ // createDownloadUrlNoBase,
69
+ createDownloadUrl, } from 'ztxkutils/dist/fileOperation';
68
70
  import { dataURLtoFile, setPositionLocal, getPositionLocal, setPositionDom, setPositionDeviation, useInitSetPostion, } from './handle';
69
71
  import { autoSealThenDownloadFilesHandle } from './service';
70
72
  import { createTask } from './lodop';
@@ -87,17 +89,24 @@ var loadSealPromise = null;
87
89
  function downloadFontTTF(_a) {
88
90
  var fileId = _a.fileId, request = _a.request;
89
91
  // 下载字体文件
90
- return request({
91
- url: createDownloadUrlNoBase(fileId),
92
- method: 'GET',
93
- }).then(function (res) {
94
- if (res.data) {
95
- fontTTF = res === null || res === void 0 ? void 0 : res.data;
92
+ return import('./text.json').then(function (res) {
93
+ if (res === null || res === void 0 ? void 0 : res.default) {
94
+ fontTTF = res === null || res === void 0 ? void 0 : res.default;
96
95
  }
97
96
  else {
98
97
  throw Error('字体包下载失败');
99
98
  }
100
99
  });
100
+ // return request({
101
+ // url: createDownloadUrlNoBase(fileId),
102
+ // method: 'GET',
103
+ // }).then((res) => {
104
+ // if (res.data) {
105
+ // fontTTF = res?.data;
106
+ // } else {
107
+ // throw Error('字体包下载失败');
108
+ // }
109
+ // });
101
110
  }
102
111
  var PrintContainer = function (_a) {
103
112
  var children = _a.children, waterText = _a.waterText, onFonsizeChange = _a.onFonsizeChange, hiddenClassName = _a.hiddenClassName, _b = _a.isAddExportPage, isAddExportPage = _b === void 0 ? false : _b, _c = _a.loading, loading = _c === void 0 ? false : _c, _d = _a.pdfName, pdfName = _d === void 0 ? 'pdf文件' : _d, request = _a.request, sealIdList = _a.sealIdList, _e = _a.showHandSeal, showHandSeal = _e === void 0 ? true : _e, _f = _a.showAutoSeal, showAutoSeal = _f === void 0 ? true : _f, _g = _a.needWatermark, needWatermark = _g === void 0 ? 0 : _g, fileId = _a.fileId, deptId = _a.deptId, flowId = _a.flowId, imgWaterBg = _a.imgWaterBg, onPrintCallback = _a.onPrintCallback, showPrintMessage = _a.showPrintMessage, onPrintBeforeCallback = _a.onPrintBeforeCallback, _h = _a.showPrintBtn, showPrintBtn = _h === void 0 ? true : _h, _j = _a.showPluginPrintBtn, showPluginPrintBtn = _j === void 0 ? true : _j, isUseXy = _a.isUseXy, localKey = _a.localKey, _k = _a.showExportBtn, showExportBtn = _k === void 0 ? true : _k, showSetFontBtn = _a.showSetFontBtn, isSetPosition = _a.isSetPosition, // 默认不需要偏移