import{ad as K,d as P,aS as R,r as i,dW as X,aw as Y,h as _,o,j as s,i as e,w as l,k as Z,N as ee,l as r,f1 as se,W as te,c as v,H as le,f2 as ae,F as g,E as ne,a9 as w,ae as oe,p as u,A as c,f3 as ce,f4 as ie,aA as ue,c8 as re,c9 as _e,Q as de,O as fe,f5 as pe,G as ve,f6 as me,f7 as xe,cS as ge,B as be,v as ye}from"./index-9PRMimni.js";import{c as he}from"./category-CL0JJ3Je.js";function ke(C){return K.Get("/article/list",{params:C})}const we={class:"mt-4 text-center"},Ce={class:"mt-3 tab1"},ze={class:"flex items-start justify-between pb-2 classification"},Le={class:"flex-grow"},Ne={class:"flex items-start justify-between py-5 classification"},Se={class:"flex-grow"},je={class:"flex items-start justify-between pt-5 border-none classification"},Ve={class:"flex-grow mt-1"},Be={class:"article-list"},Ae={class:"left-box"},$e={class:"flex items-center mt-3 text-xs"},De={class:"ml-1 mr-1"},He={class:"ml-1"},Ie={class:"mt-4 text-gray-400"},Oe={class:"ml-1 text-xs"},Me={class:"ml-1 text-xs"},Te={class:"ml-1 text-xs"},Ue={class:"thumb"},Ee=P({__name:"search-article",setup(C){R(n=>({"2095ce5e":r(S).borderColor,"7692539a":r(S).primaryColor}));const b=i(!0),z=i(-1),d=i(!1),L=i(),N=i(),y=i(5),h=i(!0),S=X(),j=i("1"),V=i(null),H=[{label:"啊俊",value:"1"},{label:"小马",value:"2"},{label:"jack",value:"3"},{label:"roy",value:"4"},{label:"马云",value:"5"},{label:"麻麻",value:"6"}];async function I(){const n=await he();L.value=n&&n.list?n.list:[],b.value=!1}function O(n){z.value=n}function M(){d.value=!d.value}async function B(){const n=await ke({pageSize:y.value});N.value=n&&n.list?n.list:[],h.value=!1}function T(){h.value=!0,y.value=y.value+5,B()}return Y(async()=>{b.value=!1,I(),B()}),(n,t)=>{const f=ee,U=Z,m=te,E=ae,x=le,A=oe,F=ue,k=_e,G=re,W=de,Q=fe,$=ve,q=ge,J=be;return o(),_("div",null,[s(m,{bordered:!1,class:"search-box radius-10"},{default:l(()=>[t[2]||(t[2]=e("h2",{class:"text-lg"},"搜索列表（文章）",-1)),e("div",we,[s(U,{round:"",placeholder:"请输入关键字",style:{width:"400px"}},{prefix:l(()=>[s(f,{component:r(se)},null,8,["component"])]),_:1})])]),_:1}),e("div",Ce,[s(m,{bordered:!1,class:"radius-10"},{default:l(()=>[e("div",null,[e("div",ze,[b.value?(o(),v(x,{key:0,vertical:"",inline:!1,style:{width:"100%"}},{default:l(()=>[s(E,{text:"",repeat:3,size:"small",height:"10px"})]),_:1})):(o(),_(g,{key:1},[t[3]||(t[3]=e("div",{class:"flex-none label"},"分类: ",-1)),e("div",Le,[s(x,{size:"small",class:ne(d.value?"":"height-limited")},{default:l(()=>[(o(!0),_(g,null,w(L.value,(a,p)=>(o(),v(A,{key:p,onClick:D=>O(p),bordered:!1,checked:z.value==p,checkable:"",class:"mb-3"},{default:l(()=>[u(c(a.name),1)]),_:2},1032,["onClick","checked"]))),128))]),_:1},8,["class"])]),e("div",{class:"flex items-center justify-end flex-none cursor-pointer collapse-btn",onClick:M},[u(c(d.value?"收起":"展开")+" ",1),s(f,{size:"20"},{default:l(()=>[d.value?(o(),v(r(ce),{key:0,class:"ml-1"})):(o(),v(r(ie),{key:1,class:"ml-1"}))]),_:1})])],64))]),e("div",Ne,[t[4]||(t[4]=e("div",{class:"flex-none label"},"作者:",-1)),e("div",Se,[s(x,{vertical:"",wrap:!1,style:{width:"380px"}},{default:l(()=>[s(F,{value:V.value,"onUpdate:value":t[0]||(t[0]=a=>V.value=a),filterable:"",multiple:"",tag:"",options:H},null,8,["value"])]),_:1})])]),e("div",je,[t[8]||(t[8]=e("div",{class:"flex-none label"},"排序:",-1)),e("div",Ve,[s(G,{value:j.value,"onUpdate:value":t[1]||(t[1]=a=>j.value=a)},{default:l(()=>[s(k,{value:"1"},{default:l(()=>t[5]||(t[5]=[u("最新发表")])),_:1}),s(k,{value:"2",class:"ml-3"},{default:l(()=>t[6]||(t[6]=[u("最多收藏")])),_:1}),s(k,{value:"3",class:"ml-3"},{default:l(()=>t[7]||(t[7]=[u("最多阅读")])),_:1})]),_:1},8,["value"])])])])]),_:1}),s(m,{bordered:!1,class:"mt-3 radius-10"},{default:l(()=>[e("ul",Be,[(o(!0),_(g,null,w(N.value,a=>(o(),_("li",{class:"flex items-start justify-between",key:a.id},[e("div",Ae,[e("div",null,[s(W,{class:"mb-3"},{default:l(()=>[u(c(a.title),1)]),_:2},1024),s(x,{class:"mb-3"},{default:l(()=>[(o(!0),_(g,null,w(a.tags,(p,D)=>(o(),v(A,{key:D,bordered:!1},{default:l(()=>[u(c(p),1)]),_:2},1024))),128))]),_:2},1024),e("p",null,c(a.summary),1)]),e("div",$e,[s(Q,{size:24,round:"",src:a.avatar},null,8,["src"]),e("span",De,c(a.author),1),t[9]||(t[9]=u("发表于 ")),e("span",He,c(a.date),1)]),e("div",Ie,[e("span",null,[s(f,{size:"16"},{default:l(()=>[s(r(pe))]),_:1}),e("b",Oe,c(a.collection),1)]),s($,{vertical:"",class:"mx-3"}),e("span",null,[s(f,{size:"16"},{default:l(()=>[s(r(me))]),_:1}),e("b",Me,c(a.like),1)]),s($,{vertical:"",class:"mx-3"}),e("span",null,[s(f,{size:"16"},{default:l(()=>[s(r(xe))]),_:1}),e("b",Te,c(a.comment),1)])])]),e("div",Ue,[s(q,{width:"100%",src:a.cover},null,8,["src"])])]))),128))])]),_:1}),s(m,{bordered:!1,class:"mt-3 text-center radius-10"},{default:l(()=>[s(J,{loading:h.value,onClick:T},{default:l(()=>t[10]||(t[10]=[u("加载更多")])),_:1},8,["loading"])]),_:1})])])}}}),We=ye(Ee,[["__scopeId","data-v-7a0d339e"]]);export{We as default};
