init: nuxt adapter

This commit is contained in:
2026-03-09 19:05:31 +05:30
parent feb3911d46
commit 7751ee5db8
35 changed files with 988 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
<script lang="ts" setup>
const props = withDefaults(defineProps<{ items?: any[] }>(), { items: () => [] })
function isPrimitive(val: unknown): boolean {
const t = typeof val
return t === 'string' || t === 'number' || t === 'boolean'
}
</script>
<template>
<ol class="list-inside list-decimal text-sm text-center sm:text-left w-full text-center">
<li
v-for="(item, i) in props.items"
:key="i"
:class="{ 'mb-2': i < props.items.length - 1 }"
>
<span v-if="isPrimitive(item)">{{ item }}</span>
<component v-else :is="item" />
</li>
</ol>
</template>