import{r as a,u as l,S as e,b as s,c as t,d as i,e as n,k as o,j as u,W as d,ad as r,F as c,f as v,n as m,t as p,h as k,ai as f,Y as x,g as h,m as g,aa as y}from"./index.1702580971041.js";import{a as C}from"./href.1702580971041.js";const _={class:"onlinemall"},j={class:"px-4 w-2/3 m-auto"},z={class:"linkarea space-x-2 mt-4"},S=["onClick"],b={class:"linkscroll"},w={class:"linklist grid grid-cols-3 mt-2"},L={class:"links"},V=["src"],F={class:"linkTips"},K={class:"text-sm font-bold"},M={class:"text-xs"},T={class:"mt-2 flex items-center justify-end"},U={class:"flex justify-center"},W={__name:"onlineMall",setup(W){const Y=a([]),q=l(),A=a(0),B=a(""),D=a(1),E=a(0),G=a([]);e({url:"/linkStore/getFolder"}).then((a=>{a.data.unshift({id:0,name:"全部"}),Y.value=a.data}));const H=()=>{e({url:"/LinkStore/list",method:"post",data:{area:A.value,name:B.value,page:D.value}}).then((a=>{G.value=a.data.data,E.value=a.data.total}))},I=a=>{D.value=a,H()};return H(),(a,l)=>{const W=s("el-input"),J=s("el-icon"),N=s("el-button"),O=s("el-pagination");return t(),i("div",_,[n("div",j,[o(W,{modelValue:B.value,"onUpdate:modelValue":l[0]||(l[0]=a=>B.value=a),class:"iconSearch",placeholder:"搜索标签","suffix-icon":u(d),onKeydown:r(H,["enter"])},null,8,["modelValue","suffix-icon","onKeydown"])]),n("div",z,[(t(!0),i(c,null,v(Y.value,(a=>(t(),i("div",{class:m(a.id===A.value?"text-rose-600":""),onClick:l=>(a=>{a!==A.value&&(A.value=a,D.value=1,H())})(a.id)},p(a.name),11,S)))),256))]),n("div",b,[n("div",w,[(t(!0),i(c,null,v(G.value,(a=>(t(),i("div",{key:a.id},[n("div",L,[n("img",{src:a.src,class:"linklogo",alt:""},null,8,V),n("div",F,[n("span",K,p(a.name),1),n("div",M,p(a.tips),1)])]),n("div",T,[o(J,{size:"20px",class:"hover:text-blue-400 hover",onClick:l=>u(C)(a.url,!0)},{default:k((()=>[o(u(f))])),_:2},1032,["onClick"]),o(N,{size:"small",class:"ml-2",round:"",onClick:l=>(a=>{let l={sort:99999,id:y(),name:a.name,size:a.size,src:a.src,url:a.url,type:a.type,app:a.app,tips:a.tips,origin_id:a.id};q.state.link.push(l),q.commit("updateLink"),e({url:"/LinkStore/install_num",method:"post",data:{id:a.id}}).finally((a=>{}))})(a)},{default:k((()=>[x("添加")])),_:2},1032,["onClick"])])])))),128))]),n("div",U,[E.value>15?(t(),h(O,{key:0,layout:"prev, pager, next","page-size":15,total:E.value,onCurrentChange:I},null,8,["total"])):g("",!0)])])])}}};export{W as default};
