热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Sencha应用程序构建和图表CSS-SenchaappbuildandchartCSS

HiguysIhavebeenusingsenchacmdtocreateanappusingsenchagenerateapp.ThenIwanted

Hi guys I have been using sencha cmd to create an app using "sencha generate app ...". Then I wanted to use charts, so I modified the app.json file and added this:

嗨,大家好我一直在使用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'
    ]

So I can display charts well, except that I dont have the css loaded too. I could add a pointing to the css file for charts (in my case ext-charts-all.css). But I don't find this solution correct. Any guesses on how to build a sencha app using sencha cmd with charts AND css ?

所以我可以很好地显示图表,除了我没有加载css。我可以添加一个 指向图表的css文件(在我的例子中是ext-charts-all.css)。但我发现这个解决方案没有问题。有关如何使用带有图表和CSS的sencha cmd构建sencha应用程序的任何猜测?

Thanks a lot !

非常感谢 !

1 个解决方案

#1


0  

Double Quotes are the way here, JSON string formatting when you are using a requires

双引号就是这里的方式,当您使用require时,JSON字符串格式化

You will need to rebuild the application - sencha app refresh (or build),

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

That should pull in your dependent css files, if you ever want to add additional css resources you can do them in the app.json file

这应该引入你的依赖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
 *
 *      }
 */

推荐阅读
author-avatar
陈杰铭雅意
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有