import{_,c as u,w as e,f as d,o,k as t,j as y,Q as a,q as b,i as x,p as c,a1 as m}from"./index-CZJgrp0v.js";const w={name:"Demo",data(){return{exerciseData:{total:109,running:35,venue:25,event:25},isVisible:!1,showTotalNumber:!1,showRunningNumber:!1,showVenueNumber:!1,showEventNumber:!1,textContent:{pageTitle:"课外锻炼",totalText1:"累计参加 ",totalText2:" 次课外锻炼，把自律融进了岁岁年年",runningText1:"跑步 ",runningText2:" 次，在校园跑道文量青春，突破疲惫",venueText1:"场馆锻炼 ",venueText2:" 次，健身房挥汗、球馆对抗，打磨力量",eventText1:"赛事活动 ",eventText2:" 次，赛场上的欢呼与拼搏，是最难忘的热血片段",footerText:"未来呀，也继续让运动陪着你，拥抱滚烫生活V"}}},mounted(){this.startTypewriterEffect(),setTimeout(()=>{this.isVisible=!0},1500)},methods:{typeText(l,r,T=100,f=null){if(!l)return;let n=0;l.textContent="";const h=setInterval(()=>{n<r.length?(l.textContent+=r.charAt(n),n++):(clearInterval(h),f&&f())},T)},showNumber(l,r=0){setTimeout(()=>{this[l]=!0},r)},startTypewriterEffect(){this.typeText(this.$refs.pageTitle,this.textContent.pageTitle,150,()=>{this.typeText(this.$refs.totalText1,this.textContent.totalText1,80,()=>{this.showNumber("showTotalNumber",300),setTimeout(()=>{this.typeText(this.$refs.totalText2,this.textContent.totalText2,80,()=>{this.typeText(this.$refs.runningText1,this.textContent.runningText1,80,()=>{this.showNumber("showRunningNumber",300),setTimeout(()=>{this.typeText(this.$refs.runningText2,this.textContent.runningText2,80,()=>{this.typeText(this.$refs.venueText1,this.textContent.venueText1,80,()=>{this.showNumber("showVenueNumber",300),setTimeout(()=>{this.typeText(this.$refs.venueText2,this.textContent.venueText2,80,()=>{this.typeText(this.$refs.eventText1,this.textContent.eventText1,80,()=>{this.showNumber("showEventNumber",300),setTimeout(()=>{this.typeText(this.$refs.eventText2,this.textContent.eventText2,80,()=>{setTimeout(()=>{this.typeText(this.$refs.footerText,this.textContent.footerText,100)},500)})},400)})})},400)})})},400)})})},400)})})}}};function v(l,r,T,f,n,h){const s=y,i=b,p=d("layout-default-uni");return o(),u(p,null,{default:e(()=>[t(s,{class:"exercise-page"},{default:e(()=>[t(s,{class:"page-header"},{default:e(()=>[a("span",{class:"page-title typewriter-effect",ref:"pageTitle"},null,512)]),_:1}),t(s,{class:"total-exercise"},{default:e(()=>[t(i,{class:"total-text"},{default:e(()=>[a("span",{class:"typewriter-text",ref:"totalText1"},null,512),n.showTotalNumber?(o(),u(i,{key:0,class:"total-number number-animation"},{default:e(()=>[c("109")]),_:1})):x("",!0),a("span",{class:"typewriter-text",ref:"totalText2"},null,512)]),_:1})]),_:1}),t(s,{class:"exercise-list"},{default:e(()=>[t(s,{class:m(["exercise-item",{"fade-in":n.isVisible}])},{default:e(()=>[t(s,{class:"item-bullet"}),t(s,{class:"item-content"},{default:e(()=>[t(i,{class:"item-text"},{default:e(()=>[a("span",{class:"typewriter-text",ref:"runningText1"},null,512),n.showRunningNumber?(o(),u(i,{key:0,class:"item-number number-animation"},{default:e(()=>[c("35")]),_:1})):x("",!0),a("span",{class:"typewriter-text",ref:"runningText2"},null,512)]),_:1})]),_:1})]),_:1},8,["class"]),t(s,{class:m(["exercise-item",{"fade-in":n.isVisible}]),style:{"animation-delay":"0.5s"}},{default:e(()=>[t(s,{class:"item-bullet"}),t(s,{class:"item-content"},{default:e(()=>[t(i,{class:"item-text"},{default:e(()=>[a("span",{class:"typewriter-text",ref:"venueText1"},null,512),n.showVenueNumber?(o(),u(i,{key:0,class:"item-number number-animation"},{default:e(()=>[c("25")]),_:1})):x("",!0),a("span",{class:"typewriter-text",ref:"venueText2"},null,512)]),_:1})]),_:1})]),_:1},8,["class"]),t(s,{class:m(["exercise-item",{"fade-in":n.isVisible}]),style:{"animation-delay":"1s"}},{default:e(()=>[t(s,{class:"item-bullet"}),t(s,{class:"item-content"},{default:e(()=>[t(i,{class:"item-text"},{default:e(()=>[a("span",{class:"typewriter-text",ref:"eventText1"},null,512),n.showEventNumber?(o(),u(i,{key:0,class:"item-number number-animation"},{default:e(()=>[c("25")]),_:1})):x("",!0),a("span",{class:"typewriter-text",ref:"eventText2"},null,512)]),_:1})]),_:1})]),_:1},8,["class"])]),_:1}),t(s,{class:"footer-text"},{default:e(()=>[t(i,{class:"typewriter-text",ref:"footerText"},null,512)]),_:1})]),_:1})]),_:1})}const N=_(w,[["render",v],["__scopeId","data-v-8b6e8034"]]);export{N as default};
