0.0.1-beta.2 • Published 3 years ago

visualize-config v0.0.1-beta.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

aifp_ui

如何添加config

// 默认包含以下内容即可,这里的内容都会通过element传入组件,在组件内声明一个element来接收
const config = {
  // 组件名
  component: 'Map',
  // 组件在左侧列表的名字
  label: '地图',
  // 组件在左侧列表的图标
  icon: 'jindutiao',
  // 组件的样式,部分样式已内置,这里是额外添加的
  style: {
      width: 600,
      height: 600,
      backgroundColor: '',
  },
  // 组件props,可以使用,也可以选择不使用,使用的话,必须是一个json-schema,格式如下,默认会把所有参数传入组件
  props: {
      schemaOptions: {
          schema: {
              type: 'object',
              required: [],
              properties: {
                  title: {
                      title: '头部标题',
                      type: 'string',
                      'ui:options': {
                          placeholder: '请输入',
                      },
                  },
              },
              'ui:order': [
                  'title',
              ],
          },
          uiSchema: {},
          formFooter: {
              show: false,
          },
          formProps: {
              labelWidth: '100px',
              labelSuffix: ':',
          },
      },
      // 属性数据
      model: {
          title: '默认标题',
      },
 
  },
  // 拓展属性,任意添加
  extend:{
    
  }
}
export default config