fix: lint

This commit is contained in:
07akioni 2024-07-20 22:24:12 +08:00
parent 899f79f8a2
commit 7a805289de
3 changed files with 20 additions and 21 deletions

View File

@ -116,10 +116,11 @@ export default defineConfig({
},
transformHtml(code, id) {
const html = id.split('/').pop()
if (!html) return
if (!html)
return
const style = fileAndStyles[`/${html}`]
if (style) {
return code.replace(/<\/head>/, style + '</head>')
return code.replace(/<\/head>/, `${style}</head>`)
}
}
})

View File

@ -116,10 +116,11 @@ export default defineConfig({
},
transformHtml(code, id) {
const html = id.split('/').pop()
if (!html) return
if (!html)
return
const style = fileAndStyles[`/${html}`]
if (style) {
return code.replace(/<\/head>/, style + '</head>')
return code.replace(/<\/head>/, `${style}</head>`)
}
}
})

View File

@ -34,15 +34,12 @@ export default defineComponent({
const scrollTop = containerRef?.scrollTop
if (
containerRef &&
scrollHeight !== undefined &&
clientHeight !== undefined &&
scrollTop !== undefined
) {
if (
scrollTop + clientHeight >=
scrollHeight - props.distance
containerRef
&& scrollHeight !== undefined
&& clientHeight !== undefined
&& scrollTop !== undefined
) {
if (scrollTop + clientHeight >= scrollHeight - props.distance) {
loading = true
try {
await props.onLoad?.()