mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 08:00:13 +01:00
This commit is contained in:
parent
d052c7a7aa
commit
a16affeb9c
2 changed files with 9 additions and 3 deletions
|
|
@ -178,7 +178,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value)}</div>`;
|
||||||
|
|
||||||
e.firstElementChild.outerHTML = `<div class="av__container" style="--av-background:${e.style.backgroundColor || "var(--b3-theme-background)"}">
|
e.firstElementChild.outerHTML = `<div class="av__container" style="--av-background:${e.style.backgroundColor || "var(--b3-theme-background)"}">
|
||||||
<div class="av__header">
|
<div class="av__header">
|
||||||
<div class="fn__flex av__views${isSearching ? " av__views--show" : ""}">
|
<div class="fn__flex av__views${isSearching || query ? " av__views--show" : ""}">
|
||||||
<div class="layout-tab-bar fn__flex">
|
<div class="layout-tab-bar fn__flex">
|
||||||
${tabHTML}
|
${tabHTML}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -206,7 +206,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value)}</div>`;
|
||||||
<svg><use xlink:href="#iconSearch"></use></svg>
|
<svg><use xlink:href="#iconSearch"></use></svg>
|
||||||
</span>
|
</span>
|
||||||
<div style="position: relative">
|
<div style="position: relative">
|
||||||
<input style="${isSearching ? "width:128px" : "width:0;padding-left: 0;padding-right: 0;"}" data-type="av-search" class="b3-text-field b3-text-field--text" placeholder="${window.siyuan.languages.search}">
|
<input style="${isSearching || query ? "width:128px" : "width:0;padding-left: 0;padding-right: 0;"}" data-type="av-search" class="b3-text-field b3-text-field--text" placeholder="${window.siyuan.languages.search}">
|
||||||
</div>
|
</div>
|
||||||
<div class="fn__space"></div>
|
<div class="fn__space"></div>
|
||||||
<span data-type="av-more" class="block__icon">
|
<span data-type="av-more" class="block__icon">
|
||||||
|
|
@ -332,6 +332,8 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value)}</div>`;
|
||||||
searchInputElement.style.width = "0";
|
searchInputElement.style.width = "0";
|
||||||
searchInputElement.style.paddingLeft = "0";
|
searchInputElement.style.paddingLeft = "0";
|
||||||
searchInputElement.style.paddingRight = "0";
|
searchInputElement.style.paddingRight = "0";
|
||||||
|
focusBlock(e);
|
||||||
|
updateSearch(e, protyle);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,13 @@ const setPage = (blockElement: Element) => {
|
||||||
* @param blockElement
|
* @param blockElement
|
||||||
* @param srcIDs
|
* @param srcIDs
|
||||||
* @param previousId
|
* @param previousId
|
||||||
* @param avId 还用于判断是否是插入的 block
|
* @param avId 存在为新增否则为拖拽插入
|
||||||
*/
|
*/
|
||||||
export const insertAttrViewBlockAnimation = (protyle: IProtyle, blockElement: Element, srcIDs: string[], previousId: string, avId?: string,) => {
|
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
|
||||||
|
}
|
||||||
let previousElement = blockElement.querySelector(`.av__row[data-id="${previousId}"]`) || blockElement.querySelector(".av__row--header");
|
let previousElement = blockElement.querySelector(`.av__row[data-id="${previousId}"]`) || blockElement.querySelector(".av__row--header");
|
||||||
// 有排序需要加入最后一行
|
// 有排序需要加入最后一行
|
||||||
if (blockElement.querySelector('.av__views [data-type="av-sort"]').classList.contains("block__icon--active")) {
|
if (blockElement.querySelector('.av__views [data-type="av-sort"]').classList.contains("block__icon--active")) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue