diff --git a/src/views/template/index.vue b/src/views/template/index.vue index e1260c1..131a327 100644 --- a/src/views/template/index.vue +++ b/src/views/template/index.vue @@ -64,6 +64,19 @@ + + +
+ +
+ { page.value = 1; getTmplListHandel(); }; + +// 底部「查看更多」:翻到下一页,并平滑回到列表顶部 +const loadMore = () => { + if (page.value * pageSize.value >= total.value) return; + page.value += 1; + getTmplListHandel().then(() => { + document.getElementById('imgBox')?.scrollIntoView({ behavior: 'smooth', block: 'start' }); + }); +}; + getTmplListHandel(); const toInfo = (info) => { @@ -250,6 +273,58 @@ const toInfo = (info) => { } } +// 底部「查看更多」大按钮:显眼引导,让用户知道下面还有更多模板 +.load-more { + width: 1200px; + margin: 26px auto 6px; + text-align: center; + + .load-more-btn { + min-width: 420px; + height: 56px; + padding: 0 42px; + font-size: 17px; + font-weight: 700; + letter-spacing: 1px; + color: #fff; + border: none; + border-radius: 28px; + background: linear-gradient(135deg, #2d8cf0 0%, #67c6ff 100%); + box-shadow: 0 10px 24px rgba(45, 140, 240, 0.4); + transition: all 0.25s ease; + + &:hover:not(.ivu-btn-disabled) { + transform: translateY(-3px); + box-shadow: 0 14px 30px rgba(45, 140, 240, 0.5); + background: linear-gradient(135deg, #1f7de0 0%, #56bcff 100%); + } + + &.ivu-btn-disabled { + background: #f2f4f7; + color: #9aa5b1; + box-shadow: none; + opacity: 1; + } + + .arrow { + display: inline-block; + margin-left: 8px; + animation: bounce-down 1.2s infinite; + } + } +} + +@keyframes bounce-down { + 0%, + 100% { + transform: translateY(0); + } + + 50% { + transform: translateY(5px); + } +} + // 分页 .page { margin: 20px auto;