<template> <component :is='fuck' :data='data'></component> </template> <script> export default { data() { return { fuck: null } }, props: ['type', 'data'], mounted() { this.fuck = import(`/templates/${this.type || 'default'}`) }, } </script>
<template> <component :is='fuck' :data='data'></component> </template> <script> export default { data() { return { fuck: null } }, props: ['type', 'data'], mounted() { this.fuck = import(`/templates/${this.type || 'default'}`) }, } </script>