|
|
@@ -25,10 +25,10 @@ Ext.define('uas.view.main.Main', {
|
|
|
value:'<h2 style="margin-top: 7px;">UAS2.0组件库</h2>',
|
|
|
},'->',{
|
|
|
xtype:'combo',
|
|
|
- width: 220,
|
|
|
- labelWidth:80,
|
|
|
+ width: 210,
|
|
|
+ labelWidth:110,
|
|
|
editable: false,
|
|
|
- fieldLabel:'当前主题',
|
|
|
+ fieldLabel:'当前主题&语言',
|
|
|
store: Ext.create('Ext.data.Store', {
|
|
|
fields: ['display', 'value'],
|
|
|
data : [
|
|
|
@@ -55,6 +55,33 @@ Ext.define('uas.view.main.Main', {
|
|
|
c.setValue(getCookie('theme'))
|
|
|
}
|
|
|
}
|
|
|
+ },{
|
|
|
+ xtype:'combo',
|
|
|
+ width: 110,
|
|
|
+ labelWidth:0,
|
|
|
+ editable: false,
|
|
|
+ store: Ext.create('Ext.data.Store', {
|
|
|
+ fields: ['display', 'value'],
|
|
|
+ data : [
|
|
|
+ {"display":"简体中文", "value": 'zh'},
|
|
|
+ {"display":"英语", "value": 'en'}
|
|
|
+ ]
|
|
|
+ }),
|
|
|
+ cls:'x-desktop-combo2',
|
|
|
+ triggerAction: 'all',
|
|
|
+ forceSelection: true,
|
|
|
+ queryMode: 'local',
|
|
|
+ displayField: 'display',
|
|
|
+ valueField: 'value',
|
|
|
+ listeners: {
|
|
|
+ select: function(combo, records, obj){
|
|
|
+ setCookie('locale',combo.value,0);
|
|
|
+ window.location.reload();
|
|
|
+ },
|
|
|
+ beforerender:function(c){
|
|
|
+ c.setValue(getCookie('locale'))
|
|
|
+ }
|
|
|
+ }
|
|
|
}]
|
|
|
},{
|
|
|
region: 'west',
|