Skip to content

Commit

Permalink
🚨
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Mar 10, 2024
1 parent 09d1d7c commit 9989d79
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/src/ai/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/header/Title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>&nbsp;`
avTitle += `<span data-av-id="${item.id}" data-popover-url="/api/av/getMirrorDatabaseBlocks" class="popover__block">${item.name}</span>&nbsp;`;
});
if (avTitle) {
avTitle = avTitle.substring(0, avTitle.length - 6);
Expand Down
12 changes: 6 additions & 6 deletions app/src/protyle/render/av/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/render/av/row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
// 有排序需要加入最后一行
Expand Down

0 comments on commit 9989d79

Please sign in to comment.