嗨,伙计们,我一直在使用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。我可以为图表添加一个指向css文件的<link rel="stylesheet"...> (在我的例子中是ext- charts -all.css)。但我觉得这个解决方案不对。对于如何使用带有图表和css的sencha cmd构建一个sencha应用程序,有任何猜测吗?
非常感谢!
发布于 2015-01-28 16:24:09
在使用requires时,使用双引号进行JSON字符串格式化
您需要重新构建应用程序- sencha应用程序刷新(或构建),
如果您想要添加额外的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
*
* }
*/https://stackoverflow.com/questions/28071836
复制相似问题