mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
067da5f54b
commit
0ea19f0d9d
4 changed files with 18 additions and 13 deletions
|
|
@ -6,6 +6,19 @@
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
z-index: 210;
|
z-index: 210;
|
||||||
|
|
||||||
|
&--list {
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 70vh;
|
||||||
|
|
||||||
|
.b3-menu__label {
|
||||||
|
@include text-clamp(1);
|
||||||
|
max-width: 30vw;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
-webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0) 0, #000 12px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&__item {
|
&__item {
|
||||||
padding: 0 16px 0 8px;
|
padding: 0 16px 0 8px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
@ -119,12 +132,6 @@
|
||||||
&__label {
|
&__label {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 84px;
|
min-width: 84px;
|
||||||
@include text-clamp(1);
|
|
||||||
max-width: 30vw;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
-webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0) 0, #000 12px);
|
|
||||||
max-width: 30vw;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__icon {
|
&__icon {
|
||||||
|
|
|
||||||
|
|
@ -483,8 +483,7 @@ export class Wnd {
|
||||||
|
|
||||||
private renderTabList(event: MouseEvent) {
|
private renderTabList(event: MouseEvent) {
|
||||||
window.siyuan.menus.menu.remove();
|
window.siyuan.menus.menu.remove();
|
||||||
window.siyuan.menus.menu.element.style.maxHeight = "70vh";
|
window.siyuan.menus.menu.element.classList.add("b3-menu--list")
|
||||||
window.siyuan.menus.menu.element.style.overflow = "auto";
|
|
||||||
Array.from(this.headersElement.children).forEach((item: HTMLElement) => {
|
Array.from(this.headersElement.children).forEach((item: HTMLElement) => {
|
||||||
const iconElement = item.querySelector(".item__icon");
|
const iconElement = item.querySelector(".item__icon");
|
||||||
const graphicElement = item.querySelector(".item__graphic");
|
const graphicElement = item.querySelector(".item__graphic");
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,8 @@ export class Menu {
|
||||||
this.element.innerHTML = "";
|
this.element.innerHTML = "";
|
||||||
this.element.removeAttribute("data-filetreeid"); // 用于标记文档数右键所选文档 https://ld246.com/article/1667311960383
|
this.element.removeAttribute("data-filetreeid"); // 用于标记文档数右键所选文档 https://ld246.com/article/1667311960383
|
||||||
this.element.classList.add("fn__none");
|
this.element.classList.add("fn__none");
|
||||||
this.element.removeAttribute("style"); // 页签下拉需要设置 overflow 和 max-height
|
this.element.classList.remove("b3-menu--list");
|
||||||
|
this.element.removeAttribute("style"); // zIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
public append(element?: HTMLElement) {
|
public append(element?: HTMLElement) {
|
||||||
|
|
|
||||||
|
|
@ -266,8 +266,7 @@ export const openFileAttr = (attrs: IObject, id: string, focusName = "bookmark")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
window.siyuan.menus.menu.element.style.zIndex = "310";
|
window.siyuan.menus.menu.element.style.zIndex = "310";
|
||||||
window.siyuan.menus.menu.element.style.overflow = "auto";
|
window.siyuan.menus.menu.element.classList.add("b3-menu--list")
|
||||||
window.siyuan.menus.menu.element.style.maxHeight = "60vh";
|
|
||||||
window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY + 16, w: 16});
|
window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY + 16, w: 16});
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -473,8 +472,7 @@ export const openAttr = (nodeElement: Element, protyle: IProtyle, focusName = "b
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
window.siyuan.menus.menu.element.style.zIndex = "310";
|
window.siyuan.menus.menu.element.style.zIndex = "310";
|
||||||
window.siyuan.menus.menu.element.style.overflow = "auto";
|
window.siyuan.menus.menu.element.classList.add("b3-menu--list")
|
||||||
window.siyuan.menus.menu.element.style.maxHeight = "60vh";
|
|
||||||
window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY + 16, w: 16});
|
window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY + 16, w: 16});
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue