fix: 新增 tab 后立即高亮选中,直接显示 content

This commit is contained in:
p 2026-08-14 16:59:01 +08:00
parent 6a94b96a6c
commit 7b7d76f4aa

View File

@ -34,6 +34,9 @@
this.content_buffer[desc.name] = w; // 即使 null 也记录(标记已存在,避免重复新增)
this.cur_tab_name = desc.name;
if (w) this.switch_content(w);
// 高亮新 tab 按钮do_handle 会 select_item + set active
// show_tabcontent 因 cur_tab_name 已设为 desc.name 而直接 return不会二次切换
if (this.toolbar && this.toolbar.click) this.toolbar.click(desc.name);
};
// 修复 show_tabcontent 的 bugcur_tab_name 赋值用了未定义变量 name