ztxkui 10.0.57 → 10.0.59
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/components/PrintContainer/print-container.js +2 -2
- package/dist/components/utils/ZtxkContext.d.ts +5 -1
- package/dist/components/utils/ZtxkContext.js +3 -0
- package/package.json +1 -1
- package/dist/components/ZtConfigProvider/index.d.ts +0 -8
- package/dist/components/ZtConfigProvider/index.js +0 -8
|
@@ -74,7 +74,7 @@ import { useMoveImg } from './hooks';
|
|
|
74
74
|
import { useGetSealList, useAddSealImg } from './sealHooks';
|
|
75
75
|
import { useAboutExport } from './useAboutExport';
|
|
76
76
|
import useFont, { fontTTF } from './useFont';
|
|
77
|
-
import
|
|
77
|
+
import ZtxkContext from '../utils/ZtxkContext';
|
|
78
78
|
// a4纸 标准大小 pt 595.28 841.89
|
|
79
79
|
// mm 210 297
|
|
80
80
|
var PAGEFORMAT = [1050, 1050]; // [1050, 1050]
|
|
@@ -84,7 +84,7 @@ var EXPORT_PDF_PAGEFORMATL = [841.89, 595.28]; // [595.28, 641.89]
|
|
|
84
84
|
var PrintContainer = function (_a) {
|
|
85
85
|
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, // 默认不需要偏移
|
|
86
86
|
showAddSeal = _a.showAddSeal, apiUrl = _a.apiUrl, defaultAddWater = _a.defaultAddWater, fileBaseUrl = _a.fileBaseUrl, ecPrintFn = _a.ecPrintFn, ecPrintCreatePdfHandleAfter = _a.ecPrintCreatePdfHandleAfter, clickCreatePdfHandlePre = _a.clickCreatePdfHandlePre, clickCreatePdfHandleNext = _a.clickCreatePdfHandleNext, handleRef = _a.handleRef, showAboutExport = _a.showAboutExport, isAboutExportSeal = _a.isAboutExportSeal, onAboutExportBeforeCallback = _a.onAboutExportBeforeCallback, showAboutExportMessage = _a.showAboutExportMessage, onAboutExportCallback = _a.onAboutExportCallback, aboutExportZipName = _a.aboutExportZipName, aboutExportAddWater = _a.aboutExportAddWater, buttonRender = _a.buttonRender, isPhone = _a.isPhone, showWaterBtn = _a.showWaterBtn;
|
|
87
|
-
var printContainer = React.useContext(
|
|
87
|
+
var printContainer = React.useContext(ZtxkContext).printContainer;
|
|
88
88
|
if (!printContainer.print) {
|
|
89
89
|
showHandSeal = false;
|
|
90
90
|
showAutoSeal = false;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface IZtxkConfig {
|
|
3
|
-
apiBaseUrl
|
|
3
|
+
apiBaseUrl?: string;
|
|
4
4
|
fileBaseUrl?: string;
|
|
5
|
+
/** 是否通过外部传入值开启打印契约锁 */
|
|
6
|
+
printContainer?: {
|
|
7
|
+
print: boolean;
|
|
8
|
+
};
|
|
5
9
|
}
|
|
6
10
|
declare const ZtxkContext: React.Context<IZtxkConfig>;
|
|
7
11
|
export default ZtxkContext;
|
package/package.json
CHANGED