i18n-jsautotranslate 3.18.76 → 3.18.77
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/index.js +1 -1
- package/package.json +1 -1
- package/vue/vue3/translate.ts +0 -8
- package/vue/vue3/translateVue3TS.ts +10 -0
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "i18n-jsautotranslate",
|
|
3
|
-
"version": "3.18.
|
|
3
|
+
"version": "3.18.77",
|
|
4
4
|
"description": "Two lines of js realize automatic html translation. No need to change the page, no language configuration file, no API key, SEO friendly!",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
package/vue/vue3/translate.ts
CHANGED
|
@@ -15,14 +15,6 @@ translate.vue3.config = function(app){
|
|
|
15
15
|
//translate.time.use = true;
|
|
16
16
|
//window.translate.time.printTime = 100;
|
|
17
17
|
|
|
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
|
-
}
|
|
26
18
|
|
|
27
19
|
// 针对翻译动作的性能监控 https://translate.zvo.cn/549733.html
|
|
28
20
|
translate.time.execute.start();
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { nextTick } from 'vue';
|
|
2
2
|
import translate from 'i18n-jsautotranslate'
|
|
3
3
|
|
|
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
|
+
|
|
4
14
|
//vue3框架的一些单独设置
|
|
5
15
|
translate.vue3 = {
|
|
6
16
|
/*
|