您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

2 行
1.2 KiB

  1. import{_ as t,r as n,K as e,b as i,L as a,y as s,z as o,a as l,w as r,i as h,M as c,h as d,j as f}from"./index-B-DRCbYE.js";import{m as u}from"./mp-html.BpCZoblh.js";const g=t({__name:"content",setup(t){const g={h1:"font-size:inherit;font-weight:inherit;",h2:"font-size:inherit;font-weight:inherit;",h3:"font-size:inherit;font-weight:inherit;",h4:"font-size:inherit;font-weight:inherit;",h5:"font-size:inherit;font-weight:inherit;",h6:"font-size:inherit;font-weight:inherit;",ol:"list-style:none;margin:0;padding:0;",ul:"list-style:none;margin:0;padding:0;",menu:"list-style:none;"},y=n(""),m=n(!1);e((t=>{const n=t&&t.key||"";n&&p(n)}));const p=async t=>{try{const n=await i("/api/content",{key:t});n.data&&(y.value=n.data.content||"",a({title:n.data.title||""}))}catch(n){console.error("获取内容失败",n)}finally{m.value=!0}};return(t,n)=>{const e=h,i=s(o("u-loading-icon"),c);return d(),l(e,{class:"page"},{default:r((()=>[m.value?(d(),l(e,{key:0,class:"content-body"},{default:r((()=>[f(u,{content:y.value,"tag-style":g},null,8,["content"])])),_:1})):(d(),l(e,{key:1,class:"loading"},{default:r((()=>[f(i)])),_:1}))])),_:1})}}},[["__scopeId","data-v-4dd6f92c"]]);export{g as default};