ztxkutils 2.10.66-30 → 2.10.66-32
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/print.js +17 -8
- package/package.json +1 -1
- package/zti18n-cli/bin/index.js +3 -3
- package/zti18n-cli/index.js +23 -23
- package/zti18n-cli/src/command/collect.js +353 -353
- package/zti18n-cli/src/command/convert.js +17 -17
- package/zti18n-cli/src/command/convert2.js +35 -35
- package/zti18n-cli/src/command/initFileConf.js +133 -133
- package/zti18n-cli/src/command/publish.js +24 -24
- package/zti18n-cli/src/conf/BaseConf.js +21 -21
- package/zti18n-cli/src/conf/FileConf.js +116 -116
- package/zti18n-cli/src/index.js +75 -75
- package/zti18n-cli/src/translate/google.js +87 -87
- package/zti18n-cli/src/utils/isChinese.js +3 -3
- package/zti18n-cli/src/utils/log.js +8 -8
- package/zti18n-cli/src/utils/mergeOptions.js +45 -45
- package/zti18n-cli/src/utils/reactOptions.js +73 -73
- package/zti18n-cli/src/utils/vueOptions.js +69 -69
- package/zti18n-core/index.js +1 -1
- package/zti18n-core/src/index.js +5 -5
- package/zti18n-core/src/plugin/reactIntlToReactIntlUniversal.js +224 -224
- package/zti18n-core/src/plugin/reactIntlUniversalToDi18n.js +64 -64
- package/zti18n-core/src/transform/defaultPkMap.js +79 -79
- package/zti18n-core/src/transform/transformHtml.js +271 -271
- package/zti18n-core/src/transform/transformJs.js +489 -489
- package/zti18n-core/src/transform/transformPug.js +272 -272
- package/zti18n-core/src/transform/transformReactIntlToReactIntlUniversal.js +96 -96
- package/zti18n-core/src/transform/transformReactIntlUniveralToDi18n.js +90 -90
- package/zti18n-core/src/transform/transformToDi18n.js +22 -22
- package/zti18n-core/src/transform/transformTs.js +41 -41
- package/zti18n-core/src/transform/transformVue.js +126 -126
- package/zti18n-core/src/transform/transformZeroToDi18n.js +105 -105
- package/zti18n-core/src/translate/google.js +6 -6
- package/zti18n-core/src/utils/constants.js +3 -3
- package/zti18n-core/src/utils/getIgnoreLines.js +14 -14
- package/zti18n-core/src/utils/isChinese.js +3 -3
- package/zti18n-core/src/utils/log.js +8 -8
- package/dist/dataModel-1fbaff40.js +0 -24
- package/dist/dataModel-6c68c88f.js +0 -26
- package/dist/dataModel-914b6226.js +0 -26
- package/dist/dataModel-b3629ef3.js +0 -26
- package/dist/reqUrl-22b880a4.js +0 -82
- package/dist/request-1e442d5d.js +0 -2982
- package/dist/request-4c29d6de.js +0 -2977
- package/dist/request-80d1ac80.js +0 -2992
- package/dist/request-986d7090.js +0 -2923
- package/dist/request-c0970aae.js +0 -2917
- package/dist/request-d1972b41.js +0 -2992
- package/dist/request-d8d72b87.js +0 -2982
- package/dist/request-f600ad7a.js +0 -2992
- package/dist/tools-16a7fb45.js +0 -2446
- package/dist/validate-18e52490.js +0 -249
- package/dist/validate-21164759.js +0 -260
- package/dist/validate-21b58a69.js +0 -260
- package/dist/validate-2de5a28f.js +0 -260
- package/dist/validate-ab47ebe9.js +0 -260
package/dist/print.js
CHANGED
@@ -396,11 +396,16 @@ function htmlToPdfNoCanvas(_a) {
|
|
396
396
|
windowWidth: pageWidth,
|
397
397
|
callback: function (res) {
|
398
398
|
// 添加呈现的HTML所需的页面(从第2页开始)
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
399
|
+
// 注释掉这里导致多出一页空白页
|
400
|
+
// for (
|
401
|
+
// let i = 2, j = (res as any).internal.getNumberOfPages();
|
402
|
+
// i <= j;
|
403
|
+
// i++
|
404
|
+
// ) {
|
405
|
+
// pdf.addPage(pageFormat, pageOrient);
|
406
|
+
// }
|
407
|
+
for (var i_1 = 1, j = res.internal.getNumberOfPages(); i_1 <= j; i_1++) {
|
408
|
+
pdf.setPage(i_1);
|
404
409
|
// 添加水印
|
405
410
|
if (isAddWater) {
|
406
411
|
setPdfWater(pdf, waterBase64, imgWidth, imgHeight);
|
@@ -498,9 +503,13 @@ function htmlToPdfNoCanvas(_a) {
|
|
498
503
|
windowWidth: pageWidth_1,
|
499
504
|
callback: function (res) {
|
500
505
|
// 添加呈现的HTML所需的页面(从第2页开始)
|
501
|
-
for (
|
502
|
-
|
503
|
-
|
506
|
+
// for (
|
507
|
+
// let i = 2, j = (res as any).internal.getNumberOfPages();
|
508
|
+
// i <= j;
|
509
|
+
// i++
|
510
|
+
// ) {
|
511
|
+
// pdf.addPage(pageFormat, pageOrient);
|
512
|
+
// }
|
504
513
|
for (var i = 1, j = res.internal.getNumberOfPages(); i <= j; i++) {
|
505
514
|
pdf_3.setPage(i);
|
506
515
|
// 添加水印
|
package/package.json
CHANGED
package/zti18n-cli/bin/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
|
3
|
-
require('../');
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
3
|
+
require('../');
|
package/zti18n-cli/index.js
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
const program = require('./src');
|
2
|
-
const initFileConf = require('./src/command/initFileConf');
|
3
|
-
|
4
|
-
program
|
5
|
-
.command('init')
|
6
|
-
.alias('i')
|
7
|
-
.description('init locales conf')
|
8
|
-
.option('--vue', 'init for vue project')
|
9
|
-
.action(function (options) {
|
10
|
-
initFileConf(options.vue);
|
11
|
-
})
|
12
|
-
.on('--help', function () {
|
13
|
-
console.log(' Examples:');
|
14
|
-
console.log();
|
15
|
-
console.log(' $ zti18n init -c ./config/prod.config.js');
|
16
|
-
console.log();
|
17
|
-
});
|
18
|
-
|
19
|
-
program.command('*').action(function (cmd) {
|
20
|
-
console.log('unknown command "%s"', cmd);
|
21
|
-
});
|
22
|
-
|
23
|
-
program.parse(process.argv);
|
1
|
+
const program = require('./src');
|
2
|
+
const initFileConf = require('./src/command/initFileConf');
|
3
|
+
|
4
|
+
program
|
5
|
+
.command('init')
|
6
|
+
.alias('i')
|
7
|
+
.description('init locales conf')
|
8
|
+
.option('--vue', 'init for vue project')
|
9
|
+
.action(function (options) {
|
10
|
+
initFileConf(options.vue);
|
11
|
+
})
|
12
|
+
.on('--help', function () {
|
13
|
+
console.log(' Examples:');
|
14
|
+
console.log();
|
15
|
+
console.log(' $ zti18n init -c ./config/prod.config.js');
|
16
|
+
console.log();
|
17
|
+
});
|
18
|
+
|
19
|
+
program.command('*').action(function (cmd) {
|
20
|
+
console.log('unknown command "%s"', cmd);
|
21
|
+
});
|
22
|
+
|
23
|
+
program.parse(process.argv);
|