mirror of
https://github.com/dataease/dataease.git
synced 2026-06-17 04:51:43 +08:00
@@ -2,6 +2,7 @@
|
||||
import { iconChartMap } from '@/components/icon-group/chart-list'
|
||||
import icon_down_outlined1 from '@/assets/svg/icon_down_outlined-1.svg'
|
||||
import { toRefs } from 'vue'
|
||||
import ChartType from './ChartType.vue'
|
||||
|
||||
const props = defineProps({
|
||||
propValue: {
|
||||
@@ -74,7 +75,7 @@ const onTypeChange = (render, type) => {
|
||||
</el-select>
|
||||
</template>
|
||||
<template #default>
|
||||
<chart-type :themes="themes" :type="type" @on-type-change="onTypeChange" />
|
||||
<ChartType :themes="themes" :type="type" @on-type-change="onTypeChange" />
|
||||
</template>
|
||||
</el-popover>
|
||||
</template>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AbstractChartView, ChartLibraryType, ChartRenderType } from '../../../types'
|
||||
import { AbstractChartView, ChartLibraryType, ChartRenderType } from '../../types'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { COLOR_CASES } from '@/views/chart/components/editor/util/chart'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AbstractChartView, ChartLibraryType, ChartRenderType } from '../../../types'
|
||||
import { AbstractChartView, ChartLibraryType, ChartRenderType } from '../../types'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
@@ -6,6 +6,7 @@ const { t } = useI18n()
|
||||
* 图片组图表
|
||||
*/
|
||||
export class PictureGroupView extends AbstractChartView {
|
||||
selectorSpec: EditorSelectorSpec
|
||||
properties: EditorProperty[] = ['background-overall-component', 'border-style', 'threshold']
|
||||
propertyInner: EditorPropertyInner = {
|
||||
'background-overall-component': ['all'],
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AbstractChartView, ChartLibraryType, ChartRenderType } from '../../../types'
|
||||
import { AbstractChartView, ChartLibraryType, ChartRenderType } from '../../types'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
@@ -6,6 +6,7 @@ const { t } = useI18n()
|
||||
* 富文本图表
|
||||
*/
|
||||
export class RichTextChartView extends AbstractChartView {
|
||||
selectorSpec: EditorSelectorSpec
|
||||
properties: EditorProperty[] = [
|
||||
'background-overall-component',
|
||||
'border-style',
|
||||
@@ -20,7 +20,13 @@ class ChartViewManager {
|
||||
const chartViewManager = new ChartViewManager()
|
||||
// 批量自动注册图表,只要是 AbstractChartView 的子类都初始化然后存起来
|
||||
const charts = import.meta.glob(
|
||||
['./charts/map/*.ts', './charts/table/*.ts', './charts/g2/**/*.ts', '!**/common.ts'],
|
||||
[
|
||||
'./charts/map/*.ts',
|
||||
'./charts/table/*.ts',
|
||||
'./charts/g2/**/*.ts',
|
||||
'./charts/others/**/*.ts',
|
||||
'!**/common.ts'
|
||||
],
|
||||
{ eager: true }
|
||||
)
|
||||
for (const chart in charts) {
|
||||
|
||||
Reference in New Issue
Block a user