loading...

re: The Magic of Vue's Dynamic Components For Lists of Data VIEW POST

FULL DISCUSSION
 

In the above scenario, don't you still have to do an "import" in the script and components in the export default script?

I'm trying to avoid having to do an explicit import but still have the components generated dynamically with something like
computed: {
dynamicComponent () {
var x = this.compMe.trim().replace('components/', '')
return () => import(components/${x})
}
}

The problem is that since it's computed, it only ever gets the final component.

Any ideas?

code of conduct - report abuse