mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
This commit is contained in:
parent
8d593833ab
commit
b1f4443e5f
3 changed files with 9 additions and 10 deletions
|
|
@ -20,7 +20,7 @@ export const insertGalleryItemAnimation = (options: {
|
|||
}) => {
|
||||
(options.blockElement.querySelector('[data-type="av-search"]') as HTMLInputElement).value = "";
|
||||
const groupQuery = options.groupID ? `.av__body[data-group-id="${options.groupID}"] ` : "";
|
||||
let sideItemElement = options.previousId ? options.blockElement.querySelector(`.av__gallery-item[data-id="${options.previousId}"]`) : options.blockElement.querySelector(groupQuery + ".av__gallery-item");
|
||||
let sideItemElement = options.previousId ? options.blockElement.querySelector(groupQuery + `.av__gallery-item[data-id="${options.previousId}"]`) : options.blockElement.querySelector(groupQuery + ".av__gallery-item");
|
||||
const hasSort = options.blockElement.querySelector('.av__views [data-type="av-sort"]').classList.contains("block__icon--active");
|
||||
if (hasSort) {
|
||||
sideItemElement = options.blockElement.querySelector(groupQuery + ".av__gallery-add").previousElementSibling;
|
||||
|
|
@ -89,9 +89,6 @@ ${fieldType === "block" ? ' data-detached="true"' : ""}>${renderCell(genCellValu
|
|||
}
|
||||
});
|
||||
});
|
||||
if (options.srcIDs.length === 1) {
|
||||
popTextCell(options.protyle, [popCellElement], "block");
|
||||
}
|
||||
}
|
||||
setPage(options.blockElement);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
import {fetchPost} from "../../../util/fetch";
|
||||
import {getColIconByType} from "./col";
|
||||
import {Constants} from "../../../constants";
|
||||
import {addDragFill, cellScrollIntoView, renderCell} from "./cell";
|
||||
import {addDragFill, cellScrollIntoView, popTextCell, renderCell} from "./cell";
|
||||
import {unicode2Emoji} from "../../../emoji";
|
||||
import {focusBlock} from "../../util/selection";
|
||||
import {hasClosestBlock, hasClosestByAttribute, hasClosestByClassName} from "../../util/hasClosest";
|
||||
import {stickyRow, updateHeader} from "./row";
|
||||
import {getCalcValue} from "./calc";
|
||||
import {renderAVAttribute} from "./blockAttr";
|
||||
import {showMessage} from "../../../dialog/message";
|
||||
import {addClearButton} from "../../../util/addClearButton";
|
||||
import {escapeAriaLabel, escapeAttr, escapeHtml} from "../../../util/escape";
|
||||
import {electronUndo} from "../../undo";
|
||||
|
|
@ -716,6 +715,12 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
}
|
||||
});
|
||||
}
|
||||
if (operation.srcs.length === 1) {
|
||||
const popCellElement = item.querySelector(`.av__body${operation.groupID ? `[data-group-id="${operation.groupID}"]` : ""} .av__cell[data-block-id="${operation.srcs[0].id}"]`) as HTMLElement;
|
||||
if (popCellElement) {
|
||||
popTextCell(protyle, [popCellElement], "block");
|
||||
}
|
||||
}
|
||||
} else if (operation.action === "addAttrViewView") {
|
||||
if (item.getAttribute("data-node-id") === operation.blockID) {
|
||||
openMenuPanel({protyle, blockElement: item, type: "config"});
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ export const insertAttrViewBlockAnimation = (options: {
|
|||
}) => {
|
||||
(options.blockElement.querySelector('[data-type="av-search"]') as HTMLInputElement).value = "";
|
||||
const groupQuery = options.groupID ? `.av__body[data-group-id="${options.groupID}"] ` : "";
|
||||
let previousElement = options.blockElement.querySelector(`.av__row[data-id="${options.previousId}"]`) || options.blockElement.querySelector(groupQuery + ".av__row--header");
|
||||
let previousElement = options.blockElement.querySelector(groupQuery + `.av__row[data-id="${options.previousId}"]`) || options.blockElement.querySelector(groupQuery + ".av__row--header");
|
||||
// 有排序需要加入最后一行
|
||||
const hasSort = options.blockElement.querySelector('.av__views [data-type="av-sort"]').classList.contains("block__icon--active");
|
||||
if (hasSort) {
|
||||
|
|
@ -190,9 +190,6 @@ ${colType === "block" ? ' data-detached="true"' : ""}>${renderCell(genCellValue(
|
|||
}
|
||||
});
|
||||
});
|
||||
if (options.srcIDs.length === 1 ) {
|
||||
popTextCell(options.protyle, [popCellElement], "block");
|
||||
}
|
||||
}
|
||||
setPage(options.blockElement);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue