import BsModal from "../../Bootstrap/Modal.js"; import RaumContent from "./Content_types/Raum_contentmittitel.js"; import ApiCms from '../../../api/factory/cms.js'; export default { mixins:[BsModal], components:{ BsModal, RaumContent, }, props:{ content_id:{ type: Number }, ort_kurzbz:{ type: String } }, data(){ return{ result: false, content: null, }; }, methods:{ modalHidden: function(){ // reseting the content of the modal this.content = null; }, // this method is always called when the modal is shown modalShown: function(){ if (this.content_id) { this.$api .call(ApiCms.content(this.content_id)) .then(res => { this.content = res.data.content; this.type = res.data.type; }); } }, }, mounted(){ this.modal = this.$refs.modalContainer; }, template:/*html*/` ` };