tianheng-ui 0.0.42 → 0.0.45

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.
@@ -1,39 +1,37 @@
1
- import VueI18n from 'vue-i18n'
2
1
  import 'normalize.css/normalize.css'
3
-
4
- import MakingForm from './Container.vue'
5
- import GenerateForm from './GenerateForm.vue'
6
-
7
- import enUS from './lang/en-US'
8
- import zhCN from './lang/zh-CN'
9
-
10
2
  import './iconfont/iconfont.css'
11
3
  import './styles/cover.scss'
12
4
  import './styles/index.scss'
13
5
 
14
- const loadLang = function (Vue, lang, locale, i18n) {
15
- if (locale) {
16
- locale('en-US', {...locale('en-US'), ...enUS})
17
- locale('zh-CN', {...locale('zh-CN'), ...zhCN})
18
- Vue.config.lang = lang
19
- } else if (i18n) {
20
- i18n.setLocaleMessage('en-US', {...i18n.messages['en-US'], ...enUS})
21
- i18n.setLocaleMessage('zh-CN', {...i18n.messages['zh-CN'], ...zhCN})
22
- i18n.locale = lang
23
- } else {
24
- Vue.use(VueI18n)
25
- Vue.locale('en-US', {...Vue.locale('en-US'), ...enUS})
26
- Vue.locale('zh-CN', {...Vue.locale('zh-CN'), ...zhCN})
27
- Vue.config.lang = lang
28
- }
29
- }
6
+ import MakingForm from './Container.vue'
7
+ import GenerateForm from './GenerateForm.vue'
8
+
9
+ // import VueI18n from 'vue-i18n'
10
+ // import enUS from './lang/en-US'
11
+ // import zhCN from './lang/zh-CN'
12
+ // const loadLang = function (Vue, lang, locale, i18n) {
13
+ // if (locale) {
14
+ // locale('en-US', {...locale('en-US'), ...enUS})
15
+ // locale('zh-CN', {...locale('zh-CN'), ...zhCN})
16
+ // Vue.config.lang = lang
17
+ // } else if (i18n) {
18
+ // i18n.setLocaleMessage('en-US', {...i18n.messages['en-US'], ...enUS})
19
+ // i18n.setLocaleMessage('zh-CN', {...i18n.messages['zh-CN'], ...zhCN})
20
+ // i18n.locale = lang
21
+ // } else {
22
+ // Vue.use(VueI18n)
23
+ // Vue.locale('en-US', {...Vue.locale('en-US'), ...enUS})
24
+ // Vue.locale('zh-CN', {...Vue.locale('zh-CN'), ...zhCN})
25
+ // Vue.config.lang = lang
26
+ // }
27
+ // }
30
28
 
31
29
  MakingForm.install = function (Vue, opts = {
32
30
  lang: 'zh-CN',
33
31
  locale: null,
34
32
  i18n: null
35
33
  }) {
36
- loadLang(Vue, opts.lang, opts.locale, opts.i18n)
34
+ // loadLang(Vue, opts.lang, opts.locale, opts.i18n)
37
35
  Vue.component(MakingForm.name, MakingForm)
38
36
  }
39
37
 
@@ -42,7 +40,7 @@ GenerateForm.install = function (Vue, opts = {
42
40
  locale: null,
43
41
  i18n: null
44
42
  }) {
45
- loadLang(Vue, opts.lang, opts.locale, opts.i18n)
43
+ // loadLang(Vue, opts.lang, opts.locale, opts.i18n)
46
44
  Vue.component(GenerateForm.name, GenerateForm)
47
45
  }
48
46
 
@@ -56,7 +54,7 @@ const install = function (Vue, opts = {
56
54
  locale: null,
57
55
  i18n: null
58
56
  }) {
59
- loadLang(Vue, opts.lang, opts.locale, opts.i18n)
57
+ // loadLang(Vue, opts.lang, opts.locale, opts.i18n)
60
58
  components.forEach(component => {
61
59
  Vue.component(component.name, component)
62
60
  })