💄
This commit is contained in:
parent
190b82fb39
commit
bb49855133
2 changed files with 4 additions and 3 deletions
|
@ -117,7 +117,7 @@ export const openMenuPanel = (options: {
|
|||
setPosition(menuElement, cellRect.left, cellRect.bottom, cellRect.height);
|
||||
}, Constants.TIMEOUT_LOAD); // 等待加载
|
||||
} else if (options.type === "relation") {
|
||||
bindRelationEvent({protyle: options.protyle, data, menuElement, cellElements: options.cellElements});
|
||||
bindRelationEvent({menuElement, cellElements: options.cellElements});
|
||||
} else if (options.type === "rollup") {
|
||||
bindRollupEvent({protyle: options.protyle, data, menuElement});
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import {transaction} from "../../wysiwyg/transaction";
|
|||
import {updateCellsValue} from "./cell";
|
||||
import {updateAttrViewCellAnimation} from "./action";
|
||||
import {focusBlock} from "../../util/selection";
|
||||
import {setPosition} from "../../../util/setPosition";
|
||||
|
||||
const genSearchList = (element: Element, keyword: string, avId: string, cb?: () => void) => {
|
||||
fetchPost("/api/av/searchAttributeView", {keyword}, (response) => {
|
||||
|
@ -214,8 +215,6 @@ const genSelectItemHTML = (type: "selected" | "empty" | "unselect", id?: string,
|
|||
};
|
||||
|
||||
export const bindRelationEvent = (options: {
|
||||
protyle: IProtyle,
|
||||
data: IAV,
|
||||
menuElement: HTMLElement,
|
||||
cellElements: HTMLElement[]
|
||||
}) => {
|
||||
|
@ -251,6 +250,8 @@ export const bindRelationEvent = (options: {
|
|||
options.menuElement.innerHTML = `<div class="b3-menu__items">${selectHTML || genSelectItemHTML("empty")}
|
||||
<button class="b3-menu__separator"></button>
|
||||
${html || genSelectItemHTML("empty")}</div>`;
|
||||
const cellRect = options.cellElements[options.cellElements.length - 1].getBoundingClientRect();
|
||||
setPosition( options.menuElement, cellRect.left, cellRect.bottom, cellRect.height);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue