This commit is contained in:
cgfhtw
2022-10-28 12:39:19 +02:00
parent 1043714767
commit be6ad8ce2a
3 changed files with 7 additions and 12 deletions
+7 -6
View File
@@ -46,11 +46,12 @@ export default {
}
},
mounted() {
this.modal = new bootstrap.Modal(this.$refs.modal, {
backdrop: this.backdrop,
focus: this.focus,
keyboard: this.keyboard
});
if (this.$refs.modal)
this.modal = new bootstrap.Modal(this.$refs.modal, {
backdrop: this.backdrop,
focus: this.focus,
keyboard: this.keyboard
});
},
popup(body, options, title, footer) {
const BsModal = this;
@@ -80,8 +81,8 @@ export default {
}
});
const wrapper = document.createElement("div");
instance.mount(wrapper);
document.body.appendChild(wrapper);
instance.mount(wrapper);
});
},
template: `<div ref="modal" class="bootstrap-modal modal" tabindex="-1" @[\`hide.bs.modal\`]="$emit('hideBsModal')" @[\`hidden.bs.modal\`]="$emit('hiddenBsModal')" @[\`hidePrevented.bs.modal\`]="$emit('hidePreventedBsModal')" @[\`show.bs.modal\`]="$emit('showBsModal')" @[\`shown.bs.modal\`]="$emit('shownBsModal')">
@@ -1,6 +1,5 @@
import DashboardSection from "./Section.js";
import DashboardWidgetPicker from "./Widget/Picker.js";
import CachedWidgetLoader from "../../composables/Dashboard/CachedWidgetLoader.js";
import ObjectUtils from "../../composables/ObjectUtils.js";
export default {
@@ -13,7 +13,6 @@ export default {
}
},
props: [
"adminMode",
"name",
"widgets"
],
@@ -373,10 +372,6 @@ export default {
this.$emit('widgetUpdate', this.name, payload);
}
},
created() {
if (this.adminMode)
this.editMode = 1;
},
mounted() {
let self = this;
let cont = self.$refs.container;