1

I'm using Ext JS and Sencha CMD and want to experiment with a few themes.

Also I have read that the theme for an app can be changed in app.js(using theme property) and sencha.cfg(using app.theme property) and then run sencha app build.

I would like to know, Why are this configurations in two different files? And Which is the correct way of doing this?

4

2 回答 2

0

在 ExtJS 5 中,指定应用程序主题的正确方法是通过app.json文件,如文档中所述

sencha.cfg方法也有效,但支持从旧版本的 ExtJS 迁移。

于 2014-07-21T10:59:13.903 回答
0

两者都是定义主题的正确方法。但是,最好在 app.json 中定义主题。无论如何,您将在 sencha.cfg 中定义主题默认值 -

app.theme=ext-theme-classic

您在 app.json 中定义的内容

"theme": "my-theme"

将覆盖 sencha.cfg 中定义的内容

请参阅文档以了解清楚 - http://docs.sencha.com/cmd/5.x/microloader.html

于 2015-03-06T11:23:09.477 回答