添加博客模块,支持Markdown渲染和文章详情页,优化图片懒加载和瀑布流布局

This commit is contained in:
2025-12-30 14:31:04 +08:00
parent 42dcf4195a
commit 79192df508
15 changed files with 3827 additions and 53 deletions
+5 -2
View File
@@ -14,9 +14,9 @@
backgroundColor="transparent"> >
<template #item="{ item }">
<div
class="card rounded-md shadow-lg overflow-hidden group transition-transform duration-300 box-border hover:-translate-y-1.5">
class="card h-full flex items-center justify-center rounded-md shadow-lg overflow-hidden group transition-transform duration-300 box-border hover:-translate-y-1.5">
<!-- <div class="image-wrapper"> -->
<LazyImg class="rounded-md shadow overflow-hidden" :url="item.filepath" />
<LazyImg class="rounded-md shadow overflow-hidden" :Pwidth="item.width" :Pheight="item.height" :url="item.filepath" />
<!-- </div> -->
<div
class="hidden truncate group-hover:block absolute rounded-md z-10 truncate top-0 text-center w-full bg-[#00000070] text-white">
@@ -81,6 +81,7 @@ async function getFileList() {
page_num: pn.value,
page_size: ps.value,
});
// console.log('>>> --> getFileList --> res:', res);
if (res.data.length < ps.value) {
isLoadAll.value = true;
@@ -102,6 +103,8 @@ async function getFileList() {
}
// 监听滚动事件
const handleScroll: any = throttle((e: any) => {
// console.log('>>> --> handleScroll --> loading:', e)