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';
export default {
name: 'BootstrapAlert',
components: {
BsModal
},
@@ -1,6 +1,7 @@
import BsAlert from './Alert.js';
export default {
name: 'BootstrapConfirm',
mixins: [
BsAlert
],
+7 -2
View File
@@ -1,6 +1,7 @@
//import Phrasen from '../../plugin/Phrasen.js';
export default {
name: 'BootstrapModal',
data: () => ({
modal: null
}),
@@ -77,6 +78,7 @@ export default {
return new Promise((resolve,reject) => {
const instance = Vue.createApp({
name: 'ModalTmpApp',
setup() {
return () => Vue.h(BsModal, {...{
class: 'fade'
@@ -105,8 +107,11 @@ export default {
}
//instance.use(Phrasen); // TODO(chris): find a more dynamic way
instance.mount(wrapper);
document.body.appendChild(wrapper);
import('../../plugins/Phrasen.js').then((Phrasen) => {
instance.use(Phrasen.default);
instance.mount(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')" >
+1
View File
@@ -1,6 +1,7 @@
import BsAlert from './Alert.js';
export default {
name: 'BootstrapPrompt',
mixins: [
BsAlert
],
@@ -1,6 +1,7 @@
import BsAlert from '../../Bootstrap/Alert.js';
export default {
name: 'StudierendenantragLeitungGrundPopup',
mixins: [
BsAlert,
],
@@ -4,6 +4,7 @@ import {CoreFetchCmpt} from "../../Fetch.js";
import ApiStudstatusWiederholung from '../../../api/factory/studstatus/wiederholung.js';
export default {
name: 'StudierendenantragLeitungLvPopup',
components: {
CoreFetchCmpt
},