Vanessa 2023-12-08 12:48:16 +08:00
parent d84b31a5de
commit 44091d0717
8 changed files with 31 additions and 0 deletions

View file

@ -77,6 +77,23 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
event.preventDefault();
event.stopPropagation();
return true;
} else if (type === "av-add-more") {
const avID = blockElement.getAttribute("data-av-id");
const srcIDs = [Lute.NewNodeID()];
transaction(protyle, [{
action: "insertAttrViewBlock",
avID,
srcIDs,
isDetached: true,
}], [{
action: "removeAttrViewBlock",
srcIDs,
avID,
}]);
insertAttrViewBlockAnimation(blockElement, 1, undefined, avID);
event.preventDefault();
event.stopPropagation();
return true;
} else if (type === "av-more") {
openMenuPanel({protyle, blockElement, type: "config"});
event.preventDefault();

View file

@ -239,6 +239,10 @@ ${cell.color ? `color:${cell.color};` : ""}">${text}</div>`;
<svg><use xlink:href="#iconMore"></use></svg>
</span>
<div class="fn__space"></div>
<span data-type="av-add-more" class="block__icon">
<svg><use xlink:href="#iconAdd"></use></svg>
</span>
<div class="fn__space"></div>
${response.data.isMirror ? ` <span class="block__icon block__icon--show ariaLabel" aria-label="${window.siyuan.languages.mirrorTip}">
<svg><use xlink:href="#iconSplitLR"></use></svg></span><div class="fn__space"></div>` : ""}
</div>
@ -252,6 +256,10 @@ ${cell.color ? `color:${cell.color};` : ""}">${text}</div>`;
<div class="av__colsticky">
<svg><use xlink:href="#iconAdd"></use></svg>
${window.siyuan.languages.addAttr}
<svg><use xlink:href="#loadMore"></use></svg>
${window.siyuan.languages.nextLabel}
<svg data-type="set-page-size"><use xlink:href="#iconMore"></use></svg>
</div>
</div>
<div class="av__row--footer">${calcHTML}</div>

View file

@ -126,6 +126,7 @@ const updatePageSize = (currentPageSIze: string, newPageSize: string) => {
return;
}
}
export const setPageSize = (target: HTMLElement) => {
const menu = new Menu("av-page-size");
if (menu.isOpen) {