gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 08:35:16 25 4
gpt4 key购买 nike

大家好,我一直在使用 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)。但我觉得这个解决方案不正确。关于如何使用带有图表和 css 的 sencha cmd 构建 sencha 应用程序的任何猜测?

非常感谢!

最佳答案

双引号是这里的方式,当你使用 requires 时,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
*
* }
*/

关于css - Sencha 应用程序构建和图表 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28071836/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com