Open klodoma opened 1 year ago
I've found a solution for our case, maybe it helps you too. You need to import the icon raw. Example with a save-icon looks like this: Parent component:
<template>
<child :actions="actionArray" />
</template>
<script setup>
import SaveIcon from '~icons/ic/baseline-save?raw&width=25px&height=25px';
const actionArray = [{icon: SaveIcon}];
</script>
Inside the child component, when looping over "actions" array:
<template v-for="action in actions">
<span v-html="action.icon" />
</template>
I'm sure this can also be dynamically applied to your case.
Describe the bug
I use this plugin and the components are registered. But if I use
<component :is="'the-counter'" initial="20" />
it doesn't find the component.Any hints?
The same happens also in https://github.com/antfu/vitesse app
Do I need to register it as a "web-component"?
Reproduction: Install https://github.com/antfu/vitesse and put in the upper code somewhere
Reproduction
Described up.
System Info
Used Package Manager
yarn
Validations