Vanessa 2025-08-09 17:36:55 +08:00
parent 8ca9f119d0
commit 7d478190bb
2 changed files with 10 additions and 3 deletions

View file

@ -431,6 +431,10 @@
margin-left: 0;
}
.b3-menu__avemoji {
display: none;
}
&[data-empty="true"] .av__gallery-tip {
display: flex;
}

View file

@ -1120,7 +1120,8 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
transaction(protyle, doOperations, undoOperations);
} else {
const newUpdated = dayjs().format("YYYYMMDDHHmmss");
const groupID = targetElement.parentElement.getAttribute("data-group-id");
const bodyElement = hasClosestByClassName(targetElement, "av__body");
const groupID = bodyElement && bodyElement.getAttribute("data-group-id");
transaction(protyle, [{
action: "insertAttrViewBlock",
avID,
@ -1194,13 +1195,14 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
transaction(protyle, doOperations, undoOperations);
} else {
const newUpdated = dayjs().format("YYYYMMDDHHmmss");
const bodyElement = hasClosestByClassName(targetElement, "av__body");
transaction(protyle, [{
action: "insertAttrViewBlock",
avID,
previousID,
srcs,
blockID: blockElement.dataset.nodeId,
groupID: targetElement.parentElement.getAttribute("data-group-id")
groupID: bodyElement && bodyElement.getAttribute("data-group-id")
}, {
action: "doUpdateUpdated",
id: blockElement.dataset.nodeId,
@ -1310,7 +1312,8 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
const avID = blockElement.getAttribute("data-av-id");
const newUpdated = dayjs().format("YYYYMMDDHHmmss");
const srcs: IOperationSrcs[] = [];
const groupID = targetElement.parentElement.getAttribute("data-group-id");
const bodyElement = hasClosestByClassName(targetElement, "av__body");
const groupID = bodyElement && bodyElement.getAttribute("data-group-id");
ids.forEach(id => {
srcs.push({
id,