mirror of
https://github.com/ArthurDanjou/artchat.git
synced 2026-01-14 20:59:51 +01:00
- Replaced Nuxt ESLint configuration with Antfu's ESLint config. - Removed 'nuxt-visitors' module from Nuxt configuration. - Added linting scripts to package.json for easier code quality checks. - Introduced a new API endpoint for fetching weather data from OpenWeather. - Enhanced chat types with new enums and properties for better state management. - Added OpenWeather response types for improved type safety. - Updated social links in types/index.ts to include an email contact.
35 lines
712 B
Vue
35 lines
712 B
Vue
<script setup lang="ts">
|
|
const children = ref<HTMLElement[]>([])
|
|
const shown = ref<HTMLElement[]>([])
|
|
|
|
const container = ref<HTMLElement | null>(null)
|
|
|
|
onMounted(async () => {
|
|
if (!container.value)
|
|
return
|
|
|
|
children.value = Array.from(container.value.children) as HTMLElement[]
|
|
|
|
for (const child of children.value) {
|
|
shown.value.push(child)
|
|
await new Promise(resolve => setTimeout(resolve, 400))
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<div ref="container" class="hidden">
|
|
<slot />
|
|
</div>
|
|
<div>
|
|
<component
|
|
:is="el.tagName.toLowerCase()"
|
|
v-for="(el, index) in shown"
|
|
:key="index"
|
|
v-html="el.innerHTML"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</template>
|