javascript - 使用 JSON(不是以编程方式)更改 jstree 节点的“文本颜色”
问题描述
我有一个简单的 jstree 实例:
$('#user_file_listing').jstree(
{
'core' : {
'check_callback': true,
'data' : [
{ "id" : "#schemas", "parent" : "#", "text" : "Generated Files" },
{ "id" : "#yangfiles", "parent" : "#", "text" : "YANG" },
{ "id" : "#yamlfiles", "parent" : "#", "text" : "YAML" }
],
"themes":{
"icons": true,
"dots" : true
}
}
}
);
如何使用 JSON“数据”本身指定特定节点的文本颜色?
所有以前的 SO 问题都提供了“以编程方式”而不使用 JSON 数据的解决方案。
解决方案
推荐阅读
- python-3.x - 无法在 Colab 中训练 tensorflow 2 模型
- python - 如何恢复预训练的 TensorFlow 模型?
- mysql - Django 上下文数据不通过 vagrant 传输
- sql-server - MSSQL如何仅在数据库可用时创建数据库用户
- git - 如何将 Visual Studio 2019 社区版配置为 Git 默认编辑器
- javascript - 涉及多个字段的 React 表单验证
- python - 如何在循环中只打印一次语句
- regex - 拆分和捕获连字符字符串
- c++ - CMake 添加 fmt 库
- azure - 逻辑应用存储 Blob 仅在新 Blob 上触发