mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-01 14:28:49 +01:00
🚨
This commit is contained in:
parent
09e5828ffe
commit
17e52cc49c
3 changed files with 8 additions and 8 deletions
|
|
@ -459,7 +459,7 @@ export const openCardByData = async (app: App, cardsData: ICardData, cardType: T
|
|||
}
|
||||
let lastRange: Range;
|
||||
if (getSelection().rangeCount > 0) {
|
||||
lastRange = getSelection().getRangeAt(0)
|
||||
lastRange = getSelection().getRangeAt(0);
|
||||
}
|
||||
const dialog = new Dialog({
|
||||
positionId: Constants.DIALOG_OPENCARD,
|
||||
|
|
@ -474,7 +474,7 @@ export const openCardByData = async (app: App, cardsData: ICardData, cardType: T
|
|||
}
|
||||
}
|
||||
if (lastRange) {
|
||||
focusByRange(lastRange)
|
||||
focusByRange(lastRange);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone"].includes
|
|||
dragBlockElement = hasClosestBlock(window.siyuan.dragElement) as HTMLElement;
|
||||
|
||||
const ghostElement = document.createElement("div");
|
||||
ghostElement.className = "block__icons"
|
||||
ghostElement.className = "block__icons";
|
||||
ghostElement.innerHTML = target.nextElementSibling.outerHTML;
|
||||
ghostElement.setAttribute("style", "width: 160px;position:fixed;opacity:.1;");
|
||||
document.body.append(ghostElement);
|
||||
|
|
@ -197,7 +197,7 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone"].includes
|
|||
});
|
||||
element.addEventListener("drop", () => {
|
||||
window.siyuan.dragElement.style.opacity = "";
|
||||
const targetElement = element.querySelector(".dragover__bottom, .dragover__top") as HTMLElement
|
||||
const targetElement = element.querySelector(".dragover__bottom, .dragover__top") as HTMLElement;
|
||||
if (targetElement && dragBlockElement) {
|
||||
const isBottom = targetElement.classList.contains("dragover__bottom");
|
||||
transaction(protyle, [{
|
||||
|
|
@ -212,9 +212,9 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone"].includes
|
|||
id
|
||||
}]);
|
||||
if (isBottom) {
|
||||
targetElement.after(window.siyuan.dragElement)
|
||||
targetElement.after(window.siyuan.dragElement);
|
||||
} else {
|
||||
targetElement.before(window.siyuan.dragElement)
|
||||
targetElement.before(window.siyuan.dragElement);
|
||||
}
|
||||
targetElement.classList.remove("dragover__bottom", "dragover__top");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v
|
|||
}
|
||||
// header
|
||||
let tableHTML = '<div class="av__row av__row--header"><div class="av__firstcol av__colsticky"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
||||
let calcHTML = '';
|
||||
let calcHTML = "";
|
||||
let pinIndex = -1;
|
||||
let pinMaxIndex = -1;
|
||||
let indexWidth = 0;
|
||||
|
|
@ -297,7 +297,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
openMenuPanel({protyle, blockElement: item, type: "edit", colId: operation.id});
|
||||
}
|
||||
if (["updateAttrViewColRollup","updateAttrViewColTemplate", "updateAttrViewCell", "addAttrViewCol"].includes(operation.action)) {
|
||||
const attrElement = document.querySelector(`.b3-dialog--open[data-key="${Constants.DIALOG_ATTR}"] div[data-av-id="${operation.avID}"]`) as HTMLElement
|
||||
const attrElement = document.querySelector(`.b3-dialog--open[data-key="${Constants.DIALOG_ATTR}"] div[data-av-id="${operation.avID}"]`) as HTMLElement;
|
||||
if (attrElement) {
|
||||
// 更新属性面板
|
||||
renderAVAttribute(attrElement.parentElement, attrElement.dataset.nodeId, protyle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue