This commit is contained in:
Tiago Vasconcelos 2025-02-07 14:47:25 +00:00
parent a8809ed5a4
commit 36ec08ee13

View File

@ -63,14 +63,14 @@ const DynamicComponent = {
} }
//housecleaning, remove old component //housecleaning, remove old component
//const previousRouteName = const previousRouteName =
// this.$router.currentRoute.value.meta.previousRouteName this.$router.currentRoute.value.meta.previousRouteName
//if ( if (
// previousRouteName && previousRouteName &&
// window.app._context.components[previousRouteName] window.app._context.components[previousRouteName]
//) { ) {
// delete window.app._context.components[previousRouteName] delete window.app._context.components[previousRouteName]
//} }
//load component logic //load component logic
const logicKey = `${this.$route.name}PageLogic` const logicKey = `${this.$route.name}PageLogic`
@ -94,13 +94,7 @@ const DynamicComponent = {
template: html // Use the fetched HTML as the template template: html // Use the fetched HTML as the template
}) })
delete window[logicKey] //dont need this anymore delete window[logicKey] //dont need this anymore
console.log( this.$forceUpdate()
`Component '${this.$route.name}' loaded. Keys: ${this.keys}`
)
if (!this.keys.includes(this.$route.name)) {
this.keys.push(this.$route.name)
this.$forceUpdate()
}
} catch (error) { } catch (error) {
console.error('Error loading dynamic content:', error) console.error('Error loading dynamic content:', error)
} finally { } finally {