chore: 框架构建流程调整
This commit is contained in:
@@ -2,6 +2,16 @@ import type { MaterialDescription } from '@vtj/core';
|
||||
|
||||
import instance from './instance';
|
||||
|
||||
type MaterialData = {
|
||||
created_at?: string;
|
||||
// 从原interface合并的字段
|
||||
id?: number;
|
||||
name?: string;
|
||||
project_id: number;
|
||||
updated_at?: string;
|
||||
value: Record<string, MaterialDescription>;
|
||||
};
|
||||
|
||||
// 定义响应类型
|
||||
interface MaterialResponse {
|
||||
code: number;
|
||||
@@ -51,16 +61,6 @@ export const getMaterials = async (id: number): Promise<MaterialResponse> => {
|
||||
return response.data;
|
||||
};
|
||||
|
||||
type MaterialData = {
|
||||
created_at?: string;
|
||||
// 从原interface合并的字段
|
||||
id?: number;
|
||||
name?: string;
|
||||
project_id: number;
|
||||
updated_at?: string;
|
||||
value: Record<string, MaterialDescription>;
|
||||
};
|
||||
|
||||
function transformMaterialData(data: MaterialData) {
|
||||
return {
|
||||
...data,
|
||||
|
||||
Reference in New Issue
Block a user