pictureComponent.config.ts
604 Bytes
import { DataComponentRecord, DataSource } from '/@/api/dataBoard/model';
export type PictureComponentType = 'picture-component-1';
export interface PictureComponentLayout {}
export interface PictureComponentValue {
value?: string;
updateTime?: string;
}
export const transformPictureConfig = (
config: PictureComponentLayout,
record: DataComponentRecord,
dataSourceRecord: DataSource
) => {
const componentInfo = dataSourceRecord.componentInfo;
return {
value: {
value: componentInfo.value,
updateTime: componentInfo.updateTime,
} as PictureComponentValue,
};
};