Ver código fonte

perf: 词云优化

奔跑的面条 3 anos atrás
pai
commit
55d5f160a5

+ 2 - 1
src/packages/components/Informations/Mores/Image/index.ts

@@ -1,5 +1,5 @@
 import image from '@/assets/images/chart/informations/photo.png'
-import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d'
+import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d'
 import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
 
 export const ImageConfig: ConfigType = {
@@ -10,5 +10,6 @@ export const ImageConfig: ConfigType = {
   category: ChatCategoryEnum.MORE,
   categoryName: ChatCategoryEnumName.MORE,
   package: PackagesCategoryEnum.INFORMATIONS,
+  chartFrame: ChartFrameEnum.COMMON,
   image
 }

+ 2 - 0
src/packages/components/Informations/Mores/WordCloud/config.vue

@@ -70,9 +70,11 @@ const sliderFormatTooltip = (v: number) => {
 const updateWidth = (value: number) => {
   props.optionData.series[0].width = `${value}%`
 }
+
 const updateHeight = (value: number) => {
   props.optionData.series[0].height = `${value}%`
 }
+
 const updateRotation = (value: number) => {
   props.optionData.series[0].rotationStep = value
   props.optionData.series[0].rotationRange = value === 0 ? [0, 0] : [-90, 90]

+ 2 - 1
src/packages/components/Informations/Mores/WordCloud/index.ts

@@ -1,5 +1,5 @@
 import image from '@/assets/images/chart/informations/words_cloud.png'
-import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d'
+import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d'
 import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
 
 export const WordCloudConfig: ConfigType = {
@@ -10,5 +10,6 @@ export const WordCloudConfig: ConfigType = {
   category: ChatCategoryEnum.MORE,
   categoryName: ChatCategoryEnumName.MORE,
   package: PackagesCategoryEnum.INFORMATIONS,
+  chartFrame: ChartFrameEnum.COMMON,
   image
 }

+ 2 - 2
src/packages/components/Informations/Mores/WordCloud/index.vue

@@ -21,7 +21,7 @@ import { mergeTheme } from '@/packages/public/chart'
 import { useChartDataFetch } from '@/hooks'
 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
 import { isPreview } from '@/utils'
-import { DatasetComponent, GridComponent, TooltipComponent, LegendComponent } from 'echarts/components'
+import { GridComponent, TooltipComponent, LegendComponent } from 'echarts/components'
 import dataJson from './data.json'
 
 const props = defineProps({
@@ -39,7 +39,7 @@ const props = defineProps({
   }
 })
 
-use([DatasetComponent, CanvasRenderer, BarChart, GridComponent, TooltipComponent, LegendComponent])
+use([CanvasRenderer, BarChart, GridComponent, TooltipComponent, LegendComponent])
 
 const replaceMergeArr = ref<string[]>()
 

+ 5 - 1
src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataRequest/components/RequestTargetConfig/index.vue

@@ -74,7 +74,8 @@ import {
   radarUrl,
   heatMapUrl,
   scatterBasicUrl,
-  mapUrl
+  mapUrl,
+  wordCloudUrl
 } from '@/api/mock'
 
 const { HelpOutlineIcon } = icon.ionicons5
@@ -119,6 +120,9 @@ const apiList = [
   {
     value: `【地图数据】${mapUrl}`
   },
+  {
+    value: `【词云】${wordCloudUrl}`
+  },
 ]
 </script>