chore: eslint 配置
This commit is contained in:
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user