import{L as a,l as e,q as t,o as l,a as i,f as s,g as n,t as r,e as o,h as d,aO as c,aP as u,aA as v}from"./vendor-edc0678f.js";import{a as m}from"./content-3391292a.js";import{_ as f}from"./index-4c745ab9.js";const p={class:"tutorial-detail-page"},g={key:0,class:"detail-content"},y={class:"detail-title"},_={class:"detail-meta"},h={class:"meta-date"},k={key:0,class:"detail-cover"},L=["src","alt"],b=["innerHTML"],j=f({__name:"tutorial-detail",setup(f){const j=a(),w=e({}),x=e(!1),D=a=>{if(!a)return"";return new Date(a).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit"})};return t(()=>{(async()=>{const a=j.params.id;if(a){x.value=!0;try{const e=await m(a);e&&200===e.code&&(w.value=e.data||{})}catch(e){}finally{x.value=!1}}})()}),(a,e)=>{const t=c,m=v,f=u;return l(),i("div",p,[s(t,{title:a._t18("navbar_tutorialDetail"),"left-arrow":"",onClickLeft:e[0]||(e[0]=e=>a.$router.go(-1)),fixed:"",placeholder:""},null,8,["title"]),w.value.id?(l(),i("div",g,[n("h1",y,r(w.value.title),1),n("div",_,[n("span",h,r(D(w.value.publishTime)),1)]),w.value.coverImage?(l(),i("div",k,[n("img",{src:w.value.coverImage,alt:w.value.title},null,8,L)])):o("",!0),n("div",{class:"detail-body",innerHTML:w.value.content},null,8,b)])):o("",!0),x.value?(l(),d(m,{key:1,class:"loading"})):w.value.id?o("",!0):(l(),d(f,{key:2,description:a._t18("utils_noData")},null,8,["description"]))])}}},[["__scopeId","data-v-fe4d1b2f"]]);export{j as default};
