第一次提交

This commit is contained in:
2025-05-02 13:09:37 +08:00
commit ea5690fe88
39 changed files with 11346 additions and 0 deletions

View File

@ -0,0 +1 @@
../ssr/ClientOnly.vue

View File

@ -0,0 +1,46 @@
<script setup>
import { ref, onMounted, onBeforeUnmount } from 'vue'
const frames = [`
✋ 😭 🤚
\\ | /
++++
++
++
/ \\`,
`
✋ 😭 🤚
\\ | /
++++
/ \\
`]
const currentFrame = ref(frames[0])
let animationInterval = null
let count = ref(0)
onMounted(() => {
// 初始显示第一帧
currentFrame.value = frames[0]
// 设置动画间隔
animationInterval = setInterval(() => {
currentFrame.value = currentFrame.value === frames[0]
? frames[1]
: frames[0]
}, 250)
})
onBeforeUnmount(() => {
// 组件卸载前清除定时器
if (animationInterval) {
clearInterval(animationInterval)
animationInterval = null
}
})
const incr = () => count.value++
</script>
<template>
<pre style="line-height:1 ;" class="no-select" @click="incr() > 5 ? $router.push('/developer') : null">
{{ currentFrame }}
</pre>
</template>