mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 15:41:32 +08:00
refactor(hooks): introduce vueuse, delete duplicate hooks
This commit is contained in:
@@ -6,15 +6,13 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent, reactive, computed, watch, onMounted, unref, toRef } from 'vue';
|
||||
import { countToProps } from './props';
|
||||
import { useRaf } from '/@/hooks/event/useRaf';
|
||||
import { isNumber } from '/@/utils/is';
|
||||
import { requestAnimationFrame, cancelAnimationFrame } from '/@/utils/animation';
|
||||
export default defineComponent({
|
||||
name: 'CountTo',
|
||||
props: countToProps,
|
||||
emits: ['mounted', 'callback'],
|
||||
setup(props, { emit }) {
|
||||
const { requestAnimationFrame, cancelAnimationFrame } = useRaf();
|
||||
|
||||
const state = reactive<{
|
||||
localStartVal: number;
|
||||
printVal: number | null;
|
||||
|
Reference in New Issue
Block a user