import React from 'react'; import iGrapesJSConfig from '../../type'; import IOTNavBar from './IOTNavBar'; import { IOTNavBarProps } from './interface'; import { ComponentsType, DataType, iFunction, iProperty, TagType } from '../type'; import { iIOTNavBarJSON } from '.'; import { mergeParameters } from '../utils'; const grapesJSConfig: iGrapesJSConfig = { type: [ComponentsType.Element], id: 'IOTNavBar', tag: TagType.IOTNavBar, access: 'r', render: (jsonData, ...args) => { const props = mergeParameters(jsonData, ...args); return ; }, buildData: (mock: boolean = false, property?: iProperty) => { //区分类 const props: iIOTNavBarJSON = { naviTitle: '标题', backgroundcolor: 'white', foregroundcolor: 'blue', }; return props; }, traits: () => { return [ { type: 'text', name: 'naviTitle', label: '', }, { type: 'color', name: 'backgroundcolor', label: '背景色', }, { type: 'color', name: 'foregroundcolor', label: '前景色', }, ]; }, }; export default grapesJSConfig;