Questions tagged [vue-dynamic-components]
53 questions
18
votes
1 answer
Lifecycle hook beforeDestroy is not emitted in Vue3
I use vue3 beta 18, found that beforeDestroy is not emitted when I remove a component which is rendered by dynamic component in v-for.
Neither are deactivated, destroyed.
The component is "disappeared", when I remove it from the collection…

fuminchao
- 181
- 1
- 1
- 5
9
votes
1 answer
Load Vue single-file component dynamically at runtime
We've got a Vue app and would like to allow third parties to create plugins. We'd like the plugins to be built in the form of a Vue single-file component.
At runtime, the end user would select a plugin to add to the app. The app would fetch the…

ccleve
- 15,239
- 27
- 91
- 157
9
votes
4 answers
Vue/Nuxt: How to make a component be truly dynamic?
In order to use a dynamically-defined single page component, we use the component tag, thusly:
...
import DynamicComponent from '@/components/DynamicComponent.vue';
...
components: {
…

Marc
- 1,812
- 4
- 23
- 36
3
votes
0 answers
How to load prebuilt reusable Vuejs components through http without knowing its URL beforehand?
I have the following setup:
I have two prebuilt VueJs apps under those URLs (dev + prod) served through Apache :
https://dev-domain.com/web
https://prod-domain.com/kiosk
These are general VueJs apps that need to include the same games implemented…

Michail Michailidis
- 11,792
- 6
- 63
- 106
2
votes
1 answer
problematically generated tree of components in vue2
I have a scenario which i need to build a nested menu and the menu can have an infinite level of nested layers (even thought this will not happen) and I'm wanting to know what is the best way of building the list of child components…

TheMan68
- 1,429
- 6
- 26
- 48
2
votes
1 answer
How to put alternate background for nested recursive tree structure in Vue
I am trying to build an OKR type of component with nested tree structure. I have used dynamic recursive component to not make the depth hard code. All the nodes of the tree can be expanded. However I am not able to write a proper logic to make the…

Udit Gogoi
- 675
- 2
- 11
- 28
2
votes
0 answers
Vue component registered but Vue is still warn Unknown custom element
I have a small Vue app that loads components dynamically
First I write a func called SPA, this func is responsible for creating the main app and handle loading components
```js
/*
* param {object} params: {
* {CSS…

carboncrystal
- 63
- 1
- 10
2
votes
1 answer
Vue dynamic component renders twice
I'm rendering dynamic components inside a dashboard parent item. If there's a component, it renders. If there's not, well... then it doesn't. The problem is that my only dynamic component for now is being rendered twice.
I've tried rendering…

Gorka Molero
- 53
- 2
- 9
2
votes
1 answer
Dynamically replaced text string with Vue component
I'm attempting to make a page which will load a text string (https://pastebin.com/Mp9sKy1A) into a page and then replace any instance of --FML-[componentName] with the appropriate component.
So for example --FML-[NoteBlock] would be automatically…

Alex Foxleigh
- 1,784
- 2
- 21
- 47
1
vote
1 answer
How to use vue3 suspense with dynamically loaded components inside ?
I am trying to use Suspense component to show the loading state of dynamic components in my app. But here I come across the scenario where both keep-alive and Suspense require on single root node.
…

gitam gadtaula
- 158
- 13
1
vote
2 answers
Elegant way to use dynamic components with props in Vue
Following case: I have an API outputting all the content for my Page, as well as its structure and so on (for better understanding, imaging an CMS which includes kind of a page builder, where an author can place components by drag and drop to…

Irgend Son Hansel
- 623
- 9
- 18
1
vote
1 answer
Vue - Dynamic component event listener
Problem : I am trying to create a table component for my app which would be use by other components to render a table. It could have three possible cell values :
Text
HTML
Component
I am able to render all the above values but I am stuck at…

Bhavik Patel
- 1,044
- 1
- 15
- 33
1
vote
1 answer
Is there an equivalent in Angular to Vue.js keep-alive and component?
I am learning Vue.js and I tried the keep-alive and component mechanism which allows to dynamically switch between components. As far as I have understood, I can do something like this:
1
vote
1 answer
Mutating Nuxt Component
I've been trying to learn vuex for weeks now (I've seen dozens of tutorials and they only go over the counter example). I'm slow and still can't grasp how to do this.
My idea is to be able to switch tabs between components. I know that I'm supposed…

Guillermo Medel
- 47
- 1
- 7