diff --git a/src/layout/components/FloatingNavBar.vue b/src/layout/components/FloatingNavBar.vue index 28328fb..2f036ec 100644 --- a/src/layout/components/FloatingNavBar.vue +++ b/src/layout/components/FloatingNavBar.vue @@ -127,6 +127,7 @@ const toolbarColumns = computed(() => Math.max(1, navItems.value.length + (props const toolbarCssVars = computed(() => ({ '--accent-color': designStore.appTheme, '--accent-soft-color': `${designStore.appTheme}33`, + '--toolbar-max-width': toolbarColumns.value >= 5 ? '430px' : '340px', 'gridTemplateColumns': `repeat(${toolbarColumns.value}, 1fr)`, })) @@ -291,7 +292,7 @@ onBeforeUnmount(() => { .floating-toolbar { pointer-events: auto; position: relative; - width: min(92vw, 340px); + width: min(94vw, var(--toolbar-max-width)); height: 62px; display: grid; grid-template-columns: repeat(4, 1fr); @@ -352,9 +353,9 @@ onBeforeUnmount(() => { position: absolute; left: 0; top: 50%; - width: 70px; - height: 44px; - margin-top: -22px; + width: 62px; + height: 38px; + margin-top: -19px; transition: transform 0.28s ease; pointer-events: none; } @@ -411,7 +412,7 @@ onBeforeUnmount(() => { display: grid; place-items: center; color: rgba(255, 255, 255, 0.45); - font-size: 22px; + font-size: 20px; cursor: pointer; transition: color 0.25s ease; } diff --git a/src/layout/index.vue b/src/layout/index.vue index d8d690d..29e7c1d 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -42,6 +42,7 @@ const keepAliveComponents = computed(() => routeStore.keepAliveComponents) const tabbarItems = [ { label: 'Home', path: '/dashboard/index', icon: 'i-ph:house-line' }, + { label: 'Example', path: '/example/index', icon: 'i-ph:flask' }, { label: 'Search', path: '/message/index', icon: 'i-ph:magnifying-glass' }, { label: 'User', path: '/my/index', icon: 'i-ph:user-circle' }, ] diff --git a/src/styles/common.less b/src/styles/common.less index fcdbd22..7f00fd9 100644 --- a/src/styles/common.less +++ b/src/styles/common.less @@ -114,7 +114,6 @@ html.dark { } .van-cell-group--inset { - margin: 16px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.08); diff --git a/src/views/example/index.vue b/src/views/example/index.vue index 27de71f..0b14a7d 100644 --- a/src/views/example/index.vue +++ b/src/views/example/index.vue @@ -4,7 +4,7 @@