Skip to content

Commit d4f7890

Browse files
committed
调整npm版本-vue3日志打印
1 parent c1ed97f commit d4f7890

5 files changed

Lines changed: 13 additions & 11 deletions

File tree

extend/vue/vue3/translate.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ translate.vue3.config = function(app){
1515
//translate.time.use = true;
1616
//window.translate.time.printTime = 100;
1717

18-
var originalTrasnalteLog = translate.log;
19-
translate.log = function(obj){
20-
if(typeof(obj) === 'string' && obj.indexOf('- translate.js -') !== -1){
21-
//不显示 translate.js 的说明
22-
}else{
23-
originalTrasnalteLog(obj);
24-
}
25-
}
2618

2719
// 针对翻译动作的性能监控 https://translate.zvo.cn/549733.html
2820
translate.time.execute.start();

extend/vue/vue3/translateVue3TS.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import { nextTick } from 'vue';
22
import translate from 'i18n-jsautotranslate'
33

4+
/* 这里不打印 translate.js 的声明 */
5+
var originalTrasnalteLog = translate.log;
6+
translate.log = function(obj){
7+
if(typeof(obj) === 'string' && obj.indexOf('- translate.js -') !== -1){
8+
//不显示 translate.js 的说明
9+
}else{
10+
originalTrasnalteLog(obj);
11+
}
12+
}
13+
414
//vue3框架的一些单独设置
515
translate.vue3 = {
616
/*

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "i18n-jsautotranslate",
3-
"version": "3.18.76",
3+
"version": "3.18.77",
44
"description": "Two lines of js realize automatic html translation. No need to change the page, no language configuration file, no API key, SEO friendly!",
55
"main": "index.js",
66
"scripts": {

translate.js/translate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var translate = {
1414
* 格式:major.minor.patch.date
1515
*/
1616
// AUTO_VERSION_START
17-
version: '3.18.76.20251020',
17+
version: '3.18.77.20251020',
1818
// AUTO_VERSION_END
1919
/*
2020
当前使用的版本,默认使用v2. 可使用 setUseVersion2();

translate.js/translate.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)