ecinc-cloud-wappaio 9.0.155 → 9.0.157

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/i18n/index.js CHANGED
@@ -40,12 +40,6 @@ if (ELEMENT.lang) {
40
40
  }
41
41
  }
42
42
 
43
- Vue.use(ELEMENT, {
44
- size: Cookies.get('size') || 'medium', // set element-ui default size
45
- i18n: (key, value) => i18n.t(key, value)
46
- })
47
- Vue.use(VueI18n)
48
-
49
43
  const i18n = new VueI18n({
50
44
  // set locale
51
45
  // options: en | zh | es
@@ -54,6 +48,16 @@ const i18n = new VueI18n({
54
48
  messages
55
49
  })
56
50
  i18n.generateTitle = generateTitle
57
- i18n.$tx = $tx
51
+
52
+ const install = function (Vue) {
53
+ Vue.prototype.$tx = $tx
54
+ Vue.prototype.$i18nTitle = generateTitle
55
+ }
56
+ Vue.use(install)
57
+
58
+ Vue.use(ELEMENT, {
59
+ size: Cookies.get('size') || 'medium', // set element-ui default size
60
+ i18n: (key, value) => i18n.t(key, value)
61
+ })
58
62
 
59
63
  export default i18n
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // 导入单个组件
2
+ import $i18n from './i18n/index'
2
3
  import app from '../../common/app/index'
3
4
  import auth from '../../common/auth/index'
4
5
  import eventBus from '../../common/eventBus/index'
@@ -54,8 +55,6 @@ import WflowTester from '../../ecwplus/WorkflowDesigner/src/components/Tester'
54
55
 
55
56
  import { SystemDesigner } from '../../ecwplus/SystemDesigner/index'
56
57
 
57
- import $i18n from './i18n/index'
58
-
59
58
  // 以数组的结构保存组件,便于遍历
60
59
  const components = [
61
60
  app,
@@ -167,8 +166,6 @@ const install = function (Vue) {
167
166
  if (install.installed) return
168
167
  install.installed = true
169
168
 
170
- Vue.prototype.$tx = $i18n.$tx
171
-
172
169
  // 遍历并注册全局组件
173
170
  components.map((component) => {
174
171
  Vue.use(component)
@@ -177,8 +174,6 @@ const install = function (Vue) {
177
174
 
178
175
  if (typeof window !== 'undefined' && window.Vue) {
179
176
  setTimeout(() => {
180
- window.Vue.prototype.$tx = $i18n.$tx
181
-
182
177
  window.$alert = (message, title, options) => {
183
178
  const msgbox = document.querySelector('.el-message-box')
184
179
  if (!msgbox) {