chore: 去除夜间适配 useEcharts会自动处理
This commit is contained in:
parent
2afec343b6
commit
8bb203dc0d
@ -4,7 +4,6 @@ import type { EChartsOption } from 'echarts';
|
|||||||
import { defineComponent, onMounted, ref, watch } from 'vue';
|
import { defineComponent, onMounted, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { EchartsUI, type EchartsUIType, useEcharts } from '@vben/chart-ui';
|
import { EchartsUI, type EchartsUIType, useEcharts } from '@vben/chart-ui';
|
||||||
import { preferences } from '@vben/preferences';
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: { EchartsUI },
|
components: { EchartsUI },
|
||||||
@ -33,13 +32,6 @@ export default defineComponent({
|
|||||||
setEchartsOption(props.data);
|
setEchartsOption(props.data);
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
|
||||||
() => preferences.theme.mode,
|
|
||||||
() => {
|
|
||||||
setEchartsOption(props.data);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
function setEchartsOption(data: any[]) {
|
function setEchartsOption(data: any[]) {
|
||||||
const option: EChartsOption = {
|
const option: EChartsOption = {
|
||||||
series: [
|
series: [
|
||||||
|
@ -4,7 +4,6 @@ import type { EChartsOption } from 'echarts';
|
|||||||
import { defineComponent, onMounted, ref, watch } from 'vue';
|
import { defineComponent, onMounted, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { EchartsUI, type EchartsUIType, useEcharts } from '@vben/chart-ui';
|
import { EchartsUI, type EchartsUIType, useEcharts } from '@vben/chart-ui';
|
||||||
import { preferences } from '@vben/preferences';
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: { EchartsUI },
|
components: { EchartsUI },
|
||||||
@ -33,13 +32,6 @@ export default defineComponent({
|
|||||||
setEchartsOption(props.data);
|
setEchartsOption(props.data);
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
|
||||||
() => preferences.theme.mode,
|
|
||||||
() => {
|
|
||||||
setEchartsOption(props.data);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
function getNearestPowerOfTen(num: number) {
|
function getNearestPowerOfTen(num: number) {
|
||||||
let power = 10;
|
let power = 10;
|
||||||
while (power <= num) {
|
while (power <= num) {
|
||||||
|
Loading…
Reference in New Issue
Block a user