mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-18 13:08:06 +01:00
This commit is contained in:
parent
4e27798f53
commit
bbca5683ce
3 changed files with 4 additions and 6 deletions
|
|
@ -30,7 +30,7 @@ export class Tab {
|
|||
this.headElement = document.createElement("li");
|
||||
this.headElement.setAttribute("data-type", "tab-header");
|
||||
this.headElement.setAttribute("draggable", "true");
|
||||
this.headElement.setAttribute("style", "flex: 0;width: 0;overflow: hidden");
|
||||
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");
|
||||
|
|
@ -40,9 +40,7 @@ export class Tab {
|
|||
} else if (options.docIcon) {
|
||||
iconHTML = `<span class="item__icon">${unicode2Emoji(options.docIcon)}</span>`;
|
||||
}
|
||||
this.headElement.innerHTML = `<span class="fn__flex-1"></span>
|
||||
${iconHTML}<span class="item__text">${escapeHtml(options.title)}</span>
|
||||
<span class="fn__flex-1"></span>
|
||||
this.headElement.innerHTML = `${iconHTML}<span class="item__text">${escapeHtml(options.title)}</span>
|
||||
<span class="item__close"><svg><use xlink:href='#iconClose'></use></svg></span>`;
|
||||
this.headElement.addEventListener("mouseenter", (event) => {
|
||||
event.stopPropagation();
|
||||
|
|
|
|||
|
|
@ -616,7 +616,7 @@ export class Wnd {
|
|||
this.switchTab(this.children[currentIndex].headElement, true);
|
||||
}
|
||||
}
|
||||
item.headElement.setAttribute("style", "flex: 0;width: 0;overflow: hidden");
|
||||
item.headElement.setAttribute("style", "max-width: 0px;");
|
||||
setTimeout(() => {
|
||||
item.headElement.remove();
|
||||
}, Constants.TIMEOUT_TRANSITION);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue