卡片悬浮效果优化,页面监听置顶
This commit is contained in:
parent
8d214bdb71
commit
5743749c3f
|
|
@ -58,6 +58,15 @@ const fetchArticles = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 监听分页变化
|
||||||
|
watch(page, () => {
|
||||||
|
fetchArticles()
|
||||||
|
// 滚动到顶部
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||||
|
})
|
||||||
|
|
||||||
// 监听查询参数变化
|
// 监听查询参数变化
|
||||||
watch(() => route.query.code, (newCode, oldCode) => {
|
watch(() => route.query.code, (newCode, oldCode) => {
|
||||||
// 当 code 参数发生变化时(包括从有值变为无值,或从一个值变为另一个值)
|
// 当 code 参数发生变化时(包括从有值变为无值,或从一个值变为另一个值)
|
||||||
|
|
@ -117,7 +126,7 @@ onMounted(() => {
|
||||||
root:'group',
|
root:'group',
|
||||||
container: 'relative grid lg:grid-cols-[1fr_4fr] gap-8 p-6',
|
container: 'relative grid lg:grid-cols-[1fr_4fr] gap-8 p-6',
|
||||||
}"
|
}"
|
||||||
class="hover:shadow-2xl hover:scale-105 hover:translate-x-8 [--spotlight-size:188px]"
|
class="hover:shadow-2xl hover:scale-102 [--spotlight-size:188px]"
|
||||||
orientation="horizontal"
|
orientation="horizontal"
|
||||||
reverse
|
reverse
|
||||||
spotlight
|
spotlight
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user