mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-04 20:00:17 +01:00
This commit is contained in:
parent
cab8ea3a5d
commit
05a2cacda9
5 changed files with 9 additions and 6 deletions
|
|
@ -100,6 +100,8 @@
|
|||
outline: none;
|
||||
white-space: nowrap;
|
||||
overflow: auto;
|
||||
padding-right: 0;
|
||||
font-size: 1em;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
|
|||
const searchElement = blockElement.querySelector('div[data-type="av-search"]') as HTMLInputElement;
|
||||
searchElement.style.width = "128px";
|
||||
searchElement.style.paddingLeft = "";
|
||||
searchElement.style.paddingRight = "";
|
||||
searchElement.style.marginRight = "1em";
|
||||
const viewsElement = hasClosestByClassName(searchElement, "av__views");
|
||||
if (viewsElement) {
|
||||
viewsElement.classList.add("av__views--show");
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ export const afterRenderGallery = (options: ITableOptions) => {
|
|||
viewsElement.classList.remove("av__views--show");
|
||||
searchInputElement.style.width = "0";
|
||||
searchInputElement.style.paddingLeft = "0";
|
||||
searchInputElement.style.paddingRight = "0";
|
||||
searchInputElement.style.marginRight = "0";
|
||||
}
|
||||
});
|
||||
addClearButton({
|
||||
|
|
@ -262,7 +262,7 @@ export const afterRenderGallery = (options: ITableOptions) => {
|
|||
viewsElement.classList.remove("av__views--show");
|
||||
searchInputElement.style.width = "0";
|
||||
searchInputElement.style.paddingLeft = "0";
|
||||
searchInputElement.style.paddingRight = "0";
|
||||
searchInputElement.style.marginRight = "0";
|
||||
focusBlock(options.blockElement);
|
||||
updateSearch(options.blockElement, options.protyle);
|
||||
/// #if MOBILE
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ const afterRenderTable = (options: ITableOptions) => {
|
|||
viewsElement.classList.remove("av__views--show");
|
||||
searchInputElement.style.width = "0";
|
||||
searchInputElement.style.paddingLeft = "0";
|
||||
searchInputElement.style.paddingRight = "0";
|
||||
searchInputElement.style.marginRight = "0";
|
||||
}
|
||||
});
|
||||
addClearButton({
|
||||
|
|
@ -439,7 +439,7 @@ const afterRenderTable = (options: ITableOptions) => {
|
|||
viewsElement.classList.remove("av__views--show");
|
||||
searchInputElement.style.width = "0";
|
||||
searchInputElement.style.paddingLeft = "0";
|
||||
searchInputElement.style.paddingRight = "0";
|
||||
searchInputElement.style.marginRight = "0";
|
||||
focusBlock(options.blockElement);
|
||||
updateSearch(options.blockElement, options.protyle);
|
||||
/// #if MOBILE
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ const update = (inputElement: HTMLElement, clearElement: Element, right: number)
|
|||
} else {
|
||||
clearElement.classList.remove("fn__none");
|
||||
if (typeof right === "number") {
|
||||
inputElement.style.setProperty("padding-right", `${right * 2 + clearElement.clientWidth}px`, "important");
|
||||
// 数据库搜索需设置 margin
|
||||
inputElement.style.setProperty(inputElement.getAttribute("contenteditable") ? "margin-right" : "padding-right", `${right * 2 + clearElement.clientWidth}px`, "important");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue