import { mergeParameters } from '../../base/utils'; import React from 'react'; import { ComponentsType, iProperty, TagType } from "../../base/type"; import iGrapesJSConfig from "../../type"; import { IOTTimeTaskProps, iIOTTimeTaskJSON } from "./type"; import IOTTimeTask from './IOTTimeTask'; const grapesJSConfig: iGrapesJSConfig = { type: [ComponentsType.cloudTimer], id: TagType.IOTTimeTask, tag: TagType.IOTTimeTask, access: 'rw', render: (jsonData, ...args) => { const props = mergeParameters(jsonData, ...args); return ; }, buildData: (mock: boolean = false, property?: iProperty) => { const props: iIOTTimeTaskJSON = { list: [], type: '', streamId: 'timeTask', title: '定时设置', subTitle: { value: '今日暂无定时', show: true }, icon: { value: 'insideicon-cu-1', show: true }, disabled: false, }; return props; }, traits: () => { return [ { type: 'option-icon', name: 'icon', label: '显示图标', }, { type: 'text', name: 'title', label: '', }, { type: 'image-card', name: 'clockTask', label: '定时任务', theme1Src: 'https://iotfestatic.s3.cn-north-1.jdcloud-oss.com/%E5%B0%8F%E4%BA%AC%E9%B1%BC%E5%B9%B3%E5%8F%B0/%E6%8B%96%E6%8B%BD%E5%B9%B3%E5%8F%B0%E9%9D%99%E6%80%81%E8%B5%84%E6%BA%90/timetaskTheme1.png', theme12Src: 'https://iotfestatic.s3.cn-north-1.jdcloud-oss.com/%E5%B0%8F%E4%BA%AC%E9%B1%BC%E5%B9%B3%E5%8F%B0/%E6%8B%96%E6%8B%BD%E5%B9%B3%E5%8F%B0%E9%9D%99%E6%80%81%E8%B5%84%E6%BA%90/timetaskTheme12.png', style: { width: 200, height: 400 } }, { type: 'bind-multiple-stream', name: 'list', label: '绑定功能', tips: '定时任务页面将按照您在此处勾选参数的顺序展示', description: '点击下面的参数名称,选择当前产品可以设置的定时任务' } ]; }, }; export default grapesJSConfig;