mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-21 07:21:46 +01:00
fix(Icon): reload icon when prop name changes
This commit is contained in:
@@ -13,5 +13,10 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const icon = await loadIcon(props.name)
|
||||
const icon = ref(null)
|
||||
icon.value = await loadIcon(props.name)
|
||||
|
||||
watch(() => props.name, async () => {
|
||||
icon.value = await loadIcon(props.name)
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user