chore: eslint 配置
All checks were successful
/ depcheck (push) Successful in 2m19s
/ playwright (push) Successful in 1m45s
/ surge (push) Successful in 2m48s
/ build-and-deploy-to-vercel (push) Successful in 3m10s

This commit is contained in:
mini2024
2025-03-05 00:57:51 +08:00
parent feb7659b75
commit 2b7186ef69
35 changed files with 455 additions and 458 deletions

View File

@@ -6,7 +6,7 @@ function checkIsVisible(el: Element, root: Element | null = null) {
const elRect = el.getBoundingClientRect();
const rootRect = root
? root.getBoundingClientRect()
: { top: 0, left: 0, bottom: window.innerHeight, right: window.innerWidth };
: { bottom: window.innerHeight, left: 0, right: window.innerWidth, top: 0 };
return (
elRect.bottom >= rootRect.top &&
@@ -32,26 +32,26 @@ function checkIsVisible(el: Element, root: Element | null = null) {
*/
const props = defineProps<{
loading: boolean;
complete: boolean;
error: boolean;
errorText: string;
loading: boolean;
}>();
const emit = defineEmits<{
load: [];
clickError: [];
load: [];
}>();
defineSlots<{
// 加载中
loading(): unknown;
// 加载完成(还有更多)
loaded(): unknown;
// 加载完成(没有更多了)
complete(): unknown;
// 加载失败
error(): unknown;
// 加载完成(还有更多)
loaded(): unknown;
// 加载中
loading(): unknown;
}>();
const check = (reason?: string) => {