mirror of
https://gitee.com/dromara/go-view.git
synced 2025-10-13 22:12:11 +08:00
Pre Merge pull request !217 from 奔跑的面条/dev
This commit is contained in:
commit
b7a3c048e2
@ -30,5 +30,5 @@ const hljsTheme = useCode()
|
|||||||
|
|
||||||
// 全局语言
|
// 全局语言
|
||||||
const { locale, dateLocale } = useLang()
|
const { locale, dateLocale } = useLang()
|
||||||
|
//测试提交
|
||||||
</script>
|
</script>
|
||||||
|
@ -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()
|
||||||
|
@ -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'
|
||||||
|
@ -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'
|
||||||
|
@ -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'
|
||||||
|
@ -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(() => {
|
||||||
|
@ -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');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user