mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-03 13:44:47 +08:00
chore(deps): update
This commit is contained in:
@@ -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
|
||||
43
src/views/able/print/pieChart.vue
Normal file
43
src/views/able/print/pieChart.vue
Normal 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>
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user