ztxkui 3.5.6 → 3.5.7
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/DemoCom/PrintContainerDemo.js +54 -28
- package/dist/UploadDemo.js +1 -3
- package/dist/components/PrintContainer/lodop.d.ts +12 -0
- package/dist/components/PrintContainer/lodop.js +43 -0
- package/dist/components/PrintContainer/print-container.d.ts +3 -1
- package/dist/components/PrintContainer/print-container.js +82 -32
- package/dist/components/business/Signatures/components/QunjSeal.js +2 -2
- package/dist/components/business/Signatures/index.js +9 -14
- package/dist/index.js +84 -114
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
17
17
|
// redux
|
|
18
18
|
// ztxkui公共组件
|
|
19
19
|
import { PrintContainer } from '../index';
|
|
20
|
+
// import Table, { ColumnsType } from 'components/Table';
|
|
20
21
|
// 路由配置
|
|
21
22
|
// store
|
|
22
23
|
// 自定义组件
|
|
@@ -44,41 +45,66 @@ var dataSource1 = new Array(10).fill('1').map(function (item, index) { return ({
|
|
|
44
45
|
id: "" + index,
|
|
45
46
|
}); });
|
|
46
47
|
var PrintContainerDemo = function () {
|
|
47
|
-
|
|
48
|
+
// const [dataSource, setDataSource] = useState([]);
|
|
49
|
+
var _a = useState([]), setDataSource = _a[1];
|
|
48
50
|
var _b = useState(true), loading = _b[0], setLoading = _b[1];
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
];
|
|
51
|
+
// const columns: ColumnsType<any> = [
|
|
52
|
+
// {
|
|
53
|
+
// title: '测试一',
|
|
54
|
+
// width: 100,
|
|
55
|
+
// dataIndex: 'test1',
|
|
56
|
+
// key: 'test1',
|
|
57
|
+
// },
|
|
58
|
+
// {
|
|
59
|
+
// title: '测试一',
|
|
60
|
+
// width: 100,
|
|
61
|
+
// dataIndex: 'test2',
|
|
62
|
+
// key: 'test2',
|
|
63
|
+
// },
|
|
64
|
+
// {
|
|
65
|
+
// title: '测试一',
|
|
66
|
+
// width: 100,
|
|
67
|
+
// dataIndex: 'test3',
|
|
68
|
+
// key: 'test3',
|
|
69
|
+
// },
|
|
70
|
+
// {
|
|
71
|
+
// title: '测试一',
|
|
72
|
+
// width: 100,
|
|
73
|
+
// dataIndex: 'test4',
|
|
74
|
+
// key: 'test4',
|
|
75
|
+
// },
|
|
76
|
+
// ];
|
|
75
77
|
useEffect(function () {
|
|
76
78
|
setTimeout(function () {
|
|
77
79
|
setLoading(false);
|
|
78
80
|
setDataSource(dataSource1);
|
|
79
81
|
}, 1000);
|
|
80
82
|
}, []);
|
|
81
|
-
return (React.createElement(PrintContainer, { isAddExportPage: true, loading: loading, request: request, deptId: "1527122794329313281", flowId: "scm_print_thd", fileId: "1551837561144905730", keywordList: keywordList, imgWaterBg: water
|
|
83
|
+
return (React.createElement(PrintContainer, { isAddExportPage: true, loading: loading, request: request, deptId: "1527122794329313281", flowId: "scm_print_thd", fileId: "1551837561144905730", keywordList: keywordList, imgWaterBg: water, showPrintMessage: true,
|
|
84
|
+
// onPrintBeforeCallback={() => {
|
|
85
|
+
// setLoading(true);
|
|
86
|
+
// return new Promise((resolve, reject) => {
|
|
87
|
+
// setTimeout(() => {
|
|
88
|
+
// setLoading(false);
|
|
89
|
+
// // 这样子会导致不会执行
|
|
90
|
+
// // reject(false);
|
|
91
|
+
// // 这样子会执行
|
|
92
|
+
// resolve(true);
|
|
93
|
+
// }, 2000);
|
|
94
|
+
// });
|
|
95
|
+
// }}
|
|
96
|
+
onPrintCallback: function () {
|
|
97
|
+
setLoading(true);
|
|
98
|
+
return new Promise(function (resolve, reject) {
|
|
99
|
+
setTimeout(function () {
|
|
100
|
+
setLoading(false);
|
|
101
|
+
// 这样子不会执行
|
|
102
|
+
// reject(false);
|
|
103
|
+
// 这样子会执行
|
|
104
|
+
resolve(true);
|
|
105
|
+
}, 0);
|
|
106
|
+
});
|
|
107
|
+
} },
|
|
82
108
|
React.createElement("div", null,
|
|
83
109
|
React.createElement("div", { className: "html2canvas-container-page simple-print" },
|
|
84
110
|
React.createElement("div", { className: "print-header" },
|
package/dist/UploadDemo.js
CHANGED
|
@@ -210,9 +210,7 @@ function UploadDemo() {
|
|
|
210
210
|
showPreviewIcon: true,
|
|
211
211
|
showDownloadIcon: true,
|
|
212
212
|
showRemoveIcon: true,
|
|
213
|
-
}, apiBaseUrl: "http://192.168.0.83:8888", fileBaseUrl: "http://192.168.0.83:88", showTable: false, showTip: false, originFileList: fileList1, maxCount: 1, callback: uploadCallbackFn,
|
|
214
|
-
console.log(1111);
|
|
215
|
-
}, onDeleteCallback: function (index, file) {
|
|
213
|
+
}, apiBaseUrl: "http://192.168.0.83:8888", fileBaseUrl: "http://192.168.0.83:88", showTable: false, showTip: false, originFileList: fileList1, maxCount: 1, callback: uploadCallbackFn, onDeleteCallback: function (index, file) {
|
|
216
214
|
console.log(index, file);
|
|
217
215
|
}, authToken: token }),
|
|
218
216
|
React.createElement("button", { onClick: checkHandle }, "\u68C0\u67E5"),
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { getLodop } from './utils';
|
|
2
|
+
/**
|
|
3
|
+
* 创建打印任务
|
|
4
|
+
* @param {*} taskName 任务名称
|
|
5
|
+
* @param {*} width 纸张宽度
|
|
6
|
+
* @param {*} height 纸张高度
|
|
7
|
+
*/
|
|
8
|
+
var createTask = function (_a) {
|
|
9
|
+
var taskName = _a.taskName, width = _a.width, height = _a.height;
|
|
10
|
+
var config = Object.assign({}, {
|
|
11
|
+
taskName: taskName,
|
|
12
|
+
width: width,
|
|
13
|
+
height: height,
|
|
14
|
+
});
|
|
15
|
+
var LODOP = getLodop();
|
|
16
|
+
// 打印检查安装,必装
|
|
17
|
+
CheckIsInstall(LODOP);
|
|
18
|
+
// 任务名称
|
|
19
|
+
LODOP.PRINT_INIT(config.taskName);
|
|
20
|
+
// 展示模式
|
|
21
|
+
LODOP.SET_SHOW_MODE('NP_NO_RESULT', true);
|
|
22
|
+
// 纸张大小 intOrient,intPageWidth,intPageHeight,strPageName
|
|
23
|
+
LODOP.SET_PRINT_PAGESIZE(0, width, height, 'Note');
|
|
24
|
+
return LODOP;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 打印检查安装,必装
|
|
28
|
+
*/
|
|
29
|
+
var CheckIsInstall = function (LODOP) {
|
|
30
|
+
try {
|
|
31
|
+
if (LODOP.VERSION) {
|
|
32
|
+
if (LODOP.CVERSION) {
|
|
33
|
+
// alert('当前有WEB打印服务C-Lodop可用!\n C-Lodop版本:' + LODOP.CVERSION + '(内含Lodop' + LODOP.VERSION + ')') } else { alert('本机已成功安装了Lodop控件!\n 版本号:' + LODOP.VERSION)
|
|
34
|
+
// Vue.prototype.$message('当前有WEB打印服务C-Lodop可用' + LODOP.CVERSION)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
console.log('安装lodop');
|
|
40
|
+
window.open('http://www.lodop.net/download.html');
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export { createTask };
|
|
@@ -38,8 +38,10 @@ export interface IProps {
|
|
|
38
38
|
flowId?: string;
|
|
39
39
|
/** 水印图片 */
|
|
40
40
|
imgWaterBg?: string;
|
|
41
|
+
/** 点击打印前端的回调函数 */
|
|
42
|
+
onPrintBeforeCallback?: () => Promise<any> | void;
|
|
41
43
|
/** 点击打印的回调函数 */
|
|
42
|
-
onPrintCallback?: () => void;
|
|
44
|
+
onPrintCallback?: () => Promise<any> | void;
|
|
43
45
|
/** 是否添加点击打印提示 */
|
|
44
46
|
showPrintMessage?: boolean;
|
|
45
47
|
}
|
|
@@ -75,7 +75,7 @@ function downloadFontTTF(_a) {
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
var PrintContainer = function (_a) {
|
|
78
|
-
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, autoSealIdList = _a.autoSealIdList, keywordList = _a.keywordList, _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;
|
|
78
|
+
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, autoSealIdList = _a.autoSealIdList, keywordList = _a.keywordList, _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;
|
|
79
79
|
var _h = useState(false), showWater = _h[0], setShowWater = _h[1];
|
|
80
80
|
var containerRef = useRef();
|
|
81
81
|
var allDomRef = useRef();
|
|
@@ -230,39 +230,89 @@ var PrintContainer = function (_a) {
|
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
232
|
// 打印
|
|
233
|
-
var onPrintHandle = function () {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
233
|
+
var onPrintHandle = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
234
|
+
var result, err_1, isOkSure_1;
|
|
235
|
+
return __generator(this, function (_a) {
|
|
236
|
+
switch (_a.label) {
|
|
237
|
+
case 0:
|
|
238
|
+
result = true;
|
|
239
|
+
if (!onPrintBeforeCallback) return [3 /*break*/, 4];
|
|
240
|
+
_a.label = 1;
|
|
241
|
+
case 1:
|
|
242
|
+
_a.trys.push([1, 3, , 4]);
|
|
243
|
+
return [4 /*yield*/, onPrintBeforeCallback()];
|
|
244
|
+
case 2:
|
|
245
|
+
result = _a.sent();
|
|
246
|
+
return [3 /*break*/, 4];
|
|
247
|
+
case 3:
|
|
248
|
+
err_1 = _a.sent();
|
|
249
|
+
result = null;
|
|
250
|
+
return [3 /*break*/, 4];
|
|
251
|
+
case 4:
|
|
252
|
+
if (!result) {
|
|
253
|
+
return [2 /*return*/];
|
|
254
|
+
}
|
|
255
|
+
if (showPrintMessage) {
|
|
256
|
+
isOkSure_1 = false;
|
|
257
|
+
Modal.confirm({
|
|
258
|
+
title: '打印提示',
|
|
259
|
+
content: '点击确认按钮后,将作为一次成功的打印,并记录到系统!你确认要打印吗?',
|
|
260
|
+
okText: '确认',
|
|
261
|
+
onOk: function () {
|
|
262
|
+
if (onPrintCallback) {
|
|
263
|
+
var result_1 = onPrintCallback();
|
|
264
|
+
if (result_1 instanceof Promise) {
|
|
265
|
+
var startTime_1 = Date.now();
|
|
266
|
+
result_1.then(function (res) {
|
|
267
|
+
if (res) {
|
|
268
|
+
if (Date.now() - startTime_1 > 1000) {
|
|
269
|
+
isOkSure_1 = true;
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
setTimeout(function () {
|
|
273
|
+
printCurrentDom({
|
|
274
|
+
hiddenClassNames: __spreadArray([
|
|
275
|
+
'.print-container--header'
|
|
276
|
+
], (hiddenClassName || [])),
|
|
277
|
+
});
|
|
278
|
+
}, 1000);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
isOkSure_1 = true;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
isOkSure_1 = true;
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
afterClose: function () {
|
|
292
|
+
if (isOkSure_1) {
|
|
293
|
+
setTimeout(function () {
|
|
294
|
+
printCurrentDom({
|
|
295
|
+
hiddenClassNames: __spreadArray([
|
|
296
|
+
'.print-container--header'
|
|
297
|
+
], (hiddenClassName || [])),
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
},
|
|
252
302
|
});
|
|
253
303
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
};
|
|
304
|
+
else {
|
|
305
|
+
onPrintCallback && onPrintCallback();
|
|
306
|
+
printCurrentDom({
|
|
307
|
+
hiddenClassNames: __spreadArray([
|
|
308
|
+
'.print-container--header'
|
|
309
|
+
], (hiddenClassName || [])),
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
return [2 /*return*/];
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
}); };
|
|
266
316
|
// 生成pdf
|
|
267
317
|
var onPdfHandle = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
268
318
|
var html2canvasDom;
|
|
@@ -26,11 +26,11 @@ var QunjSeal = function (_a) {
|
|
|
26
26
|
var value = _a.value, onChange = _a.onChange, isEdit = _a.isEdit, showContranctNum = _a.showContranctNum, sealList = _a.sealList, handleRef = _a.handleRef, checked = _a.checked, form = _a.form, setQunjSeal = _a.setQunjSeal;
|
|
27
27
|
useEffect(function () {
|
|
28
28
|
if (value) {
|
|
29
|
-
var _value = __assign(__assign(__assign({}, value), { isTakeOut: "" + value.isTakeOut === '1' ? 1 : 0 }), (value.contranctNum ? {} : { contranctNum: 1 }));
|
|
29
|
+
var _value = __assign(__assign(__assign({}, value), { isTakeOut: "" + value.isTakeOut === '1' ? 1 : 0 }), (value.contranctNum || !showContranctNum ? {} : { contranctNum: 1 }));
|
|
30
30
|
form.setFieldsValue(_value);
|
|
31
31
|
setQunjSeal(_value);
|
|
32
32
|
}
|
|
33
|
-
}, [value, form, setQunjSeal]);
|
|
33
|
+
}, [value, form, setQunjSeal, showContranctNum]);
|
|
34
34
|
var onSealCheckboxHandle = function (values) {
|
|
35
35
|
form.setFieldsValue({
|
|
36
36
|
values: values,
|
|
@@ -107,18 +107,12 @@ var Sinatures = function (_a) {
|
|
|
107
107
|
var _r = useState(false), loading = _r[0], setLoading = _r[1];
|
|
108
108
|
/** 是否加盖群杰印章 */
|
|
109
109
|
var needQjSealFn = function (e) {
|
|
110
|
+
var _value = __assign(__assign({ isTakeOut: 0 }, (showContranctNum ? { contranctNum: 1 } : {})), { details: [] });
|
|
110
111
|
if (!e.target.checked) {
|
|
111
|
-
|
|
112
|
-
isTakeOut: 0,
|
|
113
|
-
contranctNum: 1,
|
|
114
|
-
details: [],
|
|
115
|
-
});
|
|
116
|
-
qunjSealChangeHandle({
|
|
117
|
-
isTakeOut: 0,
|
|
118
|
-
contranctNum: 1,
|
|
119
|
-
details: [],
|
|
120
|
-
});
|
|
112
|
+
_value.contranctNum = null;
|
|
121
113
|
}
|
|
114
|
+
form.setFieldsValue(_value);
|
|
115
|
+
qunjSealChangeHandle(_value);
|
|
122
116
|
setChecked(e.target.checked);
|
|
123
117
|
};
|
|
124
118
|
/** 查询用印状态 */
|
|
@@ -384,7 +378,7 @@ var Sinatures = function (_a) {
|
|
|
384
378
|
title: '保存为模版',
|
|
385
379
|
key: 'templateAttachId',
|
|
386
380
|
dataIndex: 'templateAttachId',
|
|
387
|
-
width:
|
|
381
|
+
width: 110,
|
|
388
382
|
render: function (text, record, index) {
|
|
389
383
|
return NEED_SAVE_TEMPLATE.includes("" + flowId) ? (React.createElement(Switch, { checked: record.isCustomerReference, disabled: !isEdit, onChange: function (value) {
|
|
390
384
|
return onSwitchChangeHandle(value, 'isCustomerReference', index);
|
|
@@ -408,12 +402,13 @@ var Sinatures = function (_a) {
|
|
|
408
402
|
title: '电子印章',
|
|
409
403
|
key: 'needQys',
|
|
410
404
|
dataIndex: 'needQys',
|
|
405
|
+
width: 610,
|
|
411
406
|
children: [
|
|
412
407
|
{
|
|
413
408
|
title: '盖电子印章',
|
|
414
409
|
key: 'isElectronicSeal',
|
|
415
410
|
dataIndex: 'isElectronicSeal',
|
|
416
|
-
width:
|
|
411
|
+
width: 110,
|
|
417
412
|
render: function (text, record, index) {
|
|
418
413
|
return (React.createElement(Switch, { checked: text, disabled: !isEdit, onChange: function (value) {
|
|
419
414
|
return onSwitchChangeHandle(value, 'isElectronicSeal', index);
|
|
@@ -424,7 +419,7 @@ var Sinatures = function (_a) {
|
|
|
424
419
|
title: '选择电子印章',
|
|
425
420
|
key: 'electronicSeal',
|
|
426
421
|
dataIndex: 'electronicSeal',
|
|
427
|
-
width:
|
|
422
|
+
width: 320,
|
|
428
423
|
render: function (value, row, index) {
|
|
429
424
|
// 是否有勾选加盖电子印章
|
|
430
425
|
var hasElectronicSeal = records === null || records === void 0 ? void 0 : records.some(function (item) { return !!item.isElectronicSeal; });
|
|
@@ -440,7 +435,7 @@ var Sinatures = function (_a) {
|
|
|
440
435
|
title: '电子印章设置',
|
|
441
436
|
key: 'setElectronicSeal',
|
|
442
437
|
dataIndex: 'setElectronicSeal',
|
|
443
|
-
width:
|
|
438
|
+
width: 180,
|
|
444
439
|
render: function (value, row, index) {
|
|
445
440
|
var Comp = function () {
|
|
446
441
|
return records.length !== 0 ? (React.createElement("div", { style: {
|
package/dist/index.js
CHANGED
|
@@ -1,117 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
//
|
|
84
|
-
|
|
85
|
-
// <DragSort />
|
|
86
|
-
// </Route>
|
|
87
|
-
// <Route exact path="/sinatures">
|
|
88
|
-
// <SinaturesDemo />
|
|
89
|
-
// </Route>
|
|
90
|
-
// <Route exact path="/test">
|
|
91
|
-
// <div>
|
|
92
|
-
// <h1>
|
|
93
|
-
// <Link to="/select">select</Link>
|
|
94
|
-
// </h1>
|
|
95
|
-
// <h1>
|
|
96
|
-
// <Link to="/tree-select">tree select</Link>
|
|
97
|
-
// </h1>
|
|
98
|
-
// <h1>
|
|
99
|
-
// <Link to="/tree">tree</Link>
|
|
100
|
-
// </h1>
|
|
101
|
-
// <h1>
|
|
102
|
-
// <Link to="/upload">upload</Link>
|
|
103
|
-
// </h1>
|
|
104
|
-
// <h1>
|
|
105
|
-
// <Link to="/drag-sort">drag-sort</Link>
|
|
106
|
-
// </h1>
|
|
107
|
-
// </div>
|
|
108
|
-
// </Route>
|
|
109
|
-
// </Switch>
|
|
110
|
-
// </BrowserRouter>
|
|
111
|
-
// </ConfigProvider>,
|
|
112
|
-
// // </React.StrictMode>,
|
|
113
|
-
// document.getElementById('root')
|
|
114
|
-
// );
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import App from './App';
|
|
4
|
+
import { ConfigProvider } from 'antd';
|
|
5
|
+
import zhCN from 'antd/lib/locale/zh_CN';
|
|
6
|
+
import * as dayjs from 'dayjs';
|
|
7
|
+
import zhCn from 'dayjs/locale/zh-cn';
|
|
8
|
+
import { BrowserRouter, Switch, Route, Link } from 'react-router-dom';
|
|
9
|
+
import Demo from './Demo';
|
|
10
|
+
import TreeSelectDemo from './TreeSelectDemo';
|
|
11
|
+
import TreeDemo from './TreeDemo';
|
|
12
|
+
import UploadDemo from './UploadDemo';
|
|
13
|
+
import CollapseDemo from './DemoCom/CollapseDemo';
|
|
14
|
+
import TimelineDemo from './DemoCom/TimelineDemo';
|
|
15
|
+
import WeChatDemo from './DemoCom/WechatDemo';
|
|
16
|
+
import TableDemo from './DemoCom/TableDemo';
|
|
17
|
+
import TableDemo1 from './DemoCom/TableDemo1';
|
|
18
|
+
import BasicDemo from './DemoCom/BasicDemo';
|
|
19
|
+
import FormDemo from './DemoCom/FormDemo';
|
|
20
|
+
import TableAnalyse from './DemoCom/TableAnalyse';
|
|
21
|
+
import DragSort from './DemoCom/DragSort';
|
|
22
|
+
import PrintDemo from './DemoCom/PrintDemo';
|
|
23
|
+
import PrintContainerDemo from './DemoCom/PrintContainerDemo';
|
|
24
|
+
import SinaturesDemo from './DemoCom/SinaturesDemo';
|
|
25
|
+
import TableDemoAll from './TableDemo';
|
|
26
|
+
import CodeQueryDemo from './DemoCom/CodeQueryDemo';
|
|
27
|
+
dayjs.locale(zhCn);
|
|
28
|
+
ReactDOM.render(
|
|
29
|
+
// <React.StrictMode>
|
|
30
|
+
React.createElement(ConfigProvider, { locale: zhCN },
|
|
31
|
+
React.createElement(BrowserRouter, null,
|
|
32
|
+
React.createElement(Switch, null,
|
|
33
|
+
React.createElement(Route, { exact: true, path: "/" },
|
|
34
|
+
React.createElement(App, null)),
|
|
35
|
+
React.createElement(Route, { exact: true, path: "/code-query" },
|
|
36
|
+
React.createElement(CodeQueryDemo, null)),
|
|
37
|
+
React.createElement(Route, { exact: true, path: "/select" },
|
|
38
|
+
React.createElement(Demo, null)),
|
|
39
|
+
React.createElement(Route, { exact: true, path: "/tree-select" },
|
|
40
|
+
React.createElement(TreeSelectDemo, null)),
|
|
41
|
+
React.createElement(Route, { exact: true, path: "/tree" },
|
|
42
|
+
React.createElement(TreeDemo, null)),
|
|
43
|
+
React.createElement(Route, { exact: true, path: "/upload" },
|
|
44
|
+
React.createElement(UploadDemo, null)),
|
|
45
|
+
React.createElement(Route, { exact: true, path: "/collapse" },
|
|
46
|
+
React.createElement(CollapseDemo, null)),
|
|
47
|
+
React.createElement(Route, { exact: true, path: "/timeline" },
|
|
48
|
+
React.createElement(TimelineDemo, null)),
|
|
49
|
+
React.createElement(Route, { exact: true, path: "/wechat" },
|
|
50
|
+
React.createElement(WeChatDemo, null)),
|
|
51
|
+
React.createElement(Route, { exact: true, path: "/table" },
|
|
52
|
+
React.createElement(TableDemo, null)),
|
|
53
|
+
React.createElement(Route, { exact: true, path: "/table1" },
|
|
54
|
+
React.createElement(TableDemo1, null)),
|
|
55
|
+
React.createElement(Route, { exact: true, path: "/basic" },
|
|
56
|
+
React.createElement(BasicDemo, null)),
|
|
57
|
+
React.createElement(Route, { exact: true, path: "/form" },
|
|
58
|
+
React.createElement(FormDemo, null)),
|
|
59
|
+
React.createElement(Route, { exact: true, path: "/print" },
|
|
60
|
+
React.createElement(PrintDemo, null)),
|
|
61
|
+
React.createElement(Route, { exact: true, path: "/print-container" },
|
|
62
|
+
React.createElement(PrintContainerDemo, null)),
|
|
63
|
+
React.createElement(Route, { exact: true, path: "/tableall" },
|
|
64
|
+
React.createElement(TableDemoAll, null)),
|
|
65
|
+
React.createElement(Route, { exact: true, path: "/table-analyse" },
|
|
66
|
+
React.createElement(TableAnalyse, null)),
|
|
67
|
+
React.createElement(Route, { exact: true, path: "/drag-sort" },
|
|
68
|
+
React.createElement(DragSort, null)),
|
|
69
|
+
React.createElement(Route, { exact: true, path: "/sinatures" },
|
|
70
|
+
React.createElement(SinaturesDemo, null)),
|
|
71
|
+
React.createElement(Route, { exact: true, path: "/test" },
|
|
72
|
+
React.createElement("div", null,
|
|
73
|
+
React.createElement("h1", null,
|
|
74
|
+
React.createElement(Link, { to: "/select" }, "select")),
|
|
75
|
+
React.createElement("h1", null,
|
|
76
|
+
React.createElement(Link, { to: "/tree-select" }, "tree select")),
|
|
77
|
+
React.createElement("h1", null,
|
|
78
|
+
React.createElement(Link, { to: "/tree" }, "tree")),
|
|
79
|
+
React.createElement("h1", null,
|
|
80
|
+
React.createElement(Link, { to: "/upload" }, "upload")),
|
|
81
|
+
React.createElement("h1", null,
|
|
82
|
+
React.createElement(Link, { to: "/drag-sort" }, "drag-sort"))))))),
|
|
83
|
+
// </React.StrictMode>,
|
|
84
|
+
document.getElementById('root'));
|
|
115
85
|
export { default as Button } from './components/Button';
|
|
116
86
|
export { default as Calendar } from './components/Calendar';
|
|
117
87
|
export { default as Checkbox } from './components/Checkbox';
|