问题描述
我可以使用 Metronic Theme 并且我有一个这样的类
<div class="pb-5" data-wizard-type="step-content">
<div id="kt_tree_2" class="tree-demo">
<ul>
<li>
Root node 1
<ul>
<li data-jstree='{ "icon" : "flaticon2-analytics text-success " }'>
</li>
</ul>
</li>
<li data-jstree='{ "type" : "file" }'>
</li>
</ul>
</div>
</div>
当我在里面写文本时,我的主题没有显示出来。我更改了根节点 1 文本。
我如何访问输入? Js 树
this._data.core.original_container_html = this.element.find(" > ul > li").clone(true);
this._data.core.original_container_html
.find("li").addBack()
.contents().filter(function() {
return this.nodeType === 3 && (!this.nodeValue || /^\s+$/.test(this.nodeValue));
})
.remove();
this.element.html("<"+"ul class='jstree-container-ul jstree-children' role='group'><"+"li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none'><i class='jstree-icon jstree-ocl'></i><"+"a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>" + this.get_string("Loading ...") + "</a></li></ul>");
this.element.attr('aria-activedescendant','j' + this._id + '_loading');
this._data.core.li_height = this.get_container_ul().children("li").first().outerHeight() || 24;
this._data.core.node = this._create_prototype_node();
_create_prototype_node : function () {
var _node = document.createElement('LI'),_temp1,_temp2;
_node.setAttribute('role','none');
_temp1 = document.createElement('I');
_temp1.className = 'jstree-icon jstree-ocl';
_temp1.setAttribute('role','presentation');
_node.appendChild(_temp1);
_temp1 = document.createElement('A');
_temp1.className = 'jstree-anchor';
_temp1.setAttribute('href','#');
_temp1.setAttribute('tabindex','-1');
_temp1.setAttribute('role','treeitem');
_temp2 = document.createElement('I');
_temp2.className = 'jstree-icon jstree-themeicon';
_temp2.setAttribute('role','presentation');
_temp1.appendChild(_temp2);
_node.appendChild(_temp1);
_temp1 = _temp2 = null;
return _node;
},
我尝试手动 li 和 i 标签。如果我创建 li 并且我在这个 div 图标中不显示。我只看到文件夹图标。其实我不需要动态。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)