mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-18 12:34:25 +08:00
fix: lint
This commit is contained in:
parent
899f79f8a2
commit
7a805289de
@ -40,13 +40,13 @@ import { useRoute } from 'vitepress'
|
||||
const { Layout } = DefaultTheme
|
||||
|
||||
const CssRenderStyle = defineComponent({
|
||||
setup () {
|
||||
setup() {
|
||||
const collect = inject('css-render-collect')
|
||||
return {
|
||||
style: collect()
|
||||
}
|
||||
},
|
||||
render () {
|
||||
render() {
|
||||
return h('css-render-style', {
|
||||
innerHTML: this.style
|
||||
})
|
||||
@ -54,7 +54,7 @@ const CssRenderStyle = defineComponent({
|
||||
})
|
||||
|
||||
const VitepressPath = defineComponent({
|
||||
setup () {
|
||||
setup() {
|
||||
const route = useRoute()
|
||||
return () => {
|
||||
return h('vitepress-path', null, [route.path])
|
||||
@ -63,7 +63,7 @@ const VitepressPath = defineComponent({
|
||||
})
|
||||
|
||||
const NaiveUIProvider = defineComponent({
|
||||
render () {
|
||||
render() {
|
||||
return h(
|
||||
NConfigProvider,
|
||||
{ abstract: true, inlineThemeDisabled: true },
|
||||
@ -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>`)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -40,13 +40,13 @@ import { useRoute } from 'vitepress'
|
||||
const { Layout } = DefaultTheme
|
||||
|
||||
const CssRenderStyle = defineComponent({
|
||||
setup () {
|
||||
setup() {
|
||||
const collect = inject('css-render-collect')
|
||||
return {
|
||||
style: collect()
|
||||
}
|
||||
},
|
||||
render () {
|
||||
render() {
|
||||
return h('css-render-style', {
|
||||
innerHTML: this.style
|
||||
})
|
||||
@ -54,7 +54,7 @@ const CssRenderStyle = defineComponent({
|
||||
})
|
||||
|
||||
const VitepressPath = defineComponent({
|
||||
setup () {
|
||||
setup() {
|
||||
const route = useRoute()
|
||||
return () => {
|
||||
return h('vitepress-path', null, [route.path])
|
||||
@ -63,7 +63,7 @@ const VitepressPath = defineComponent({
|
||||
})
|
||||
|
||||
const NaiveUIProvider = defineComponent({
|
||||
render () {
|
||||
render() {
|
||||
return h(
|
||||
NConfigProvider,
|
||||
{ abstract: true, inlineThemeDisabled: true },
|
||||
@ -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>`)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -32,17 +32,14 @@ export default defineComponent({
|
||||
const scrollHeight = containerRef?.scrollHeight
|
||||
const clientHeight = containerRef?.clientHeight
|
||||
const scrollTop = containerRef?.scrollTop
|
||||
|
||||
|
||||
if (
|
||||
containerRef &&
|
||||
scrollHeight !== undefined &&
|
||||
clientHeight !== undefined &&
|
||||
scrollTop !== undefined
|
||||
containerRef
|
||||
&& scrollHeight !== undefined
|
||||
&& clientHeight !== undefined
|
||||
&& scrollTop !== undefined
|
||||
) {
|
||||
if (
|
||||
scrollTop + clientHeight >=
|
||||
scrollHeight - props.distance
|
||||
) {
|
||||
if (scrollTop + clientHeight >= scrollHeight - props.distance) {
|
||||
loading = true
|
||||
try {
|
||||
await props.onLoad?.()
|
||||
|
Loading…
Reference in New Issue
Block a user