Pre Merge pull request !217 from 奔跑的面条/dev

This commit is contained in:
奔跑的面条 2023-12-17 06:28:44 +00:00 committed by Gitee
commit b7a3c048e2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 167 additions and 143 deletions

View File

@ -30,5 +30,5 @@ const hljsTheme = useCode()
// //
const { locale, dateLocale } = useLang() const { locale, dateLocale } = useLang()
//
</script> </script>

View File

@ -119,7 +119,10 @@ export const useChartDataFetch = (
if (isPreview()) { if (isPreview()) {
targetComponent.request.requestDataType === RequestDataTypeEnum.Pond targetComponent.request.requestDataType === RequestDataTypeEnum.Pond
? addGlobalDataInterface(targetComponent, useChartEditStore, updateCallback || echartsUpdateHandle) ? addGlobalDataInterface(targetComponent, useChartEditStore, (newData: any) => {
echartsUpdateHandle(newData)
if (updateCallback) updateCallback(newData)
})
: requestIntervalFn() : requestIntervalFn()
} else { } else {
requestIntervalFn() requestIntervalFn()

View File

@ -1,10 +1,18 @@
<template> <template>
<v-chart ref="vChartRef" :init-options="initOptions" :theme="themeColor" :option="option" :manual-update="isPreview()" autoresize></v-chart> <v-chart
ref="vChartRef"
:init-options="initOptions"
:theme="themeColor"
:option="(option as EChartsOption)"
:manual-update="isPreview()"
autoresize
></v-chart>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed, PropType } from 'vue' import { computed, PropType } from 'vue'
import VChart from 'vue-echarts' import VChart from 'vue-echarts'
import { EChartsOption } from 'echarts'
import { useCanvasInitOptions } from '@/hooks/useCanvasInitOptions.hook' import { useCanvasInitOptions } from '@/hooks/useCanvasInitOptions.hook'
import { use } from 'echarts/core' import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers' import { CanvasRenderer } from 'echarts/renderers'

View File

@ -3,7 +3,7 @@
ref="vChartRef" ref="vChartRef"
:init-options="initOptions" :init-options="initOptions"
:theme="themeColor" :theme="themeColor"
:option="option" :option="(option as EChartsOption)"
:manual-update="isPreview()" :manual-update="isPreview()"
autoresize autoresize
></v-chart> ></v-chart>
@ -12,6 +12,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, PropType, watch } from 'vue' import { ref, computed, PropType, watch } from 'vue'
import VChart from 'vue-echarts' import VChart from 'vue-echarts'
import { EChartsOption } from 'echarts'
import { useCanvasInitOptions } from '@/hooks/useCanvasInitOptions.hook' import { useCanvasInitOptions } from '@/hooks/useCanvasInitOptions.hook'
import dataJson from './data.json' import dataJson from './data.json'
import { use } from 'echarts/core' import { use } from 'echarts/core'

View File

@ -1,10 +1,18 @@
<template> <template>
<v-chart ref="vChartRef" :init-options="initOptions" :theme="themeColor" :option="option" :manual-update="isPreview()" autoresize></v-chart> <v-chart
ref="vChartRef"
:init-options="initOptions"
:theme="themeColor"
:option="(option as EChartsOption)"
:manual-update="isPreview()"
autoresize
></v-chart>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch, computed, PropType } from 'vue' import { ref, watch, computed, PropType } from 'vue'
import VChart from 'vue-echarts' import VChart from 'vue-echarts'
import { EChartsOption } from 'echarts'
import { useCanvasInitOptions } from '@/hooks/useCanvasInitOptions.hook' import { useCanvasInitOptions } from '@/hooks/useCanvasInitOptions.hook'
import dataJson from './data.json' import dataJson from './data.json'
import { use } from 'echarts/core' import { use } from 'echarts/core'

View File

@ -134,7 +134,10 @@ watch(
) )
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore, (newData: typeof dataJson) => { const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore, (newData: typeof dataJson) => {
clearPieInterval()
if (props.chartConfig.option.isCarousel) {
addPieInterval(newData) addPieInterval(newData)
}
}) })
onMounted(() => { onMounted(() => {

View File

@ -70,6 +70,7 @@ const click = () => {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: v-bind('textAlign'); justify-content: v-bind('textAlign');
overflow: hidden;
.content { .content {
color: v-bind('fontColor'); color: v-bind('fontColor');