双击打开详情修复

This commit is contained in:
2024-12-26 17:53:50 +08:00
parent 05a117152c
commit 2bd0de8c17
36 changed files with 815 additions and 750 deletions

View File

@@ -1,17 +1,5 @@
import { use } from "echarts/core"
import { CanvasRenderer } from "echarts/renderers"
import { BarChart, LineChart, PieChart, RadarChart, GaugeChart } from "echarts/charts"
import {
GridComponent,
TooltipComponent,
LegendComponent,
DataZoomComponent,
GraphicComponent
} from "echarts/components"
import MaCrud from "./ma-crud/index.vue"
import MaForm from "./ma-form/index.vue"
import MaChart from "./ma-charts/index.vue"
import MaUpload from "./ma-upload/index.vue"
import MaTreeSlider from "./ma-treeSlider/index.vue"
import MaResource from "./ma-resource/index.vue"
@@ -20,27 +8,11 @@ import MaUser from "./ma-user/index.vue"
import MaEditor from "./ma-editor/index.vue"
import MaIcon from "./ma-icon/index.vue"
import MaUserInfo from "./ma-userInfo/index.vue"
import "echarts/dist/echarts.esm.min.mjs"
// 后续增加的全局组件
import Empty from "./Empty/index.vue"
use([
CanvasRenderer,
BarChart,
LineChart,
PieChart,
RadarChart,
GaugeChart,
GridComponent,
TooltipComponent,
LegendComponent,
DataZoomComponent,
GraphicComponent
])
export default {
install(Vue) {
Vue.component("MaChart", MaChart)
Vue.component("MaCrud", MaCrud)
Vue.component("MaForm", MaForm)
Vue.component("MaUpload", MaUpload)

View File

@@ -1,48 +0,0 @@
<!--
- @Author XXX
- @Link XXX
-->
<template>
<v-charts v-if="renderChart" :option="options" :autoresize="autoresize" :style="{ width, height }" />
</template>
<script setup>
import { ref, computed, nextTick } from "vue"
import VCharts from "vue-echarts"
import { useAppStore } from "@/store"
const props = defineProps({
options: {
type: Object,
default() {
return {}
}
},
autoresize: {
type: Boolean,
default: true
},
width: {
type: String,
default: "100%"
},
height: {
type: String,
default: "100%"
}
})
const appStore = useAppStore()
let mode = computed(() => {
return appStore.mode === "dark" ? "dark" : "auto"
})
const renderChart = ref(false)
nextTick(() => {
renderChart.value = true
})
</script>
<style scoped lang="less"></style>