This address: http://blog.csdn.net/sushengmiyan/article/details/42016107
This article Sushengmiyan
--------------------------------------------------------------------------------------------------------------- ---------------------
For convenience, use Sencha cmd to create a project, use the App build command build project, and start the service using the Web Start command.
OK, now change the bit of code under Main.js and add the following to the panel:
, { xtype: ' Combo ', width: ' + ', labelwidth: ' + ', Fieldlabel: ' Theme ', Displayfield: ' Name ', Valuefield: ' Value ',//labelstyle: ' Cursor:move; ',//margin: ' 5 5 5 5 ', Querymode: ' Local ', store:Ext.create (' Ext.data.Store ', {fields: [' Value ', ' name '],data: [{value: ' Neptune ', Name: ' Neptune Theme '},{value: ' Neptune-touch ', Name: ' Neptune Touch Theme '},{Valu E: ' Crisp ', Name: ' Crisp theme '},{value: ' Crisp-touch ', Name: ' Crisp touch theme '},{value: ' Classic ', Name: ' Classic theme '},{VA Lue: ' Gray ', Name: ' Gray Theme '}]}),//value:theme,listeners: {select:function (combo) {var theme = Combo.getvalue (); Varhref = ' ext/packages/ext-theme-' +theme+ '/build/resources/ext-theme-' +theme+ '-all.css '; varlink = Ext.fly (' theme ') ); if (!link) {link = ext.gethead (). appendchild ({tag: ' link ', id: ' Theme ', rel: ' Stylesheet ', href: '});}; Link.set ({href:Ext.String.format (href, theme)});}}}
The Main.js code should look like this: (Full content)
/** * This class was the main view for the application. It is specified in App.js as the * "Autocreateviewport" property. That setting automatically applies the ' viewport ' * plugin to promote that instance of this class to the BODY element. * * Todo-replace This content of this view to suite the needs of your application. */ext.define (' OaSystem.view.main.Main ', {extend: ' Ext.container.Container ', requires: [' OaSystem.view.main. Maincontroller ', ' OaSystem.view.main.MainModel '], xtype: ' App-main ', controller: ' Main ', ViewModel : {type: ' main '}, layout: {type: ' Border '}, items: [{xtype: ' Panel ', bind: { Title: ' {name} '}, Region: ' West ', HTML: ' <ul><li>this area is commonly used F Or navigation, for example, using a "tree" component.</li></ul> ', width:250, Split:true, Tbar: [{text: ' Button ', handler: ' OnclicKbutton '},{xtype: ' Combo ', Width: ' + ', labelwidth: ' + ', Fieldlabel: ' Theme ', Displayfield: ' Name ', V Aluefield: ' Value ',//labelstyle: ' Cursor:move; ',//margin: ' 5 5 5 5 ', Querymode: ' Local ', store:Ext.create (' Ext.data.Store ', {fields: [' value ', ' name '],data: [{value: ' Neptune ', Name: ' Neptune Theme '},{value: ' Neptune-touch ', name : ' Neptune Touch Theme '},{value: ' Crisp ', Name: ' Crisp theme '},{value: ' Crisp-touch ', Name: ' Crisp touch theme '},{value: ' Classi C ', Name: ' Classic theme '},{value: ' Gray ', Name: ' Gray Theme '}]},//value:theme,listeners: {select:function (combo) {var them E = Combo.getvalue (); varhref = ' ext/packages/ext-theme-' +theme+ '/build/resources/ext-theme-' +theme+ '-all.css '; Varlink = ext.fly (' theme '); if (!link) {link = ext.gethead (). appendchild ({tag: ' link ', id: ' Theme ', rel: ' Stylesheet ', href: '});}; Link.set ({href:Ext.String.format (href, theme)});}} }]},{region: ' Center ', xtype: ' TabPanel ', items:[{title: ' Tab 1 ', HTML: ' The problem that has been tangled for a long time is finally relieved. All I've seen before is the use of Swapstylesheet I have been successful. Occasionally read this article, feel good, indeed success.
http://extjs.eu/lightweight-theming/
Recommended, this site, the content is more substantial, the interface is more beautiful. There are some plugins that need to be paid for.
[ExtJS5 Study notes] 29th section Sencha Ext JS 5.1.0 dynamic Change Skin theme