renusify 1.0.4 → 1.0.5
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/components/app/index.vue +14 -14
- package/components/{notify → app/notify}/index.vue +1 -1
- package/components/{notify → app/notify}/notification.vue +0 -0
- package/components/{notify → app/notify}/notify.js +0 -0
- package/components/app/style.scss +0 -1
- package/components/{toast → app/toast}/index.vue +0 -0
- package/components/{toast → app/toast}/style.scss +1 -1
- package/components/{toast → app/toast}/toast.js +0 -0
- package/components/{toast → app/toast}/toast.vue +0 -0
- package/components/breadcrumb/bredcrumbItem.vue +11 -11
- package/components/breadcrumb/index.vue +6 -5
- package/components/chart/chart.vue +3 -0
- package/components/chat/chatInput.vue +139 -135
- package/components/codeEditor/index.vue +412 -443
- package/components/codeEditor/run.vue +76 -80
- package/components/content/style.scss +0 -1
- package/components/form/address.vue +109 -109
- package/components/form/address_ir.vue +106 -0
- package/components/form/colorPicker/Alpha.vue +3 -0
- package/components/form/colorPicker/Preview.vue +3 -0
- package/components/form/group-input.vue +2 -1
- package/components/form/number.vue +1 -1
- package/components/iframe/index.vue +1 -1
- package/components/index.js +178 -88
- package/components/infinite/index.vue +0 -2
- package/components/menu/index.vue +159 -127
- package/components/modal/index.vue +85 -90
- package/components/modal/style.scss +0 -1
- package/components/table/crud/index.vue +12 -13
- package/directive/clickOutSide/index.js +2 -3
- package/directive/drag/index.js +1 -2
- package/directive/intersect/index.js +3 -3
- package/directive/resize/index.js +3 -4
- package/directive/ripple/index.js +4 -6
- package/directive/scroll/index.js +3 -4
- package/directive/sortable/index.js +1 -2
- package/directive/title/index.js +2 -3
- package/directive/touch/index.js +1 -2
- package/index.js +3 -4
- package/package.json +1 -1
- package/plugins/trans/Translate.js +9 -14
package/package.json
CHANGED
|
@@ -53,17 +53,19 @@ class Translate {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
if(package_name&&typeof package_name!=='string'){
|
|
56
|
+
if (package_name && typeof package_name !== 'string') {
|
|
57
57
|
console.error(
|
|
58
|
-
'package name must be string. key:'+key+' package_name:'+package_name
|
|
58
|
+
'package name must be string. key:' + key + ' package_name:' + package_name
|
|
59
59
|
)
|
|
60
60
|
return key
|
|
61
61
|
}
|
|
62
|
+
if (typeof key !== 'string') {
|
|
63
|
+
return key
|
|
64
|
+
}
|
|
65
|
+
key = key.toLowerCase()
|
|
62
66
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const local = lang!==null?lang : this._local
|
|
66
|
-
const pack = package_name !==null?package_name: this._package
|
|
67
|
+
const local = lang !== null ? lang : this._local
|
|
68
|
+
const pack = package_name !== null ? package_name : this._package
|
|
67
69
|
if (!local) {
|
|
68
70
|
return key;
|
|
69
71
|
}
|
|
@@ -80,7 +82,7 @@ class Translate {
|
|
|
80
82
|
return key;
|
|
81
83
|
}
|
|
82
84
|
return val;
|
|
83
|
-
} else if (window.app.$r.autoAddTranslate && pack && this._count < 100 && /^([a-z_.])*$/.test(key)) {
|
|
85
|
+
} else if (window.app.$r && window.app.$r.autoAddTranslate && pack && this._count < 100 && /^([a-z_.])*$/.test(key)) {
|
|
84
86
|
if (!this._store.includes(key)) {
|
|
85
87
|
let url = '/translate/' + pack + '/' + key + '?v=';
|
|
86
88
|
const lng = variable.length
|
|
@@ -120,12 +122,6 @@ class Translate {
|
|
|
120
122
|
if (window.app.$storage.get("lang")) {
|
|
121
123
|
locale = window.app.$storage.get("lang");
|
|
122
124
|
}
|
|
123
|
-
if (window.app.$storage.get(`msg-${pack}`)) {
|
|
124
|
-
const msg = window.app.$storage.get(`msg-${pack}`);
|
|
125
|
-
this.local = locale;
|
|
126
|
-
this.setMessages(msg);
|
|
127
|
-
window.app.$r.store['langs_loaded'][pack] = true;
|
|
128
|
-
}
|
|
129
125
|
Axios.get(`/translate/${pack}/${locale}`).then(
|
|
130
126
|
res => {
|
|
131
127
|
if (res.data.length !== 0) {
|
|
@@ -134,7 +130,6 @@ class Translate {
|
|
|
134
130
|
for (let i = 0; i < lng; i++) {
|
|
135
131
|
lang[res.data[i].key] = res.data[i][locale];
|
|
136
132
|
}
|
|
137
|
-
window.app.$storage.set(`msg-${pack}`, lang);
|
|
138
133
|
this.local = locale;
|
|
139
134
|
this.setMessages(lang);
|
|
140
135
|
} else {
|