feat: 新增数据请求接口

This commit is contained in:
MTrun
2022-03-21 20:56:42 +08:00
parent 0cb3cb3eae
commit d9ee41c892
14 changed files with 177 additions and 73 deletions
+4 -4
View File
@@ -1,9 +1,11 @@
import { getUUID } from '@/utils'
import { PublicConfigType } from '@/packages/index.d'
import { RequestDataTypeEnum, RequestConfigType } from '@/store/modules/chartEditStore/chartEditStore.d'
import { RequestHttpEnum } from '@/enums/httpEnum'
const requestConfig: RequestConfigType = {
requestDataType: RequestDataTypeEnum.STATIC,
requestHttpType: RequestHttpEnum.GET
}
export class publicConfig implements PublicConfigType {
@@ -18,11 +20,9 @@ export class publicConfig implements PublicConfigType {
animations: []
}
// 数据
public data = {
requestDataType: RequestDataTypeEnum.STATIC
}
public data = { ...requestConfig }
// 数据获取
public requestData = { ...requestConfig }
public requestData = []
// 设置坐标
public setPosition(x: number, y: number): void {
this.attr.x = x