refactor(hooks): introduce vueuse, delete duplicate hooks

This commit is contained in:
vben
2020-11-12 22:40:16 +08:00
parent ecfb702b09
commit d9b1960030
48 changed files with 135 additions and 610 deletions

View File

@@ -1,4 +1,4 @@
import { useTimeout } from '/@/hooks/core/useTimeout';
import { useTimeoutFn } from '@vueuse/core';
import { tryOnUnmounted } from '/@/utils/helper/vueHelper';
import { unref, Ref, nextTick } from 'vue';
@@ -9,7 +9,7 @@ export function useApexCharts(elRef: Ref<HTMLDivElement>) {
function setOptions(options: any) {
nextTick(() => {
useTimeout(() => {
useTimeoutFn(() => {
const el = unref(elRef);
if (!el || !unref(el)) return;