search

Home  >  Q&A  >  body text

javascript - requirejs loading easyui localization problem

js code

requirejs.config({
    baseUrl :...,
    shim : {
        'zhCN' : [ 'jquery' ],
        'easyui' : [ 'jquery' ],
        ...
    },
    paths:{
        easyui : 'EasyUI/jquery.easyui.min',
        zhCN : 'EasyUI/locale/easyui-lang-zh_CN',
        ...
    }
});
require([ 'jquery','zhCN', 'easyui'],function($){...});

The datebox and datagrid functions of easyui are normal, but they are not in Chinese.

世界只因有你世界只因有你2754 days ago798

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-06-26 10:59:30

    Are there any dependencies between zhCN and easyui? If so, try adding the dependencies between these two in the shim?

    shim:{
        'zhCN' : [ 'eazyui'],
        'eazyui': ['jquery']
    }

    reply
    0
  • Cancelreply