大家好,我一直在使用sencha cmd创建一个使用“sencha generate app ...”的应用程序。然后我想使用图表,所以我修改了app.json文件并添加了这个:
/**
* The list of required packages (with optional versions; default is "latest").
*
* For example,
*
* "requires": [
* "sencha-charts"
* ]
*/
"requires": [
'sencha-charts'
]
所以我可以很好地显示图表,除了我没有加载css。我可以添加<link rel="stylesheet"...>
指向图表的css文件(在我的例子中是ext-charts-all.css)。但我没有发现这个解决方案是正确的。有关如何使用带有图表AND css的sencha cmd建立一个sencha应用程序的猜测吗?
非常感谢!
答案 0 :(得分:0)
双引号就是这里的方式,当你使用
时,JSON字符串格式化您需要重建应用程序 - sencha app refresh(或build),
那应该引入你的依赖css文件,如果你想添加额外的css资源,你可以在app.json文件中执行它们
/**
* List of all CSS assets in the right inclusion order.
* Each item is an object with the following format:
* {
* "path": "path/to/item.css" // Path to file, if local file it must be relative to this app.json file
* "remote": true // (Optional)
* // - Defaults to undefined (falsey) to signal a local file which will be copied
* // - Specify true if this file is a remote file which will not to be copied
* "update": "delta" // (Optional)
* // - If not specified, this file will only be loaded once, and
* // cached inside localStorage until this value is changed to either one below
* // - "delta" to enable over-the-air delta update for this file
* // - "full" means full update will be made when this file changes
*
* }
*/