This commit is contained in:
parent
b8046c9ad7
commit
44d149d392
2 changed files with 4 additions and 3 deletions
|
@ -330,6 +330,7 @@ const dragSame = async (protyle: IProtyle, sourceElements: Element[], targetElem
|
|||
}
|
||||
}
|
||||
if (item.getAttribute("data-type") === "NodeHeading" && item.getAttribute("fold") === "1") {
|
||||
item.removeAttribute("fold");
|
||||
foldHeadingIds.push(id);
|
||||
const headingIds = await fetchSyncPost("/api/block/getHeadingChildrenIDs", {id})
|
||||
headingIds.data.reverse().forEach((headingId: string) => {
|
||||
|
|
|
@ -73,14 +73,14 @@ const promiseTransaction = () => {
|
|||
return;
|
||||
}
|
||||
countBlockWord([], protyle.block.rootID, true);
|
||||
if (doOperations[0].action === "setAttrs") {
|
||||
if (response.data[0].doOperations[0].action === "setAttrs") {
|
||||
const gutterFoldElement = protyle.gutter.element.querySelector('[data-type="fold"]');
|
||||
if (gutterFoldElement) {
|
||||
gutterFoldElement.removeAttribute("disabled");
|
||||
}
|
||||
// 仅在 alt+click 箭头折叠时才会触发
|
||||
protyle.wysiwyg.element.querySelectorAll('[data-type="NodeBlockQueryEmbed"]').forEach((item) => {
|
||||
if (item.querySelector(`[data-node-id="${doOperations[0].id}"]`)) {
|
||||
if (item.querySelector(`[data-node-id="${response.data[0].doOperations[0].id}"]`)) {
|
||||
item.removeAttribute("data-render");
|
||||
blockRender(protyle, item);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ const promiseTransaction = () => {
|
|||
if (getSelection().rangeCount > 0) {
|
||||
range = getSelection().getRangeAt(0);
|
||||
}
|
||||
doOperations.forEach(operation => {
|
||||
response.data[0].doOperations.forEach((operation: IOperation) => {
|
||||
if (operation.action === "unfoldHeading" || operation.action === "foldHeading") {
|
||||
const gutterFoldElement = protyle.gutter.element.querySelector('[data-type="fold"]');
|
||||
if (gutterFoldElement) {
|
||||
|
|
Loading…
Add table
Reference in a new issue