我希望我的树在我删除一个节点后重新加载。问题是我似乎无法弄清楚如何调用树上的函数。
我试过使用树,容器的 id,fancytree,你可以命名它。这是我加载 fancytree 小部件的源代码:
echo FancytreeWidget::widget([
'options' =>[
'source' => $chapters,
'extensions' => ['dnd'],
'icons' => false,
'activeVisible' => true,
'dnd' => [
'preventVoidMoves' => true,
'preventRecursiveMoves' => true,
'autoExpandMS' => 400,
'dragStart' => new JsExpression('function(node, data) {
startNode = node;
return true;
}'),
'dragEnter' => new JsExpression('function(node, data) {
return true;
}'),
'dragDrop' => new JsExpression('function(node, data) {
dropNode = node;
data.otherNode.moveTo(node, data.hitMode);
updatePosition();
node.render(force=true);
}'),
],
],
]);