fix: 新增 tab 后立即高亮选中,直接显示 content
This commit is contained in:
parent
6a94b96a6c
commit
7b7d76f4aa
@ -34,6 +34,9 @@
|
|||||||
this.content_buffer[desc.name] = w; // 即使 null 也记录(标记已存在,避免重复新增)
|
this.content_buffer[desc.name] = w; // 即使 null 也记录(标记已存在,避免重复新增)
|
||||||
this.cur_tab_name = desc.name;
|
this.cur_tab_name = desc.name;
|
||||||
if (w) this.switch_content(w);
|
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 的 bug(cur_tab_name 赋值用了未定义变量 name)
|
// 修复 show_tabcontent 的 bug(cur_tab_name 赋值用了未定义变量 name)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user