mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-07 21:22:34 +01:00
🚨
This commit is contained in:
parent
b399b5e877
commit
eb18429d6e
9 changed files with 20 additions and 21 deletions
|
|
@ -101,4 +101,4 @@ export const updateReadonly = (target: Element, protyle: IProtyle) => {
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import {saveLayout, setPanelFocus} from "../../layout/util";
|
|||
/// #if !BROWSER
|
||||
import {ipcRenderer} from "electron";
|
||||
/// #endif
|
||||
import {disabledProtyle, enableProtyle, onGet} from "../util/onGet";
|
||||
import {onGet} from "../util/onGet";
|
||||
import {hideElements} from "../ui/hideElements";
|
||||
import {confirmDialog} from "../../dialog/confirmDialog";
|
||||
import {reloadProtyle} from "../util/reload";
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export const getCellText = (cellElement: HTMLElement | false) => {
|
|||
} else if (item.getAttribute("data-type") !== "block-more") {
|
||||
cellText += item.textContent + ", ";
|
||||
}
|
||||
})
|
||||
});
|
||||
cellText = cellText.substring(0, cellText.length - 2);
|
||||
} else {
|
||||
cellText = cellElement.textContent;
|
||||
|
|
@ -643,7 +643,7 @@ export const updateHeaderCell = (cellElement: HTMLElement, headerValue: {
|
|||
textElement.insertAdjacentHTML("afterend", '<svg class="av__cellheadericon av__cellheadericon--pin"><use xlink:href="#iconPin"></use></svg>');
|
||||
}
|
||||
} else {
|
||||
cellElement.querySelector(".av__cellheadericon--pin")?.remove()
|
||||
cellElement.querySelector(".av__cellheadericon--pin")?.remove();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -664,4 +664,4 @@ export const getPositionByCellElement = (cellElement: HTMLElement) => {
|
|||
celIndex++;
|
||||
}
|
||||
return {rowIndex, celIndex};
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ const setHTML = (options: {
|
|||
}
|
||||
protyle.block.showAll = options.action.includes(Constants.CB_GET_ALL);
|
||||
const REMOVED_OVER_HEIGHT = protyle.contentElement.clientHeight * 8;
|
||||
const isUpdate = protyle.wysiwyg.element.innerHTML !== ""
|
||||
const isUpdate = protyle.wysiwyg.element.innerHTML !== "";
|
||||
if (options.action.includes(Constants.CB_GET_APPEND)) {
|
||||
// 动态加载移除
|
||||
if (!protyle.wysiwyg.element.querySelector(".protyle-wysiwyg--select") && !protyle.scroll.keepLazyLoad && protyle.contentElement.scrollHeight > REMOVED_OVER_HEIGHT) {
|
||||
|
|
|
|||
|
|
@ -447,10 +447,10 @@ export class WYSIWYG {
|
|||
}
|
||||
nodeElement.querySelectorAll(".av__cell--select").forEach(item => {
|
||||
item.classList.remove("av__cell--select");
|
||||
})
|
||||
});
|
||||
nodeElement.querySelectorAll(".av__drag-fill").forEach(item => {
|
||||
item.remove();
|
||||
})
|
||||
});
|
||||
avCellElement.classList.add("av__cell--select");
|
||||
const originIndex = getPositionByCellElement(avCellElement);
|
||||
let moveCellElement: HTMLElement;
|
||||
|
|
@ -465,7 +465,7 @@ export class WYSIWYG {
|
|||
const newIndex = getPositionByCellElement(moveCellElement);
|
||||
nodeElement.querySelectorAll(".av__cell--active").forEach((item: HTMLElement) => {
|
||||
item.classList.remove("av__cell--active");
|
||||
})
|
||||
});
|
||||
nodeElement.querySelectorAll(".av__row").forEach((rowElement: HTMLElement, index: number) => {
|
||||
if (index >= Math.min(originIndex.rowIndex, newIndex.rowIndex) && index <= Math.max(originIndex.rowIndex, newIndex.rowIndex)) {
|
||||
rowElement.querySelectorAll(".av__cell").forEach((cellElement: HTMLElement, cellIndex: number) => {
|
||||
|
|
@ -475,7 +475,7 @@ export class WYSIWYG {
|
|||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -487,7 +487,7 @@ export class WYSIWYG {
|
|||
documentSelf.onselect = null;
|
||||
if (lastCellElement) {
|
||||
focusBlock(nodeElement);
|
||||
lastCellElement.insertAdjacentHTML("beforeend", `<div aria-label="${window.siyuan.languages.dragFill}" class="av__drag-fill ariaLabel"></div>`)
|
||||
lastCellElement.insertAdjacentHTML("beforeend", `<div aria-label="${window.siyuan.languages.dragFill}" class="av__drag-fill ariaLabel"></div>`);
|
||||
this.preventClick = true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import {fontEvent} from "../toolbar/Font";
|
|||
import {listIndent, listOutdent} from "./list";
|
||||
import {newFileContentBySelect, rename, replaceFileName} from "../../editor/rename";
|
||||
import {insertEmptyBlock, jumpToParentNext} from "../../block/util";
|
||||
import {isLocalPath, pathPosix} from "../../util/pathName";
|
||||
import {isLocalPath} from "../../util/pathName";
|
||||
/// #if !MOBILE
|
||||
import {openBy, openFileById} from "../../editor/util";
|
||||
/// #endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue