feat: 新增数据请求配置

This commit is contained in:
MTrun
2022-03-17 20:18:46 +08:00
parent c399277350
commit 501dfdc223
9 changed files with 105 additions and 25 deletions
+10
View File
@@ -1,5 +1,10 @@
import { getUUID } from '@/utils'
import { PublicConfigType } from '@/packages/index.d'
import { RequestDataTypeEnum, RequestConfigType } from '@/store/modules/chartEditStore/chartEditStore.d'
const requestConfig: RequestConfigType = {
requestDataType: RequestDataTypeEnum.STATIC,
}
export class publicConfig implements PublicConfigType {
public id = getUUID()
@@ -12,6 +17,11 @@ export class publicConfig implements PublicConfigType {
opacity: 1,
animations: []
}
public data = {
requestDataType: RequestDataTypeEnum.STATIC
}
// 数据获取
public requestData = { ...requestConfig }
// 设置坐标
public setPosition(x: number, y: number): void {
this.attr.x = x