提交 045c9851 作者: 方治民

feat: 改用 unocss 动画替换 animate.css

上级 27360a60
<script setup lang="ts"> <script setup lang="ts">
import 'animate.css'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { checkUpgrade } from '@/utils/upgrade' import { checkUpgrade } from '@/utils/upgrade'
import { useRuntime } from '@/hooks/app/useRuntime' import { useRuntime } from '@/hooks/app/useRuntime'
...@@ -38,7 +37,7 @@ ...@@ -38,7 +37,7 @@
const animate = ref() const animate = ref()
const handUp = () => { const handUp = () => {
Message.toast('👋🏻') Message.toast('👋🏻')
animate.value = 'animate__swing' animate.value = 'animate-iteration-infinite'
setTimeout(() => (animate.value = ''), 1000) setTimeout(() => (animate.value = ''), 1000)
} }
</script> </script>
...@@ -49,7 +48,7 @@ ...@@ -49,7 +48,7 @@
<view class="flex flex-col justify-center mb-3"> <view class="flex flex-col justify-center mb-3">
<text class="title">{{ title }}</text> <text class="title">{{ title }}</text>
<text class="title">{{ $t('app.hello') }}</text> <text class="title">{{ $t('app.hello') }}</text>
<uni-icons type="hand-up" size="30" :class="['mt-5', 'animate__animated', animate]" @click="handUp" /> <uni-icons type="hand-up" size="30" :class="['mt-5', 'animate-heart-beat', animate]" @click="handUp" />
</view> </view>
<fui-footer isFixed> <fui-footer isFixed>
<template #text> <template #text>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论