Files
aiot-platform-ui/apps/web-antd/dist/js/index-C2Ba2lkH.js

2 lines
1.9 KiB
JavaScript

var p=(f,i,s)=>new Promise((u,e)=>{var r=a=>{try{l(s.next(a))}catch(t){e(t)}},c=a=>{try{l(s.throw(a))}catch(t){e(t)}},l=a=>a.done?u(a.value):Promise.resolve(a.value).then(r,c);l((s=s.apply(f,i)).next())});import{bD as v,aj as w,aA as y,bV as z}from"./bootstrap-DsjPfOC_.js";import{g as S}from"./index-Cv13dSn_.js";import{_}from"./page.vue_vue_type_script_setup_true_lang-BL-xU9lB.js";import{m as k,b9 as d,b7 as x,v as C,ab as N,b2 as g,bJ as V,ae as h,j as m,u as n,ad as b,I as B,bb as I,c9 as U}from"../jse/index-index-CO0ZsLf2.js";const j={class:"bg-card p-5"},L={class:"grid grid-cols-[repeat(auto-fill,minmax(200px,1fr))] gap-2.5 bg-card shadow-sm"},M=k({__name:"index",setup(f){const i=d(!0),s=d([]),u=d(0),e=x({pageNo:1,pageSize:10,publicStatus:!0,prompt:void 0});function r(){return p(this,null,function*(){i.value=!0;try{const a=yield S(e);s.value=a.list,u.value=a.total}finally{i.value=!1}})}const c=U(r,80);function l(){e.pageNo=1,r()}return C(()=>p(null,null,function*(){yield r()})),(a,t)=>(g(),N(n(_),{"auto-content-height":""},{default:V(()=>[h("div",j,[m(n(v).Search,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=o=>e.prompt=o),class:"mb-5 w-full",size:"large",placeholder:"请输入要搜索的内容",onKeyup:w(l,["enter"])},null,8,["modelValue"]),h("div",L,[(g(!0),b(B,null,I(s.value,o=>(g(),b("div",{key:o.id,class:"relative cursor-pointer overflow-hidden bg-card transition-transform duration-300 hover:scale-105"},[m(n(y),{src:o.picUrl,class:"block h-auto w-full transition-transform duration-300 hover:scale-110"},null,8,["src"])]))),128))]),m(n(z),{total:u.value,"show-total":o=>`${o}`,"show-quick-jumper":"","show-size-changer":"",current:e.pageNo,"onUpdate:current":t[1]||(t[1]=o=>e.pageNo=o),"page-size":e.pageSize,"onUpdate:pageSize":t[2]||(t[2]=o=>e.pageSize=o),onChange:n(c),onShowSizeChange:n(c),class:"mt-5"},null,8,["total","show-total","current","page-size","onChange","onShowSizeChange"])])]),_:1}))}});export{M as default};