mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-24 00:40:34 +01:00
chore(typescript): migrate components (#53)
This commit is contained in:
committed by
GitHub
parent
57354f64f9
commit
1bda2ec01f
@@ -2,7 +2,9 @@
|
||||
<Icon :icon="icon" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<script setup lang="ts">
|
||||
import type { Ref } from 'vue'
|
||||
import type { IconifyIcon } from '@iconify/vue'
|
||||
import { ref, watch } from 'vue'
|
||||
import { Icon } from '@iconify/vue/dist/offline'
|
||||
import { loadIcon } from '@iconify/vue'
|
||||
@@ -14,7 +16,7 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const icon = ref(null)
|
||||
const icon: Ref<IconifyIcon> = ref(null)
|
||||
icon.value = await loadIcon(props.name)
|
||||
|
||||
watch(() => props.name, async () => {
|
||||
|
||||
Reference in New Issue
Block a user