import React from 'react'; import { ComponentsType, DataType, iProperty, TagType } from '../../base/type'; import IOTDataLog from './IOTDataLog'; import { IOTBottomSlideProps ,IOTBottomSlideJson} from './interface'; import iGrapesJSConfig from '../../type'; import { mergeParameters } from '../../base/utils'; const grapesJSConfig: iGrapesJSConfig = { type: [ComponentsType.IOTDataLog], id: 'IOTDataLog', tag: TagType.IOTDataLog, access: 'r', render: (jsonData, ...args) => { const props = mergeParameters(jsonData, ...args); return ; }, buildData: (mock: boolean = false, property?: iProperty) => { const props: any = { title: '数据记录', dataSource:[ { time: "19:30:23", content:'数据记录信息' }, { time: "19:30:21", content:'数据记录信息' }, { time: "19:30:19", content:'数据记录信息' }, { time: "19:30:17", content:'数据记录信息' } ], icon: { value: 'insideicon-cu-1', show: true, }, type: 'dataLog', streamId: 'dataLog' }; return props; }, traits: () => { return [ { type: 'option-icon', name: 'icon', label: '显示图标', }, { type: 'text', name: 'title', label: '', }, { type: 'data-log-bind-stream', name: 'datalog', label: '关联功能', } ]; }, }; export default grapesJSConfig;