You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
2.4 KiB

import{_ as T,r as c,b as C,J as k,o as _,c as f,a as t,h as m,j as b,n as L,v as P,u as n,F as w,i as x,L as S,s as B,t as H,k as N,p as z,l as I}from"./index.95e5d9f9.js";import{B as A}from"./BigTitleCom.5d398d27.js";import{N as D}from"./NewsCom.508f4b7b.js";import{P as M}from"./PaginationCom.7c0fc825.js";import"./tools.c7b44144.js";const E=r=>(z("data-v-ebf4c5a5"),r=r(),I(),r),F={class:"hackathon clear"},W={class:"container"},j={class:"secondary"},G=E(()=>t("div",{class:"secondary-title"},[t("div",null,"Giving us your MVP,"),t("div",null,"let's make it big")],-1)),J={class:"secondary-subtitle"},O={class:"hackathon-option container clear"},U=["onClick"],Y={class:"container hackathon-content"},$={class:"container pagination"},q={__name:"HackathonView",emits:["backTop"],setup(r,{emit:p}){const h=[{id:0,text:"All"},{id:1,text:"Ongoing"},{id:2,text:"Upcoming"},{id:3,text:"Past"}];let u=c(0),v=c(0),s=c(1),l=c(30),d=c(!1),i=c([]);C(()=>{function a(){const e=window.innerWidth;e>=1440?(l.value=30,d.value=!1):e>431&&e<1440?(l.value=20,d.value=!0):e<=431&&(l.value=10,d.value=!1)}window.onresize=a,a(),g(u.value),p("backTop")});const y=a=>{u.value=a,s.value=1,g(u.value)},V=a=>{s.value=a,g(u.value),p("backTop")},g=a=>{console.log(a),i.value=[],a===0?k({page:s.value,limit:l.value}).then(({data:e})=>{e&&(l.value=e.per_page,s.value=e.current_page,v.value=e.total,i.value=e.data)}):(console.log(h.find(e=>e.id===a).text),k({status:h.find(e=>e.id===a).text,page:s.value,limit:l.value}).then(({data:e})=>{e&&(l.value=e.per_page,s.value=e.current_page,v.value=e.total,i.value=e.data)})),v.value=i.value.length,i.value=i.value.slice((s.value-1)*l.value,s.value*l.value),p("backTop")};return(a,e)=>(_(),f("div",F,[t("div",W,[m(A,{bigTitle:"Hackathon",subTitle:"We only do research on differentiated views."},null,8,["subTitle"]),m(S),t("div",j,[G,t("div",J,[b(" Even if you only have an one-person team,"),L(t("div",null,null,512),[[P,n(d)]]),b(" we still believe in Your Potential to become the next big unicorn. ")])])]),t("div",O,[t("ul",null,[(_(),f(w,null,x(h,o=>t("li",{key:o.id,style:{cursor:"pointer"},class:B(o.id==n(u)?"li-active":""),onClick:K=>y(o.id)},H(o.text),11,U)),64))])]),t("div",Y,[(_(!0),f(w,null,x(n(i),o=>(_(),N(D,{flag:"Hackathon",key:o.id,data:o},null,8,["data"]))),128))]),t("div",$,[m(M,{page:n(s),onChangePage:V,total:n(v),per:n(l),dataList:n(i)},null,8,["page","total","per","dataList"])])]))}},ae=T(q,[["__scopeId","data-v-ebf4c5a5"]]);export{ae as default};