add component names, Modal dynamically import new phrases plugin to created app

This commit is contained in:
Harald Bamberger
2025-04-15 14:52:24 +02:00
parent 9c5ebc902d
commit b2a7ec6e67
6 changed files with 12 additions and 2 deletions
+1
View File
@@ -1,6 +1,7 @@
import BsModal from './Modal.js'; import BsModal from './Modal.js';
export default { export default {
name: 'BootstrapAlert',
components: { components: {
BsModal BsModal
}, },
@@ -1,6 +1,7 @@
import BsAlert from './Alert.js'; import BsAlert from './Alert.js';
export default { export default {
name: 'BootstrapConfirm',
mixins: [ mixins: [
BsAlert BsAlert
], ],
+5
View File
@@ -1,6 +1,7 @@
//import Phrasen from '../../plugin/Phrasen.js'; //import Phrasen from '../../plugin/Phrasen.js';
export default { export default {
name: 'BootstrapModal',
data: () => ({ data: () => ({
modal: null modal: null
}), }),
@@ -77,6 +78,7 @@ export default {
return new Promise((resolve,reject) => { return new Promise((resolve,reject) => {
const instance = Vue.createApp({ const instance = Vue.createApp({
name: 'ModalTmpApp',
setup() { setup() {
return () => Vue.h(BsModal, {...{ return () => Vue.h(BsModal, {...{
class: 'fade' class: 'fade'
@@ -105,9 +107,12 @@ export default {
} }
//instance.use(Phrasen); // TODO(chris): find a more dynamic way //instance.use(Phrasen); // TODO(chris): find a more dynamic way
import('../../plugins/Phrasen.js').then((Phrasen) => {
instance.use(Phrasen.default);
instance.mount(wrapper); instance.mount(wrapper);
document.body.appendChild(wrapper); document.body.appendChild(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')" > 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')" >
<div class="modal-dialog" :class="dialogClass"> <div class="modal-dialog" :class="dialogClass">
+1
View File
@@ -1,6 +1,7 @@
import BsAlert from './Alert.js'; import BsAlert from './Alert.js';
export default { export default {
name: 'BootstrapPrompt',
mixins: [ mixins: [
BsAlert BsAlert
], ],
@@ -1,6 +1,7 @@
import BsAlert from '../../Bootstrap/Alert.js'; import BsAlert from '../../Bootstrap/Alert.js';
export default { export default {
name: 'StudierendenantragLeitungGrundPopup',
mixins: [ mixins: [
BsAlert, BsAlert,
], ],
@@ -4,6 +4,7 @@ import {CoreFetchCmpt} from "../../Fetch.js";
import ApiStudstatusWiederholung from '../../../api/factory/studstatus/wiederholung.js'; import ApiStudstatusWiederholung from '../../../api/factory/studstatus/wiederholung.js';
export default { export default {
name: 'StudierendenantragLeitungLvPopup',
components: { components: {
CoreFetchCmpt CoreFetchCmpt
}, },