mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
Compare commits
2 Commits
36c7316a7f
...
f38d3a192b
Author | SHA1 | Date | |
---|---|---|---|
|
f38d3a192b | ||
|
6ff8b275e7 |
@ -53,12 +53,8 @@ export default function Switch({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const currentTagElement = tagRefs.current[allTag.indexOf(nowTag)]?.current
|
const currentTagElement = tagRefs.current[allTag.indexOf(nowTag)]?.current
|
||||||
if (currentTagElement) {
|
if (currentTagElement) {
|
||||||
const parentPadding = 1
|
|
||||||
setIndicator({
|
setIndicator({
|
||||||
x:
|
x: currentTagElement.offsetLeft,
|
||||||
allTag.indexOf(nowTag) !== 0
|
|
||||||
? currentTagElement.offsetLeft - parentPadding
|
|
||||||
: currentTagElement.offsetLeft,
|
|
||||||
w: currentTagElement.offsetWidth,
|
w: currentTagElement.offsetWidth,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
"@next/bundle-analyzer": "^15.1.3",
|
"@next/bundle-analyzer": "^15.1.3",
|
||||||
"@tailwindcss/postcss": "^4.0.0-beta.8",
|
"@tailwindcss/postcss": "^4.0.0-beta.8",
|
||||||
"@types/node": "^22.10.5",
|
"@types/node": "^22.10.5",
|
||||||
"@types/react": "^19.0.2",
|
"@types/react": "^19.0.3",
|
||||||
"@types/react-dom": "^19.0.2",
|
"@types/react-dom": "^19.0.2",
|
||||||
"eslint-config-next": "^15.1.3",
|
"eslint-config-next": "^15.1.3",
|
||||||
"eslint-plugin-turbo": "^2.3.3",
|
"eslint-plugin-turbo": "^2.3.3",
|
||||||
|
Loading…
Reference in New Issue
Block a user