ny
22 小时以前 282fbc6488f4e8ceb5fda759f963ee88fbf7b999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<script lang="ts" setup>
import { VbenIconButton } from '@vben-core/shadcn-ui';
 
import { Tooltip } from 'ant-design-vue';
 
import { $t } from '#/locales';
 
defineProps({
  isTwinkle: { type: Boolean, default: false },
});
</script>
<template>
  <Tooltip :mouse-enter-delay="0.5" :title="$t('layout.header.tooltipChat')" placement="bottom">
    <VbenIconButton class="global-header-icon rounded-md px-[10px]">
      <i :class="{ twinkle: isTwinkle }" class="icon-ym icon-ym-ai text-[20px] text-foreground"></i>
    </VbenIconButton>
  </Tooltip>
</template>
<style lang="scss" scoped>
/* 定义keyframe动画,命名为twinkle */
@keyframes twinkle {
  0% {
    opacity: 1;
  }
 
  50% {
    opacity: 1;
  }
 
  50.01% {
    opacity: 0;
  }
 
  100% {
    opacity: 0;
  }
}
 
.twinkle {
  animation: twinkle 0.5s linear infinite;
}
</style>