Dynamic imports enable the loading of multiple items as needed, streamlining the import process.
With @cjdevstudios/bumblevue-icons for icons and primevue for components (except Editor and Chart), multiple items can be imported together.
import { Button, InputText } from '@cjdevstudios/bumblevue';
import { SearchIcon, BellIcon } from '@cjdevstudios/bumblevue-icons';
On the other hand, they enable the loading of multiple items from a specific structure as needed, making code management easier.
<script setup>
import * as BumbleVue from '@cjdevstudios/bumblevue';
const items = [
{ as: 'Button', class: 'my-button-class' },
{ as: 'InputText', class: 'my-inputtext-class' }
};
</script>
<template>
<component v-for="item of items" :is="BumbleVue[item.as]" :class="item.class" />
</template>