mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2026-02-19 17:40:26 +08:00
chore: 升级依赖,相关兼容处理
This commit is contained in:
@@ -5,14 +5,10 @@ import {
|
||||
ref,
|
||||
unref,
|
||||
nextTick,
|
||||
computed
|
||||
computed,
|
||||
useTemplateRef
|
||||
} from "vue";
|
||||
import {
|
||||
tryOnMounted,
|
||||
tryOnUnmounted,
|
||||
templateRef,
|
||||
useDebounceFn
|
||||
} from "@vueuse/core";
|
||||
import { tryOnMounted, tryOnUnmounted, useDebounceFn } from "@vueuse/core";
|
||||
import * as utilsMethods from "./utils";
|
||||
const { animationFrame, copyObj } = utilsMethods;
|
||||
animationFrame();
|
||||
@@ -62,17 +58,14 @@ if (props.classOption["key"] === undefined) {
|
||||
props.classOption["key"] = 0;
|
||||
}
|
||||
|
||||
const wrap = templateRef<HTMLElement | null>(
|
||||
`wrap${props.classOption["key"]}`,
|
||||
null
|
||||
const wrap = useTemplateRef<HTMLElement | null>(
|
||||
`wrap${props.classOption["key"]}`
|
||||
);
|
||||
const slotList = templateRef<HTMLElement | null>(
|
||||
`slotList${props.classOption["key"]}`,
|
||||
null
|
||||
const slotList = useTemplateRef<HTMLElement | null>(
|
||||
`slotList${props.classOption["key"]}`
|
||||
);
|
||||
const realBox = templateRef<HTMLElement | null>(
|
||||
`realBox${props.classOption["key"]}`,
|
||||
null
|
||||
const realBox = useTemplateRef<HTMLElement | null>(
|
||||
`realBox${props.classOption["key"]}`
|
||||
);
|
||||
|
||||
const leftSwitchState = computed(() => {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { ref, computed } from "vue";
|
||||
import { tableDataDrag } from "../data";
|
||||
import { message } from "@/utils/message";
|
||||
import { templateRef } from "@vueuse/core";
|
||||
import { ref, computed, useTemplateRef } from "vue";
|
||||
import { clone, useDark, useECharts } from "@pureadmin/utils";
|
||||
|
||||
export function useColumns() {
|
||||
@@ -31,7 +30,7 @@ export function useColumns() {
|
||||
const theme = computed(() => (isDark.value ? "dark" : "light"));
|
||||
|
||||
dataList.value.forEach((_, i) => {
|
||||
const { setOptions } = useECharts(templateRef(`PieChartRef${i}`), {
|
||||
const { setOptions } = useECharts(useTemplateRef(`PieChartRef${i}`), {
|
||||
theme
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, ref, toRef, watch } from "vue";
|
||||
import { TransitionPresets, executeTransition } from "@vueuse/core";
|
||||
import { TransitionPresets, transition } from "@vueuse/core";
|
||||
import {
|
||||
Position,
|
||||
BaseEdge,
|
||||
@@ -153,7 +153,7 @@ async function runAnimation() {
|
||||
currentLength.value = totalLength;
|
||||
}
|
||||
|
||||
await executeTransition(edgePoint, from, totalLength, {
|
||||
await transition(edgePoint, from, totalLength, {
|
||||
transition: TransitionPresets.easeInOutCubic,
|
||||
duration: Math.max(1500, totalLength / 2),
|
||||
abort: () => !isAnimating.value
|
||||
|
||||
Reference in New Issue
Block a user