|
|
@ -1,12 +1,20 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
<script lang="ts" setup> |
|
|
|
import { autoResetRef, useThrottleFn } from '#imports' |
|
|
|
import { autoResetRef, useThrottleFn, toRefs } from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
interface Props { |
|
|
|
interface Props { |
|
|
|
size?: number |
|
|
|
size?: number |
|
|
|
animate?: boolean |
|
|
|
animate?: boolean |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const { size = 90, animate = false } = defineProps<Props>() |
|
|
|
const props = withDefaults( |
|
|
|
|
|
|
|
defineProps<Props>(), |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
size: 90, |
|
|
|
|
|
|
|
animate: false, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { size, animate } = toRefs(props) |
|
|
|
|
|
|
|
|
|
|
|
const ping = autoResetRef(false, 1000) |
|
|
|
const ping = autoResetRef(false, 1000) |
|
|
|
|
|
|
|
|
|
|
|