Blame view

src/locale/lang.js 392 Bytes
5bd0f522   梁灏   fixed
1
2
  // using with vue-i18n in CDN
  /*eslint-disable */
54f510c5   梁灏   fixed not support...
3
4
5
  import Vue from 'vue';
  const isServer = Vue.prototype.$isServer;
  
5bd0f522   梁灏   fixed
6
  export default function (lang) {
54f510c5   梁灏   fixed not support...
7
8
9
10
11
12
      if (!isServer) {
          if (typeof window.iview !== 'undefined') {
              if (!('langs' in iview)) {
                  iview.langs = {};
              }
              iview.langs[lang.i.locale] = lang;
5bd0f522   梁灏   fixed
13
          }
5bd0f522   梁灏   fixed
14
15
16
      }
  };
  /*eslint-enable */