From c0252e5ad9d0f55fb61b7761573f109f3b62f727 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Wed, 29 Nov 2023 15:38:16 +0100 Subject: [PATCH] Modal from Master --- public/js/components/Bootstrap/Modal.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/public/js/components/Bootstrap/Modal.js b/public/js/components/Bootstrap/Modal.js index f910e8e32..453cc0b48 100644 --- a/public/js/components/Bootstrap/Modal.js +++ b/public/js/components/Bootstrap/Modal.js @@ -1,3 +1,5 @@ +import Phrasen from '../../plugin/Phrasen.js'; + export default { data: () => ({ modal: null @@ -19,11 +21,7 @@ export default { default: true }, noCloseBtn: Boolean, - dialogClass: [String,Array,Object], - bodyClass: { - type: [String,Array,Object], - default: 'px-4 py-5' - } + dialogClass: [String,Array,Object] }, emits: [ "hideBsModal", @@ -50,12 +48,14 @@ export default { } }, mounted() { - if (this.$refs.modal) + 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, @@ -88,6 +88,7 @@ export default { } }); const wrapper = document.createElement("div"); + instance.use(Phrasen); // TODO(chris): find a more dynamic way instance.mount(wrapper); document.body.appendChild(wrapper); }); @@ -99,7 +100,7 @@ export default { -