PageSourceSearch

https://xiaoxiaofeng.com/assets/ArticleList-D3untiD8.js

js xiaoxiaofeng.com collected 2026-10-05 22:12:34 UTC 3,039 bytes, 1 lines download raw bytes

1import{j as e}from"./markdown-DgF9YmM-.js";import{b as t,L as w}from"./react-vendor-Z1IwLdtg.js";import{g as A,S as L,B as g,a as r,E as k,b as B,m as E,A as R,L as C}from"./index-DM2JlXa9.js";import{S as I}from"./SectionTitle-CreX9JrB.js";import"./motion-vendor-alnVVcP-.js";function z(){const[i,p]=t.useState([]),[m,f]=t.useState(0),[h,j]=t.useState(1),[l,x]=t.useState(!1),[n,v]=t.useState(!0),c=t.useRef(null),N=t.useCallback(s=>{l||(c.current&&c.current.disconnect(),c.current=new IntersectionObserver(a=>{a[0].isIntersecting&&n&&y()}),s&&c.current.observe(s))},[l,n]),d=t.useCallback((s,a=!1)=>{x(!0),A({page:{current:s,size:12}}).then(o=>{if(o){const u=o.records||[];p(b=>a?[...b,...u]:u),f(o.total||0),v(s*12<(o.total||0))}}).catch(console.error).finally(()=>x(!1))},[]),y=()=>{if(!n||l)return;const s=h+1;j(s),d(s,!0)};t.useEffect(()=>{d(1,!1)},[d]);const S=l&&i.length===0;return e.jsxs("div",{className:"container mx-auto px-4 py-8 xl:px-0",children:[e.jsx(L,{title:"全部文章 - 技术实战笔记",description:"笑小枫的全部技术文章列表,涵盖 Java 后端开发、SpringBoot 实战、微服务架构、数据库优化、前端 React 与 AI 落地方案。从原理到上线,每一篇都假设你明天就要交付。",keywords:"技术文章,Java教程,SpringBoot实战,微服务,数据库优化,React,AI落地,后端开发,全栈教程"}),e.jsx(I,{pill:"文章列表",pillIcon:g,title:"全部",gradient:"文章",subtitle:`记录技术与生活,共 ${m} 篇文章`}),S?e.jsx("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:9}).map((s,a)=>e.jsxs("div",{className:"overflow-hidden rounded-lg border border-border bg-card",children:[e.jsx(r,{className:"aspect-[16/9] w-full rounded-none"}),e.jsxs("div",{className:"space-y-3 p-5",children:[e.jsx(r,{className:"h-3 w-20"}),e.jsx(r,{className:"h-5 w-3/4"}),e.jsx(r,{className:"h-4 w-full"}),e.jsx(r,{className:"h-4 w-2/3"}),e.jsxs("div",{className:"flex gap-4 pt-4",children:[e.jsx(r,{className:"h-3 w-24"}),e.jsx(r,{className:"h-3 w-16"})]})]})]},a))}):i.length===0?e.jsx(k,{icon:g,title:"暂无文章",description:"博主还没有发布任何文章。",action:e.jsx(B,{nativeButton:!1,render:e.jsx(w,{to:"/"}),children:"返回首页"})}):e.jsx("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:i.map((s,a)=>e.jsx(E.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{duration:.5,ease:[.22,1,.36,1],delay:Math.min(a%12,6)*.05},className:"h-full",children:e.jsx(R,{article:s,variant:"grid"})},s.id))}),n&&i.length>0&&e.jsx("div",{ref:N,className:"flex items-center justify-center py-10",children:l?e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(C,{className:"h-5 w-5 animate-spin"}),e.jsx("span",{children:"加载中..."})]}):e.jsx("div",{className:"h-1"})}),!n&&i.length>0&&e.jsxs("div",{className:"py-10 text-center text-sm text-muted-foreground",children:["已加载全部 ",m," 篇文章"]})]})}export{z as ArticleList};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.