Files
miriamgemeinde/public/js/782.c5ad5596.js

2 lines
1.5 KiB
JavaScript

"use strict";(self["webpackChunkmiriamgemeinde"]=self["webpackChunkmiriamgemeinde"]||[]).push([[782],{3149:function(n,t,e){e.r(t),e.d(t,{default:function(){return k}});var o=e(641);const r={class:"some-page"};function i(n,t,e,i,u,a){const c=(0,o.g2)("ContentComponent");return(0,o.uX)(),(0,o.CE)("div",r,[(0,o.bF)(c,{link:a.currentLink},null,8,["link"])])}var u=e(33);function a(n,t,e,r,i,a){const c=(0,o.g2)("RenderContentComponent");return(0,o.uX)(),(0,o.CE)("div",null,[(0,o.Lk)("h1",null,(0,u.v_)(i.title),1),(0,o.bF)(c,{content:i.content},null,8,["content"])])}var c=e(6296),s=e(6278),l=e(1861),m={name:"ContentComponent",components:{RenderContentComponent:l.A},props:{link:{type:String,required:!0}},data(){return{content:"",title:""}},computed:{...(0,s.aH)(["menuData"]),...(0,s.L8)(["getMenuData"])},watch:{link:{immediate:!0,handler(n){this.fetchContent(n),this.setTitle(n)}}},methods:{async fetchContent(n){try{const t=await c.A.get(`/page-content?link=${n}`);this.content=t.data.content}catch(t){console.error("Fehler beim Abrufen des Inhalts:",t)}},setTitle(n){const t=(n,e)=>{for(const o of n){if(o.link===e)return o.pageTitle||o.name;if(o.submenu&&o.submenu.length>0){const n=t(o.submenu,e);if(n)return`${n}`}}return""};this.title=t(this.menuData,n)}}},h=e(6262);const d=(0,h.A)(m,[["render",a]]);var p=d,f={name:"DefaultPage",components:{ContentComponent:p},computed:{currentLink(){return this.$route.path}}};const C=(0,h.A)(f,[["render",i]]);var k=C}}]);
//# sourceMappingURL=782.c5ad5596.js.map