index.b28a8f45.js 1.0 KB

1
  1. import{_ as d,r as c,o as f,d as n,e as l,f as y,w as i,F as g,j as h,x as v,g as x,P as k,m as w}from"./index.bec96d93.js";/* empty css *//* empty css */import{E as B,a as E}from"./index.035289de.js";const C={class:"banner-container"},b=["src","alt","onClick"],N={__name:"index",props:{type:{type:String,require:!0},limit:{type:Number,default:5}},setup(_){const p=c(420),s=_,o=c([]);f(async()=>{try{const{msg:a,data:e}=await k({type:s.type,limit:s.limit});e&&Array.isArray(e)&&(o.value=e)}catch{}});const u=a=>{const{jump_type:e,jump_url:r}=a;e=="external"||e=="internal"?window.open(r):w.error("\u9519\u8BEF\u7684\u56FE\u7247")};return(a,e)=>{const r=B,m=E;return n(),l("div",C,[y(m,{height:`${p.value}px`},{default:i(()=>[(n(!0),l(g,null,h(o.value,t=>(n(),v(r,{key:t},{default:i(()=>[x("img",{src:t.image,alt:t.image,onClick:A=>t.is_jump?u(t):null},null,8,b)]),_:2},1024))),128))]),_:1},8,["height"])])}}};var M=d(N,[["__scopeId","data-v-3142c606"]]);export{M as B};