- introductie van vue files - bijna werkende versie van eveai_chat_client.
This commit is contained in:
@@ -2,52 +2,6 @@
|
||||
|
||||
export const FormMessage = {
|
||||
name: 'FormMessage',
|
||||
// Static method for direct rendering
|
||||
renderComponent(container, props, app) {
|
||||
console.log('🔍 [DEBUG] FormMessage.renderComponent() aangeroepen');
|
||||
console.log('🔍 [DEBUG] FormMessage container:', container);
|
||||
console.log('🔍 [DEBUG] FormMessage props:', props);
|
||||
|
||||
if (!container) {
|
||||
console.error('Container element niet gevonden voor FormMessage');
|
||||
return null;
|
||||
}
|
||||
|
||||
console.log('🔍 [DEBUG] FormMessage container gevonden, Vue app aan het initialiseren');
|
||||
|
||||
try {
|
||||
// We controleren het app object
|
||||
if (!app) {
|
||||
console.error('🚨 [ERROR] Geen Vue app object ontvangen');
|
||||
return null;
|
||||
}
|
||||
|
||||
// Check of we een correcte Vue app hebben of we moeten er een maken
|
||||
if (typeof app.mount !== 'function') {
|
||||
console.log('🔍 [DEBUG] Ontvangen app heeft geen mount functie, dit is mogelijk een config object');
|
||||
// Controleer of window.Vue beschikbaar is
|
||||
if (!window.Vue || typeof window.Vue.createApp !== 'function') {
|
||||
console.error('🚨 [ERROR] window.Vue.createApp is niet beschikbaar');
|
||||
return null;
|
||||
}
|
||||
|
||||
// Maak een nieuwe Vue app met het FormMessage component en de props
|
||||
console.log('🔍 [DEBUG] Nieuwe Vue app aanmaken met FormMessage component');
|
||||
app = window.Vue.createApp(FormMessage, props);
|
||||
console.log('🔍 [DEBUG] Nieuwe app aangemaakt:', app);
|
||||
}
|
||||
|
||||
// Nu kunnen we de app mounten
|
||||
console.log('🔍 [DEBUG] App.mount aanroepen op container');
|
||||
const instance = app.mount(container);
|
||||
console.log('🔍 [DEBUG] FormMessage component succesvol gemount');
|
||||
return instance;
|
||||
} catch (error) {
|
||||
console.error('🚨 [ERROR] Fout bij mounten FormMessage component:', error);
|
||||
console.error('Error stack:', error.stack);
|
||||
return null;
|
||||
}
|
||||
},
|
||||
props: {
|
||||
formData: {
|
||||
type: Object,
|
||||
|
||||
Reference in New Issue
Block a user