🚨
This commit is contained in:
parent
09d1d7c874
commit
9989d79060
4 changed files with 9 additions and 9 deletions
|
@ -233,7 +233,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||
element.setAttribute("style", "height: 100%;padding: 0 16px;");
|
||||
element.querySelectorAll(".b3-menu__separator").forEach(item => {
|
||||
item.remove();
|
||||
})
|
||||
});
|
||||
/// #endif
|
||||
const listElement = element.querySelector(".b3-list");
|
||||
const inputElement = element.querySelector("input");
|
||||
|
|
|
@ -296,7 +296,7 @@ export class Title {
|
|||
if (response.data.ial["custom-avs"]) {
|
||||
let avTitle = "";
|
||||
response.data.attrViews.forEach((item: { id: string, name: string }) => {
|
||||
avTitle += `<span data-av-id="${item.id}" data-popover-url="/api/av/getMirrorDatabaseBlocks" class="popover__block">${item.name}</span> `
|
||||
avTitle += `<span data-av-id="${item.id}" data-popover-url="/api/av/getMirrorDatabaseBlocks" class="popover__block">${item.name}</span> `;
|
||||
});
|
||||
if (avTitle) {
|
||||
avTitle = avTitle.substring(0, avTitle.length - 6);
|
||||
|
|
|
@ -307,10 +307,10 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value)}</div>`;
|
|||
} else {
|
||||
viewsElement.classList.remove("av__views--show");
|
||||
}
|
||||
updateSearch(e, protyle)
|
||||
updateSearch(e, protyle);
|
||||
});
|
||||
searchInputElement.addEventListener("compositionend", () => {
|
||||
updateSearch(e, protyle)
|
||||
updateSearch(e, protyle);
|
||||
});
|
||||
searchInputElement.addEventListener("blur", (event: KeyboardEvent) => {
|
||||
if (event.isComposing) {
|
||||
|
@ -341,15 +341,15 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value)}</div>`;
|
|||
}
|
||||
};
|
||||
|
||||
let searchTimeout: number
|
||||
let searchTimeout: number;
|
||||
|
||||
const updateSearch = (e: HTMLElement, protyle: IProtyle) => {
|
||||
clearTimeout(searchTimeout)
|
||||
clearTimeout(searchTimeout);
|
||||
searchTimeout = window.setTimeout(() => {
|
||||
e.removeAttribute("data-render");
|
||||
avRender(e, protyle)
|
||||
avRender(e, protyle);
|
||||
}, Constants.TIMEOUT_INPUT);
|
||||
}
|
||||
};
|
||||
|
||||
const refreshTimeouts: {
|
||||
[key: string]: number;
|
||||
|
|
|
@ -94,7 +94,7 @@ const setPage = (blockElement: Element) => {
|
|||
export const insertAttrViewBlockAnimation = (protyle: IProtyle, blockElement: Element, srcIDs: string[], previousId: string, avId?: string,) => {
|
||||
if ((blockElement.querySelector('[data-type="av-search"]') as HTMLInputElement).value !== "") {
|
||||
showMessage(window.siyuan.languages.insertRowTip);
|
||||
return
|
||||
return;
|
||||
}
|
||||
let previousElement = blockElement.querySelector(`.av__row[data-id="${previousId}"]`) || blockElement.querySelector(".av__row--header");
|
||||
// 有排序需要加入最后一行
|
||||
|
|
Loading…
Add table
Reference in a new issue