Преглед на файлове

feat: 新增图片组件模板

奔跑的面条 преди 3 години
родител
ревизия
98ce49ee03

+ 1 - 1
src/hooks/useChartDataFetch.hook.ts

@@ -59,7 +59,7 @@ export const useChartDataFetch = (
                 })
               } else {
                 // 若遵守规范使用 datase 作为数据 key,则省自动赋值数据
-                targetComponent.option.dataset = res.data
+                targetComponent.option.dataset && (targetComponent.option.dataset = res.data)
               }
               if (updateCallback) {
                 updateCallback(res.data)

+ 0 - 1
src/packages/components/Charts/Bars/BarCommon/config.ts

@@ -3,7 +3,6 @@ import { BarCommonConfig } from './index'
 import { CreateComponentType } from '@/packages/index.d'
 import cloneDeep from 'lodash/cloneDeep'
 import dataJson from './data.json'
-import { GlobalThemeJsonType } from '@/settings/chartThemes/index'
 
 export const includes = ['legend', 'xAxis', 'yAxis']
 

+ 14 - 0
src/packages/components/Informations/Mores/Image/config.ts

@@ -0,0 +1,14 @@
+import { publicConfig } from '@/packages/public'
+import { CreateComponentType } from '@/packages/index.d'
+import { ImageConfig } from './index'
+import cloneDeep from 'lodash/cloneDeep'
+
+export const option = {
+}
+
+export default class Config extends publicConfig implements CreateComponentType
+{
+  public key = ImageConfig.key
+  public chartConfig = cloneDeep(ImageConfig)
+  public option = cloneDeep(option)
+}

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

@@ -1,6 +1,6 @@
 <template>
   <div>
-    词云
+    图片
   </div>
 </template>
 

+ 0 - 1
src/packages/index.ts

@@ -1,4 +1,3 @@
-import type { App } from 'vue'
 import { ChartList } from '@/packages/components/Charts/index'
 import { DecorateList } from '@/packages/components/Decorates/index'
 import { InformationList } from '@/packages/components/Informations/index'