Vanessa 2026-02-26 11:51:51 +08:00
parent cab8ea3a5d
commit 05a2cacda9
5 changed files with 9 additions and 6 deletions

View file

@ -100,6 +100,8 @@
outline: none;
white-space: nowrap;
overflow: auto;
padding-right: 0;
font-size: 1em;
&::-webkit-scrollbar {
display: none;

View file

@ -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");

View file

@ -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

View file

@ -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

View file

@ -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");
}
}
};