diff --git a/src/frontend/admin/src/components/scEcharts/echarts-theme-T.js b/src/frontend/admin/src/components/scEcharts/echarts-theme-T.js index 19369923..d958036c 100644 --- a/src/frontend/admin/src/components/scEcharts/echarts-theme-T.js +++ b/src/frontend/admin/src/components/scEcharts/echarts-theme-T.js @@ -1,92 +1,95 @@ import colorTool from '@/utils/color' -const style = getComputedStyle(document.documentElement) -const el_color_primary = style.getPropertyValue('--el-color-primary') -const el_color_info = style.getPropertyValue('--el-color-info') -const el_text_color_primary = style.getPropertyValue('--el-text-color-primary') -const el_border_color_lighter = style.getPropertyValue('--el-border-color-lighter') -const T = { - color: [el_color_primary, colorTool.lighten(el_color_primary, 0.5), ...colorTool.colorSets], - grid: { - left: '3%', - right: '3%', - bottom: '10', - top: '40', - containLabel: true, - }, - pie: { - label: { - color: el_color_info, - }, - }, - gauge: { - axisTick: { - lineStyle: { - color: el_color_info, - }, - }, - splitLine: { - lineStyle: { - color: el_color_info, - }, - }, - axisLabel: { - color: el_color_info, - }, - title: { - color: el_color_info, - }, - }, - legend: { - textStyle: { - color: el_color_info, - }, - inactiveColor: 'rgba(128,128,128,0.4)', - }, - categoryAxis: { - axisLine: { - show: true, - lineStyle: { - color: 'rgba(128,128,128,0.2)', - width: 1, - }, - }, - axisTick: { - show: false, - lineStyle: { - color: el_text_color_primary, - }, - }, - axisLabel: { - color: el_color_info, - }, - splitLine: { - show: false, - lineStyle: { - color: [el_border_color_lighter], - }, - }, - splitArea: { - show: false, - areaStyle: { - color: ['rgba(255,255,255,0.01)', 'rgba(0,0,0,0.01)'], - }, - }, - }, - valueAxis: { - axisLine: { - show: false, - lineStyle: { - color: el_color_info, - }, - }, - splitLine: { - show: true, - lineStyle: { - color: 'rgba(128,128,128,0.2)', - }, - }, - }, -} +export default { + build() { + const style = getComputedStyle(document.documentElement) + const el_color_primary = style.getPropertyValue('--el-color-primary') + const el_color_info = style.getPropertyValue('--el-color-info') + const el_text_color_primary = style.getPropertyValue('--el-text-color-primary') + const el_border_color_lighter = style.getPropertyValue('--el-border-color-lighter') -export default T \ No newline at end of file + return { + color: [el_color_primary, colorTool.lighten(el_color_primary, 0.5), ...colorTool.colorSets], + grid: { + left: '3%', + right: '3%', + bottom: '10', + top: '40', + containLabel: true, + }, + pie: { + label: { + color: el_color_info, + }, + }, + gauge: { + axisTick: { + lineStyle: { + color: el_color_info, + }, + }, + splitLine: { + lineStyle: { + color: el_color_info, + }, + }, + axisLabel: { + color: el_color_info, + }, + title: { + color: el_color_info, + }, + }, + legend: { + textStyle: { + color: el_color_info, + }, + inactiveColor: 'rgba(128,128,128,0.4)', + }, + categoryAxis: { + axisLine: { + show: true, + lineStyle: { + color: 'rgba(128,128,128,0.2)', + width: 1, + }, + }, + axisTick: { + show: false, + lineStyle: { + color: el_text_color_primary, + }, + }, + axisLabel: { + color: el_color_info, + }, + splitLine: { + show: false, + lineStyle: { + color: [el_border_color_lighter], + }, + }, + splitArea: { + show: false, + areaStyle: { + color: ['rgba(255,255,255,0.01)', 'rgba(0,0,0,0.01)'], + }, + }, + }, + valueAxis: { + axisLine: { + show: false, + lineStyle: { + color: el_color_info, + }, + }, + splitLine: { + show: true, + lineStyle: { + color: 'rgba(128,128,128,0.2)', + }, + }, + }, + } + }, +} \ No newline at end of file diff --git a/src/frontend/admin/src/components/scEcharts/index.vue b/src/frontend/admin/src/components/scEcharts/index.vue index 43389569..da04b9cc 100644 --- a/src/frontend/admin/src/components/scEcharts/index.vue +++ b/src/frontend/admin/src/components/scEcharts/index.vue @@ -5,8 +5,6 @@