Skip to content

Commit 9ff5d1b

Browse files
committed
fix: backToTop percentage calculate
1 parent a4a9262 commit 9ff5d1b

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

packages/valaxy/src/client/composables/widgets/backToTop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function useBackToTop(options: {
1616
const { y } = useWindowScroll()
1717

1818
const percentage = computed(() => {
19-
return y.value / document.body.clientHeight
19+
return y.value / (document.body.scrollHeight - window.innerHeight)
2020
})
2121

2222
const show = computed(() => y.value > options.offset)

packages/valaxy/src/node/plugins/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ function generateLocales(roots: string[]) {
4040
roots.forEach((root, i) => {
4141
languages.forEach((lang) => {
4242
const langYml = `${root}/locales/${lang}.yml`
43-
console.log(langYml)
4443
if (fs.existsSync(langYml)) {
4544
const varName = lang.replace('-', '') + i
4645
imports.push(`import ${varName} from "${langYml}"`)

0 commit comments

Comments
 (0)