1 |
- import{r as m}from"./index.b3da22a8.js";import{d,h as c,aa as u,a as e,b as h}from"./vendor.415f94b5.js";/* empty css *//* empty css *//* empty css */import{s as o}from"./help-center-detail.module.bbedfc5d.js";var v=d({name:"theory-detail",data(){return{detail:{title:"",createTime:"",content:""}}},async mounted(){try{const t=this.$route.query,a=await m.get("/api-cms/music/theory/detail/"+t.id);let{title:i,createTime:r,content:s}=a.data;this.detail={title:i,createTime:c(r).format("YYYY-MM-DD HH:mm:ss"),content:s}}catch{}},methods:{onShowImg(t){const{localName:a}=t.srcElement;if(a!=="img")return;let i=0;const r=document.querySelectorAll(".msgWrap img");let s=Array.from(r).map((n,l)=>(t.srcElement==n&&(i=l),n.src));u({images:s,startPosition:i,closeable:!0})}},render(){return e("div",{class:o["help-center-detail"]},[e("h2",null,[this.detail.title]),e("div",{class:o.titleInfo},[e("p",null,[h("\u9177\u4E50\u79C0")]),e("p",null,[this.detail.createTime])]),e("div",{class:[o.imgContent,"msgWrap"],onClick:this.onShowImg,innerHTML:this.detail.content},null)])}});export{v as default};
|