feat: 新增动态接口过滤器功能

This commit is contained in:
奔跑的面条
2022-07-05 21:44:16 +08:00
parent 503c9d6fca
commit 8d0615bc95
20 changed files with 541 additions and 107 deletions
@@ -74,7 +74,6 @@ const dataHandle = (newData: number) => {
watch(
() => props.chartConfig.option.dataset,
newData => {
console.log(dataHandle(newData))
props.chartConfig.option.series[0].data = [dataHandle(newData)]
option.value = props.chartConfig.option
},
+8 -2
View File
@@ -2,9 +2,14 @@ import type { GlobalThemeJsonType } from '@/settings/chartThemes/index'
import type { RequestConfigType } from '@/store/modules/chartEditStore/chartEditStore.d'
export enum ChartFrameEnum {
COMMON = 'common',
// echarts 框架
ECHARTS = 'echarts',
NAIVE_UI = 'naiveUI'
// UI 组件框架
NAIVE_UI = 'naiveUI',
// 自定义带数据组件
COMMON = 'common',
// 无数据变更
STATIC = 'static'
}
// 组件配置
@@ -77,6 +82,7 @@ export interface PublicConfigType extends requestConfig {
// 动画
animations: string[]
}
filter?: string
setPosition: Function
}
+2
View File
@@ -45,6 +45,8 @@ export class publicConfig implements PublicConfigType {
public data = { ...requestConfig }
// 数据获取
public requestData = []
// 数据过滤
public filter = undefined
// 设置坐标
public setPosition(x: number, y: number): void {