diff --git a/vite-tailwindcss/src/router/index.js b/vite-tailwindcss/src/router/index.js index dc04d54..5bbbbaa 100644 --- a/vite-tailwindcss/src/router/index.js +++ b/vite-tailwindcss/src/router/index.js @@ -7,6 +7,7 @@ const routes = [ path: '/', name: 'Home', component: () => import('@/views/index/index.vue'), + meta: { title: '💕李琦❤️李逸烁 💒婚礼请柬' }, }, { path: '/hb', @@ -34,11 +35,13 @@ const routes = [ path: '/lijin', name: 'CashGift', component: () => import('@/views/lijin/index.vue'), + meta: { title: '礼金登记' }, }, { path: '/lijin/list', name: 'CashGiftList', component: () => import('@/views/lijin/list.vue'), + meta: { title: '礼金明细' }, }, { path: '/login', @@ -68,4 +71,10 @@ router.beforeEach((to) => { } }) +router.afterEach((to) => { + // 红包请柬页由组件按配置自行设置 title + if (to.meta.posterSide) return + if (to.meta.title) document.title = String(to.meta.title) +}) + export default router diff --git a/vite-tailwindcss/src/views/index/index.vue b/vite-tailwindcss/src/views/index/index.vue index 429fd16..7a44ae0 100644 --- a/vite-tailwindcss/src/views/index/index.vue +++ b/vite-tailwindcss/src/views/index/index.vue @@ -2759,19 +2759,22 @@ watch( will-change: transform; } .scroll-progress-xi { + /* width:100% 使 transform 的 % 相对进度条宽度,而非字本身 */ position: absolute; - top: 0; + top: -1px; left: 0; + width: 100%; font-size: 11px; line-height: 1; color: #c62828; text-shadow: 0 0 6px rgba(253, 251, 247, 0.95), 0 1px 0 rgba(255, 255, 255, 0.8); - transform: translate3d(calc(var(--scroll-p, 0) * (100% - 1.1em) + 0.55em - 50%), 0, 0); + transform: translate3d(calc(var(--scroll-p, 0) * (100% - 1.1em)), 0, 0); will-change: transform; font-weight: 700; letter-spacing: 0; + pointer-events: none; } .player-panel { position: absolute;