1.0.1 • Published 1 year ago

bip-rongqb v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

manifest.json

1.组件manifest.json

  • 字段描述:
分类字段类型描述
基本信息codestring编码(英文)
namestring名称(中文)
versionstring版本号
domainKeystring领域编码
keywordstring关键字
descriptionstring组件包描述
组件信息componentsArray组件包结构描述
分组信息groupArray分组结构描述
  • 示例:
"code": "bip_component_web",
"name": "bip_component_web",
"version": "1.0.0",
"domainKey": "developplatform", // domainKey
"keyword": "bip_component_web library",
"description": "bip_component_web组件包",
"terminalType": 1,
"components": [
    // ...
],
"group": [
    // ...
],

1.1.components

  • 字段描述:
分类字段类型描述
基本信息codestring编码(英文)
namestring名称(中文)
typestring组件分类类型,TypeProps
descriptionstring组件描述
uiExtClassstring组件类型,UIExtClass
compTypestring跟字段【uiExtClass】同值
libraryGroupIdstring分组ID
属性信息propsArray属性结构描述
事件信息eventsArray事件结构描述
  • 组件类型:
export enum UIExtClass {
  Container = 'xcontainer', // 容器
  Control = 'xcontrol', // 控件
  Button = 'xbutton' //按钮
}
  • 组件分类类型:
export enum TypeProps {
  LayoutContainer = 'layoutContainer',
  DataContainer = 'dataContainer',
  BasicControls = 'basicControls',
  FormControls = 'formControls',
  FunctionalControls = 'functionalControls',
  BusinessControls = 'businessControls',
  InterfaceControls = 'interfaceControls'
}
  • 示例:
{
    name: "按钮",
    code: "BipButton",
    icon: "lowcode lcButton",
    type: "basicControls",
    uiExtClass: "xbutton",
    compType: "xbutton",
    libraryGroupId: "baseGroup",
    props: [
        // ...
    ],
    events: [
        // ...
    ],
    children: [
        // ...                
    ]
}

1.1.1.props

  • 字段描述:
分类字段类型描述
基本信息codestring编码(英文)
namestring名称(中文)
typestring字段值类型,FieldTypes
descriptionstring属性描述
defaultValue跟随type字段值类型默认值
showDesignstring设计态显示与否
meta信息metaTypeArraymeta类型
metaPropsArraymeta属性
  • 字段值类型:
export enum FieldTypes {
  string = 'string',
  number = 'number',
  boolean = 'boolean',
  object = 'object',
  date = 'date',
  action = 'action',
  child = 'child',
  array = 'array'
}
  • 示例:
props: [
    {
        name: "按钮大小",
        code: "size",
        type: FieldTypes.string,
        defaultValue: "lg",
        metaType: EditTypes.Select,
        metaProps: JSON.stringify({
            options: [
                { value: "lg", text: "大号按钮" },
                { value: "md", text: "中号按钮" },
                { value: "sm", text: "小号按钮" }
            ]
        }),
        showDesign: true
    }
]

1.1.2.events

  • 字段描述:
分类字段类型描述
基本信息operationCodestring编码(英文)
operationNamestring名称(中文)
descriptionstring事件描述
关联信息metaTypeArray关联组件Code
metaPropsArray数组【组件Code】
  • 示例:
events: [{
    uiDefineId: "BipButton",
    operationCode: "onClick",
    operationName: "点击",
    uitypes: ["BipButton"]
}]

1.1.3.children

1.2.group

  • 字段描述:
分类字段类型描述
基本信息idstring编码(英文)
namestring名称(中文)
descriptionstring分组描述
childrenArray子集,数组【组件Code】
  • 示例:
"group": [
        {
            "id": "baseContainer",
            "name": "基础容器",
            "children": [
                "BipButton"
            ]
    }
]

2.函数manifest.json

  • 字段描述:
分类字段类型描述
基本信息codestring编码(英文)
namestring名称(中文)
keywordstring关键字
domainKeystring领域编码
descriptionstring函数包描述
terminalTypeArray终端类型
  • 终端类型:
[
  "PC", "Mobile", "WX", "DD"
]
  • 示例:
{
	"name": "bip_api",
	"version": "1.0.0",
	"keyword": "bip_api library",
	"code": "bip_api",
	"description": "bip_api函数包",
	"terminalType": [
		"PC",
		"Mobile",
		"WX",
		"DD"
	]
}

3.如何从yon-ui-cli升级manifest.json

3.1.废除字段

  • 设计态描述字段【component.props.designConfig】
  • 描述相关字段【mdDescription|des】等,统一命名【description】;

3.2.设计态描述变更【component.props.designConfig】

// before:
designConfig: {
    type: EditTypes.Select,
    props: {
        options: [
            { value: 'lg', text: '大号按钮' },
            { value: 'md', text: '中号按钮' },
            { value: 'sm', text: '小号按钮' }
        ]
    }
}
// after:
metaType: EditTypes.Select,
metaProps: JSON.stringify({
    options: [
        { value: "lg", text: "大号按钮" },
        { value: "md", text: "中号按钮" },
        { value: "sm", text: "小号按钮" }
    ]
})

3.3.事件描述变更【component.events】

// before:
{
    code: 'onClick',
    name: '点击'
}
// after:
events: [{
    uiDefineId: "componentID",
    operationCode: "onClick",
    operationName: "点击",
    uitypes: ["componentID"]
}]

3.4.必填属性【component.(uiExtClass|compType)】

uiExtClass: UIExtClass.Button,
compType: UIExtClass.Button,
1.0.1

1 year ago

1.0.0

1 year ago