【问题标题】:Changing the theme with jstree 3.0.0使用 jstree 3.0.0 更改主题
【发布时间】:2014-11-03 15:10:58
【问题描述】:

我正在尝试将主题更改如下:

  • 我复制了默认文件夹的内容,并将它们复制到一个名为 david 的文件夹中

  • 我使用 replace all in style.css 在我的编辑器中将 .jstree-default 的实例更改为 .jstree-david

  • 我链接到 david 样式表

  • 我将此代码添加到 jstree 配置对象的核心对象中

                    "themes": {
                        "name": "david",
                        "dots": true,
                        "icons": true
                    }
    

树渲染时没有任何常见的点和图标,并且单击不会展开根节点。

如何为这个新的 jstree 创建主题? style.css 文件和相关的 sprite 与我使用的版本 1 主题不同。

是否已经为 jstree 3.0.0 创建了可用的主题?

更新: 所以习惯了从 StackOverflow 获取我的信息,我很高兴能非常及时地直接从 jstree 的作者那里得到help 关于这个问题的信息。

【问题讨论】:

  • 这个我也很好奇...

标签: jstree


【解决方案1】:

你还记得成功地包含你的css文件吗? 我使用以下代码将主题更改为深色。希望能帮到你。

$('#jstree_demo_div').jstree({
        'core' : {
             "themes": {
                "name": "default-dark",
                "dots": true,
                "icons": true
            },
            ...
<link rel="stylesheet" href="/media/images/jstree_themes/default-dark/style.min.css" /> 

【讨论】:

    猜你喜欢
    • 2021-01-20
    • 1970-01-01
    • 1970-01-01
    • 2015-09-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多