mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
This commit is contained in:
parent
9b172f80ca
commit
aa2b0d384d
1 changed files with 4 additions and 0 deletions
|
|
@ -1290,6 +1290,8 @@ export const openMenuPanel = (options: {
|
||||||
break;
|
break;
|
||||||
} else if (type === "av-view-switch") {
|
} else if (type === "av-view-switch") {
|
||||||
if (!target.parentElement.classList.contains("b3-menu__item--current")) {
|
if (!target.parentElement.classList.contains("b3-menu__item--current")) {
|
||||||
|
avPanelElement.querySelector(".b3-menu__item--current")?.classList.remove("b3-menu__item--current");
|
||||||
|
target.parentElement.classList.add("b3-menu__item--current")
|
||||||
options.blockElement.removeAttribute("data-render");
|
options.blockElement.removeAttribute("data-render");
|
||||||
avRender(options.blockElement, options.protyle, undefined, target.parentElement.dataset.id);
|
avRender(options.blockElement, options.protyle, undefined, target.parentElement.dataset.id);
|
||||||
}
|
}
|
||||||
|
|
@ -1304,6 +1306,8 @@ export const openMenuPanel = (options: {
|
||||||
element: target.parentElement
|
element: target.parentElement
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
avPanelElement.querySelector(".b3-menu__item--current")?.classList.remove("b3-menu__item--current");
|
||||||
|
target.parentElement.classList.add("b3-menu__item--current")
|
||||||
options.blockElement.removeAttribute("data-render");
|
options.blockElement.removeAttribute("data-render");
|
||||||
avRender(options.blockElement, options.protyle, () => {
|
avRender(options.blockElement, options.protyle, () => {
|
||||||
openViewMenu({
|
openViewMenu({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue