mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
💄 页签下拉选择没有定位 https://github.com/siyuan-note/siyuan/issues/6264
This commit is contained in:
parent
0faf73d2c1
commit
4cd1bd68e5
4 changed files with 4 additions and 7 deletions
|
|
@ -187,6 +187,7 @@ progressLoading: 400
|
|||
text-align: center;
|
||||
white-space: nowrap;
|
||||
align-self: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
&__item {
|
||||
|
|
@ -240,6 +241,7 @@ progressLoading: 400
|
|||
line-height: 32px;
|
||||
border-top: .5px solid var(--b3-border-color);
|
||||
padding: 0 5px;
|
||||
font-size: 12px;
|
||||
|
||||
.toolbar__item {
|
||||
color: var(--b3-theme-on-surface);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ export class Tab {
|
|||
this.headElement = document.createElement("li");
|
||||
this.headElement.setAttribute("data-type", "tab-header");
|
||||
this.headElement.setAttribute("draggable", "true");
|
||||
this.headElement.setAttribute("style", "max-width: 0");
|
||||
this.headElement.setAttribute("data-id", this.id);
|
||||
this.headElement.setAttribute("data-position", "center"); // showTooltip 位置标识
|
||||
this.headElement.classList.add("item", "item--focus");
|
||||
|
|
|
|||
|
|
@ -353,7 +353,6 @@ export class Wnd {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
const initData = currentTab.headElement.getAttribute("data-initdata");
|
||||
if (initData) {
|
||||
const json = JSON.parse(initData);
|
||||
|
|
@ -443,11 +442,6 @@ export class Wnd {
|
|||
} else {
|
||||
this.headersElement.children[oldFocusIndex].after(tab.headElement);
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
tab.headElement.removeAttribute("style");
|
||||
}, Constants.TIMEOUT_TRANSITION);
|
||||
|
||||
tab.headElement.querySelector(".item__close").addEventListener("click", (event) => {
|
||||
if (tab.headElement.classList.contains("item--pin")) {
|
||||
tab.unpin();
|
||||
|
|
@ -505,6 +499,7 @@ export class Wnd {
|
|||
}
|
||||
} else {
|
||||
this.switchTab(item, true);
|
||||
this.showHeading();
|
||||
window.siyuan.menus.menu.remove();
|
||||
}
|
||||
event.preventDefault();
|
||||
|
|
|
|||
|
|
@ -216,6 +216,7 @@ const JSONToCenter = (json: any, layout?: Layout | Wnd | Tab | Model) => {
|
|||
child.headElement.setAttribute("data-init-active", "true");
|
||||
}
|
||||
(layout as Wnd).addTab(child);
|
||||
(layout as Wnd).showHeading();
|
||||
} else if (json.instance === "Editor" && json.blockId) {
|
||||
(layout as Tab).headElement.setAttribute("data-initdata", JSON.stringify(json));
|
||||
} else if (json.instance === "Asset") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue