chore(deps): update

This commit is contained in:
xiaoxian521
2024-01-07 23:59:54 +08:00
parent 4fa6a47342
commit ad907cc727
6 changed files with 723 additions and 690 deletions

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { ref } from "vue";
import Print from "@/utils/print";
import Line from "../welcome/components/Line.vue";
import pieChart from "./pieChart.vue";
defineOptions({
name: "Print"
@@ -157,7 +157,7 @@ const tableData: User[] = [
}"
>
<p class="font-medium pt-1">Echart</p>
<Line class="echart mt-[10px]" />
<pieChart class="echart mt-[10px]" />
</el-col>
<el-col

View File

@@ -0,0 +1,43 @@
<script setup lang="ts">
import { ref, computed } from "vue";
import { useDark, useECharts } from "@pureadmin/utils";
const { isDark } = useDark();
const theme = computed(() => (isDark.value ? "dark" : "light"));
const pieChartRef = ref();
const { setOptions } = useECharts(pieChartRef, {
theme
});
setOptions({
tooltip: {
trigger: "item"
},
legend: {
icon: "circle",
//@ts-expect-error
right: true
},
series: [
{
name: "饼图",
type: "pie",
top: "20%",
radius: "80%",
center: ["40%", "50%"],
color: ["#e6a23c", "#f56c6c", "#53a7ff"],
data: [
{ value: 400, name: "watchers" },
{ value: 1600, name: "forks" },
{ value: 7200, name: "star" }
]
}
]
});
</script>
<template>
<div ref="pieChartRef" style="width: 100%; height: 35vh" />
</template>

View File

@@ -1,12 +1,6 @@
export { default as dayjs } from "dayjs";
export { useResizeObserver } from "@vueuse/core";
export {
useDark,
debounce,
cloneDeep,
randomColor,
randomGradient
} from "@pureadmin/utils";
export { useDark, debounce, cloneDeep, randomGradient } from "@pureadmin/utils";
export function getRandomIntBetween(min: number, max: number) {
return Math.floor(Math.random() * (max - min + 1)) + min;