From 3d4355d8791c7e990377c7a2abc5ce238e752e91 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 26 一月 2026 17:36:05 +0800
Subject: [PATCH] 进销存-升级 1.销售台账页面代码重构 2.发货台账页面联调 3.采购台账代码重构,采购模版添加修改和删除,逻辑完善 4.采购审批页面逻辑修改完善 5.采购台账、销售台账导入和下载模版修改
---
src/components/Echarts/echarts.vue | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/components/Echarts/echarts.vue b/src/components/Echarts/echarts.vue
index 2c51ace..a386bb7 100644
--- a/src/components/Echarts/echarts.vue
+++ b/src/components/Echarts/echarts.vue
@@ -1,6 +1,7 @@
<template>
- <div>
+ <div style="position: relative;">
<div ref="chartRef" :style="chartStyle"></div>
+ <slot></slot>
</div>
</template>
@@ -75,6 +76,10 @@
type: Array,
default: () => []
},
+ visualMap: {
+ type: Object,
+ default: () => ({})
+ },
option: {
type: Object,
default: () => ({})
@@ -89,7 +94,7 @@
// Methods
function generateChart(option) {
- const copiedOption = JSON.parse(JSON.stringify(option)) // 鉁� 娣辨嫹璐�
+ const copiedOption = option
if (copiedOption.series && copiedOption.series.length > 0) {
copiedOption.series.forEach((s, index) => {
@@ -112,13 +117,15 @@
const option = {
color: props.color.length ? props.color : undefined,
backgroundColor: props.options.backgroundColor || '#fff',
+ textStyle: props.options.textStyle || { color: '#333' },
xAxis: props.xAxis,
yAxis: props.yAxis,
dataset: props.dataset,
series: props.series,
grid: props.grid,
legend: props.legend,
- tooltip: props.tooltip
+ tooltip: props.tooltip,
+ visualMap: Object.keys(props.visualMap).length ? props.visualMap : undefined,
}
chartInstance.clear()
@@ -147,7 +154,7 @@
// Watch all reactive props that affect the chart
watch(
- () => [props.xAxis, props.series],
+ () => [props.xAxis, props.yAxis, props.series, props.legend, props.tooltip, props.visualMap],
() => {
if (chartInstance) {
renderChart()
--
Gitblit v1.9.3