Skip to content

Commit

Permalink
fix: (animate) 小程序触发动画失效
Browse files Browse the repository at this point in the history
  • Loading branch information
yang1206 committed Jul 30, 2023
1 parent 9067f4d commit a152121
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/nutui/components/animate/animate.vue
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { computed, defineComponent, ref, watch } from 'vue'
import { PREFIX } from '../_utils'
import requestAniFrame from '../_utils/raf'
import { animateEmits, animateProps } from './animate'
const props = defineProps(animateProps)
Expand All @@ -18,11 +19,20 @@ const classes = computed(() => {
function animate() {
animated.value = false
// #ifdef H5
requestAnimationFrame(() => {
requestAnimationFrame(() => {
animated.value = true
})
})
// #endif
// #ifndef H5
requestAniFrame(() => {
requestAniFrame(() => {
animated.value = true
})
})
// #endif
}
function handleClick(event: Event) {
Expand Down

0 comments on commit a152121

Please sign in to comment.