fix(tree): 节点内容渲染从 schedule_once 异步改为同步,消除展开图标时序问题

This commit is contained in:
yumoqing 2026-08-18 18:27:24 +08:00
parent c98a8b6eeb
commit 4bdf040aaa

View File

@ -26,7 +26,7 @@ bricks.TreeNode = class extends bricks.VBox {
this.add_widget(n);
n.bind('click', this.tree.node_click_handle.bind(this.tree, this));
this.node_widget = n;
schedule_once(this.create_node_content.bind(this,n), 0.01);
this.create_node_content(n);
if (! this.user_data.is_leaf) {
this.container = new bricks.VBox({height:'auto'});
this.add_widget(this.container);