mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 PNPM Lint
This commit is contained in:
parent
b5a60fc1fa
commit
6f98849e9c
7 changed files with 8 additions and 12 deletions
|
|
@ -335,7 +335,7 @@ export const showPopover = async (app: App, showRef = false) => {
|
|||
return;
|
||||
}
|
||||
let refDefs: IRefDefs[];
|
||||
let originalRefBlockIDs: IObject
|
||||
let originalRefBlockIDs: IObject;
|
||||
const dataId = popoverTargetElement.getAttribute("data-id");
|
||||
if (dataId) {
|
||||
// backlink/util/hint 上的弹层
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
import {getAllModels} from "../../layout/getAll";
|
||||
import {
|
||||
hasClosestByAttribute,
|
||||
hasClosestByClassName,
|
||||
hasTopClosestByClassName
|
||||
} from "../../protyle/util/hasClosest";
|
||||
import {hasClosestByAttribute, hasClosestByClassName, hasTopClosestByClassName} from "../../protyle/util/hasClosest";
|
||||
import {hideAllElements} from "../../protyle/ui/hideElements";
|
||||
import {isWindow} from "../../util/functions";
|
||||
import {writeText} from "../../protyle/util/compatibility";
|
||||
|
|
@ -19,7 +15,7 @@ export const globalClickHideMenu = (element: HTMLElement) => {
|
|||
window.siyuan.menus.menu.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const globalClick = (event: MouseEvent & { target: HTMLElement }) => {
|
||||
cancelDrag();
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ export const cancelDrag = () => {
|
|||
ghostElement.remove();
|
||||
document.onmousemove = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -874,7 +874,7 @@ export const openMenuPanel = (options: {
|
|||
break;
|
||||
} else if (type === "updateColType") {
|
||||
if (target.dataset.newType !== target.dataset.oldType) {
|
||||
const nameElement = avPanelElement.querySelector('.b3-text-field[data-type="name"]') as HTMLInputElement
|
||||
const nameElement = avPanelElement.querySelector('.b3-text-field[data-type="name"]') as HTMLInputElement;
|
||||
const name = nameElement.value;
|
||||
let newName = name;
|
||||
data.view.columns.find((item: IAVColumn) => {
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
|
|||
// 需等待渲染完,否则 getBoundingClientRect 错误 https://github.com/siyuan-note/siyuan/issues/13787
|
||||
setTimeout(() => {
|
||||
stickyRow(e, editRect, "top");
|
||||
}, Constants.TIMEOUT_LOAD)
|
||||
}, Constants.TIMEOUT_LOAD);
|
||||
}
|
||||
if (footerTransform) {
|
||||
(e.querySelector(".av__row--footer") as HTMLElement).style.transform = footerTransform;
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ export const pasteAsPlainText = async (protyle: IProtyle) => {
|
|||
// Inline-level elements support pasted as plain text https://github.com/siyuan-note/siyuan/issues/8010
|
||||
navigator.clipboard.readText().then(textPlain => {
|
||||
if (getSelection().rangeCount > 0) {
|
||||
const range = getSelection().getRangeAt(0)
|
||||
const range = getSelection().getRangeAt(0);
|
||||
if (hasClosestByAttribute(range.startContainer, "data-type", "code") || hasClosestByClassName(range.startContainer, "hljs")) {
|
||||
insertHTML(textPlain.replace(/\u200D```/g, "```").replace(/```/g, "\u200D```"), protyle);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -545,7 +545,7 @@ const removeLi = (protyle: IProtyle, blockElement: Element, range: Range, isDele
|
|||
transaction(protyle, doOperations, undoOperations);
|
||||
if (listElement.parentElement.classList.contains("sb") &&
|
||||
listElement.parentElement.getAttribute("data-sb-layout") === "col") {
|
||||
const selectsElement: Element[] = []
|
||||
const selectsElement: Element[] = [];
|
||||
let previousElement: Element = listElement;
|
||||
while (previousElement) {
|
||||
selectsElement.push(previousElement);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue