首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Sencha应用程序构建和CSS图表

Sencha应用程序构建和CSS图表
EN

Stack Overflow用户
提问于 2015-01-21 16:13:39
回答 1查看 695关注 0票数 0

嗨,伙计们,我一直在使用sencha cmd创建一个使用"sencha generate app .“的应用程序。然后我想要使用图表,所以我修改了app.json文件并添加了以下内容:

代码语言:javascript
复制
    /**     
     * 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应用程序,有任何猜测吗?

非常感谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-01-28 16:24:09

在使用requires时,使用双引号进行JSON字符串格式化

您需要重新构建应用程序- sencha应用程序刷新(或构建),

如果您想要添加额外的css资源,可以在app.json文件中进行这些操作。

代码语言:javascript
复制
    /**
 * 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
 *
 *      }
 */
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28071836

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档