Files
miriamgemeinde/public/js/7361.210695ca.js
2024-06-24 19:42:30 +00:00

2 lines
1.6 KiB
JavaScript

"use strict";(self["webpackChunkmiriamgemeinde"]=self["webpackChunkmiriamgemeinde"]||[]).push([[7361],{5727:function(n,t,e){e.d(t,{A:function(){return d}});var o=e(6768),r=e(5187);function i(n,t,e,i,u,a){const c=(0,o.g2)("RenderContentComponent");return(0,o.uX)(),(0,o.CE)("div",null,[(0,o.Lk)("h1",null,(0,r.v_)(u.title),1),(0,o.bF)(c,{content:u.content},null,8,["content"])])}var u=e(3173),a=e(782),c=e(891),s={name:"ContentComponent",components:{RenderContentComponent:c.A},props:{link:{type:String,required:!0}},data(){return{content:"",title:""}},computed:{...(0,a.aH)(["menuData"]),...(0,a.L8)(["getMenuData"])},watch:{link:{immediate:!0,handler(n){this.fetchContent(n),this.setTitle(n)}}},methods:{async fetchContent(n){try{const t=await u.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)}}},l=e(1241);const m=(0,l.A)(s,[["render",i]]);var d=m},5669:function(n,t,e){e.r(t),e.d(t,{default:function(){return l}});var o=e(6768);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(5727),a={name:"SomePage",components:{ContentComponent:u.A},computed:{currentLink(){return this.$route.path}}},c=e(1241);const s=(0,c.A)(a,[["render",i]]);var l=s}}]);
//# sourceMappingURL=7361.210695ca.js.map