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