Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zzlb0224 committed Jul 14, 2024
1 parent 5799494 commit 5509d24
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
12 changes: 5 additions & 7 deletions src/component/PopupRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@ export function PopupRoot({
const size = {
width: selectionPopup.clientWidth,
height: selectionPopup.clientHeight,
}
};
setSelectionPopupSize(size);
ztoolkit.log("监听宽度的变化", selectionPopupSize, size)
ztoolkit.log("监听宽度的变化", selectionPopupSize, size);
});
resizeObserver.observe(selectionPopup);
setSelectionPopupSize({
Expand Down Expand Up @@ -1102,8 +1102,8 @@ export function PopupRoot({
// autoFocus={bAutoFocus}
defaultValue={searchTag}
onInput={(e) => {
ztoolkit.log("onInput", e.currentTarget.value, e)
setSearchTag(e.currentTarget.value)
ztoolkit.log("onInput", e.currentTarget.value, e);
setSearchTag(e.currentTarget.value);
}}
style={{ ...inputWidth(searchTag), minWidth: "18ch" }}
placeholder="搜索标签,按回车添加"
Expand Down Expand Up @@ -1325,9 +1325,7 @@ export function PopupRoot({
const clickMeButtonRef = React.useRef<HTMLElement | null>(null);
{
if (!pSingleWindow) {
return <>
{handleContentDiv()}
</>;
return <>{handleContentDiv()}</>;
}
return (
<>
Expand Down
24 changes: 12 additions & 12 deletions src/utils/zzlb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,12 @@ const memAllTagsInLibraryAsync = memoize(async () => {
);
const itemTags = getPref("item-tags")
? items.flatMap((f) =>
f.getTags().map((a) => ({
tag: a.tag,
type: a.type,
dateModified: f.dateModified,
})),
)
f.getTags().map((a) => ({
tag: a.tag,
type: a.type,
dateModified: f.dateModified,
})),
)
: [];
return groupBy([...tags, ...itemTags], (t14) => t14.tag);
});
Expand Down Expand Up @@ -409,7 +409,7 @@ export async function openAnnotation(itemOrKeyOrId: Zotero.Item | string | numbe
}
}

export async function injectCSSToReader() { }
export async function injectCSSToReader() {}

export const memSVG = memoize(
async (href) => await getFileContent(href),
Expand Down Expand Up @@ -445,11 +445,11 @@ export async function injectCSS(doc: Document | HTMLDivElement, filename: string
ignoreIfExists: true,
},
doc.querySelector("linkset") ||
doc.querySelector("head") ||
doc.querySelector("body") ||
doc.querySelector("div") ||
doc.children[0] ||
doc,
doc.querySelector("head") ||
doc.querySelector("body") ||
doc.querySelector("div") ||
doc.children[0] ||
doc,
);
// ztoolkit.log("加载css", d);
}
Expand Down

0 comments on commit 5509d24

Please sign in to comment.