"use strict";(globalThis.webpackChunkinfinity_hitab_client=globalThis.webpackChunkinfinity_hitab_client||[]).push([[2095],{24780:(a,e,t)=>{t.d(e,{L:()=>r});var l=t(10435),i=t(65534);const p=[{name:"自然",type:"nature",cover:"https://static.wetab.link/hitab/wallpaper-cover/natrue.png"},{name:"建筑",type:"architecture",cover:"https://static.wetab.link/hitab/wallpaper-cover/structure.png"},{name:"动物",type:"animals",cover:"https://static.wetab.link/hitab/wallpaper-cover/animal.png"},{name:"旅行",type:"travel",cover:"https://static.wetab.link/hitab/wallpaper-cover/travel.png"},{name:"美食",type:"food-drink",cover:"https://static.wetab.link/hitab/wallpaper-cover/food.png"},{name:"动漫",type:"anime",cover:"https://static.wetab.link/hitab/wallpaper-cover/Anime.png"},{name:"运动",type:"athletics",cover:"https://static.wetab.link/hitab/wallpaper-cover/sport.png"},{name:"技术",type:"technology",cover:"https://static.wetab.link/hitab/wallpaper-cover/technology.png"},{name:"街头",type:"street-photography",cover:"https://static.wetab.link/hitab/wallpaper-cover/street.png"}],r=(0,l.Q_)("wallpaper-image",{state:()=>({wallpaperTypeList:p,selectedType:p[0],isRandom:!1}),actions:{getWallpapers:async a=>await(0,i.L1)(a),getRandomWallpapers:async a=>await(0,i.DZ)(a),setSelectedType(a){this.selectedType=a},setIsRandom(a){this.isRandom=a}}})},2095:(a,e,t)=>{t.r(e),t.d(e,{default:()=>y});var l=t(53398),i=t(57268),p=t(29445),r=t(68398),n=t(24780),s=t(65534),o=t(3627),c=t(63477),d=t(64845);const h={key:0,class:"grid grid-cols-3 gap-[12px] px-[32px] pt-[20px] mb:px-0"},w=["onClick"],u=["src"],v=[(a=>((0,i.dD)("data-v-f7055f04"),a=a(),(0,i.Cn)(),a))((()=>(0,i._)("i",{class:"iconfont icon-shuaxin text-[24px] text-color-white dark:text-opacity-60"},null,-1)))],g=(0,i.aZ)({__name:"wallpaper-list",props:{tag:{default:""},isRandom:{type:Boolean,default:!1}},setup(a){const e=a,t=(0,o.MX)(),g=(0,n.L)(),y=(0,p.iH)([]),m=(0,p.iH)(!1),b=async a=>{let t;return m.value=!0,t=e.isRandom?await(0,s.DZ)(e.tag):await g.getWallpapers({pageNo:a,tag:e.tag}),m.value=!1,t},f=(0,p.iH)();(0,i.YP)((()=>e.tag),(()=>{var a;null===(a=f.value)||void 0===a||a.reset()})),(0,i.YP)((()=>e.isRandom),(()=>{var a;null===(a=f.value)||void 0===a||a.reset()}));function k(){var a;m.value||null===(a=f.value)||void 0===a||a.reset()}return(n,s)=>{const o=l.Z;return(0,i.wg)(),(0,i.j4)(o,{ref_key:"$hiList",ref:f,list:y.value,"onUpdate:list":s[0]||(s[0]=a=>y.value=a),"show-finished":!e.isRandom,"req-fn":b,"x-space":28},{default:(0,i.w5)((()=>[y.value.length>0?((0,i.wg)(),(0,i.iD)("div",h,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,(a=>((0,i.wg)(),(0,i.iD)("div",{key:a.id,class:"group relative h-[108px] cursor-pointer overflow-hidden rounded-[4px]",onClick:e=>(async(a,e)=>{(0,d.Y)().addTips({category:"wallpaperLoad",type:"loading"});const[l]=await(0,c.pt)((0,c.Em)(e,"wallpaper"),!0);l?(0,d.Y)().addTips({category:"wallpaperLoad",type:"fail"}):((0,d.Y)().removeTips({category:"wallpaperLoad"}),t.setImageBg(e,a))})(a.id,a.rawSrc)},[(0,i._)("img",{class:"h-full w-full scale-100 object-cover transition-[transform] duration-300 group-hover:scale-[1.2]",loading:"lazy",src:`${(0,p.SU)(c.Em)(a.rawSrc,"default",192)}`,alt:""},null,8,u)],8,w)))),128))])):(0,i.kq)("",!0),(0,i.Wm)(r.Transition,{name:"slide-fade"},{default:(0,i.w5)((()=>[a.isRandom?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"sidebtn-shadow absolute right-[16px] top-[290px] flex h-[32px] w-[32px] cursor-pointer items-center justify-center rounded-[12px] bg-color-black dark:bg-color-white dark:bg-opacity-20",onClick:k},v)):(0,i.kq)("",!0)])),_:1})])),_:1},8,["list","show-finished"])}}});const y=(0,t(76911).Z)(g,[["__scopeId","data-v-f7055f04"]])}}]);