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.
@@ -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 ZtConfigProvider from '../ZtConfigProvider';
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(ZtConfigProvider).printContainer;
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: string;
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;
@@ -2,6 +2,9 @@ import React from 'react';
2
2
  var ztxkConfig = {
3
3
  apiBaseUrl: '',
4
4
  fileBaseUrl: '',
5
+ printContainer: {
6
+ print: false,
7
+ },
5
8
  };
6
9
  var ZtxkContext = React.createContext(ztxkConfig);
7
10
  export default ZtxkContext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "10.0.57",
3
+ "version": "10.0.59",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- declare const ZtConfigProvider: React.Context<{
3
- /** 是否通过外部传入值开启打印契约锁 */
4
- printContainer: {
5
- print: boolean;
6
- };
7
- }>;
8
- export default ZtConfigProvider;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- var ZtConfigProvider = React.createContext({
3
- /** 是否通过外部传入值开启打印契约锁 */
4
- printContainer: {
5
- print: false,
6
- },
7
- });
8
- export default ZtConfigProvider;