UNPKG

oadp-material

Version:
382 lines (376 loc) 12 kB
import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types'; const OadpRadioGroupMeta: IPublicTypeComponentMetadata = { "componentName": "OadpRadioGroup", "title": "单选框组", "docUrl": "", "category": "高级组件", "group": "低代码组件", "screenshot": "https://alifd.oss-cn-hangzhou.aliyuncs.com/fusion-cool/icons/icon-light/ic_light_radio.png", "devMode": "proCode", "npm": { "package": "oadp-material", "version": "{{version}}", "exportName": "OadpRadioGroup", "main": "src/index.tsx", "destructuring": true, "subName": "" }, "configure": { "props": [ { "name": "DataSetting", "title": "数据设置", "type": "group", "display": "block", "items": [ { "name": "name", "title": { "label": { "type": "i18n", "zh_CN": "表单标识", "en_US": "Name", }, "tip": { "type": "i18n", "zh_CN": "属性: name | 说明: 表单标识", "en_US": "prop: name | description: name", }, }, "setter": "StringSetter", "supportVariable": false, }, { "name": "id", "title": { "label": { "type": "i18n", "zh_CN": "唯一标识", "en_US": "ID", }, "tip": { "type": "i18n", "zh_CN": "属性: id | 说明: 唯一标识", "en_US": "prop: id | description: switch id", }, }, "setter": "StringSetter" }, { "title": { "label": { "type": "i18n", "en-US": "DataSource", "zh-CN": "数据源" }, "tip": { "type": "i18n", "zh_CN": "属性: dataSource | 说明:设置表格数据源。", "en_US": "prop: dataSource | description: Set Table DataSource.", }, }, "name": "dataSource", "description": "数据源", "setter": { "componentName": "MixedSetter", "props": { "setters": [ { "componentName": "ArraySetter", "props": { "itemSetter": { "componentName": "ObjectSetter", "props": { "config": { "items": [ { "name": "label", "title": "label", "setter": "StringSetter", "supportVariable": true, }, { "name": "value", "title": "value", "setter": "StringSetter", "supportVariable": true, }, ], }, }, "initialValue": { "label": "选项一", "value": "1", }, }, }, }, "JsonSetter", "ExpressionSetter"], }, }, "supportVariable": true, }, { "name": "defaultValue", "title": { "label": { "type": "i18n", "zh_CN": "默认值", "en_US": "defaultValue", }, "tip": { "type": "i18n", "zh_CN": "属性: defaultValue | 说明: 默认值", "en_US": "prop: defaultValue | description: defaultValue", }, }, "setter": { "componentName": "MixedSetter", "props": { "setters": [ { "componentName": "StringSetter", "isRequired": false, "initialValue": "" }, { "componentName": "NumberSetter", "isRequired": false, "initialValue": 0 }, { "componentName": "BoolSetter", "isRequired": false, "initialValue": false } ] } }, "supportVariable": false, "description": "默认值", }, ] }, { "name": "DisplaySetting", "title": "显示设置", "type": "group", "display": "block", "items": [ { "name": "label", "title": { "label": { "type": "i18n", "zh_CN": "标题", "en_US": "Label", }, "tip": { "type": "i18n", "zh_CN": "属性: label | 说明: 标题", "en_US": "prop: label | description: label content", }, }, "setter": "StringSetter", "description": "标题", }, { "name": "size", "title": { "label": { "type": "i18n", "en-US": "Size", "zh-CN": "尺寸模式" }, "tip": { "type": "i18n", "zh_CN": "属性: size | 说明: 尺寸模式,可选值:small=紧凑模式, medium=普通模式, large=放大模式。默认为:medium。", "en_US": "prop: size | description: Size mode, optional values: small=compact mode, medium=normal mode, large=large mode. The default is: medium.", }, }, "description": "属性: size | 说明: 尺寸模式,可选值:small=紧凑模式, medium=普通模式, large=放大模式。默认为:medium。", "setter": { "componentName": "RadioGroupSetter", "props": { "dataSource": [ { "label": "普通模式", "value": "medium" }, { "label": "紧凑模式", "value": "small" }, { "label": "放大模式", "value": "large" } ], "options": [ { "label": "普通模式", "value": "medium" }, { "label": "紧凑模式", "value": "small" }, { "label": "放大模式", "value": "large" } ] }, "initialValue": "medium" } }, { "name": "shape", "title": { "label": { "type": "i18n", "en-US": "shape", "zh-CN": "外观模式" }, "tip": { "type": "i18n", "zh_CN": "属性: shape | 说明: 外观模式,可选值:normal=普通模式, button=按钮模式。默认为:normal。", "en_US": "prop: shape | description: shape mode, optional values: normal=normal mode, button=button mode. The default is: normal.", }, }, "description": "属性: shape | 说明: 外观模式,可选值:normal=普通模式, button=按钮模式。默认为:normal。", "setter": { "componentName": "RadioGroupSetter", "props": { "dataSource": [ { "label": "普通模式", "value": "normal" }, { "label": "按钮模式", "value": "button" } ], "options": [ { "label": "普通模式", "value": "normal" }, { "label": "按钮模式", "value": "button" } ] }, "initialValue": "normal" } }, { "name": "direction", "title": { "label": { "type": "i18n", "en-US": "direction", "zh-CN": "对齐方式" }, "tip": { "type": "i18n", "zh_CN": "属性: direction | 说明: 对齐方式,可选值:hoz=水平对齐, ver=垂直对齐。默认为:hoz。", "en_US": "prop: direction | description: direction mode, optional values: hoz=hoz mode, ver=ver mode. The default is: hoz.", }, }, "description": "属性: direction | 说明: 对齐方式,可选值:hoz=水平对齐, ver=垂直对齐。默认为:hoz。", "setter": { "componentName": "RadioGroupSetter", "props": { "dataSource": [ { "label": "水平对齐", "value": "hoz" }, { "label": "垂直对齐", "value": "ver" } ], "options": [ { "label": "水平对齐", "value": "hoz" }, { "label": "垂直对齐", "value": "ver" } ] }, "initialValue": "hoz" } }, ] }, { "name": "InteractionSetting", "title": "交互设置", "type": "group", "display": "block", "items": [ { "name": "disabled", "title": { "label": { "type": "i18n", "zh_CN": "禁用", "en_US": "Disabled", }, "tip": { "type": "i18n", "zh_CN": "属性: disabled | 说明: 禁用", "en_US": "prop: disabled | description: disabled", }, }, "setter": "BoolSetter", "supportVariable": false, "description": "禁用", }, ] }, ], "supports": { "style": true }, "component": {} } }; const snippets: IPublicTypeSnippet[] = [ { "title": "单选框组", "screenshot": "https://alifd.oss-cn-hangzhou.aliyuncs.com/fusion-cool/icons/icon-light/ic_light_radio.png", "schema": { "componentName": "OadpRadioGroup", "props": { "disabled": false, "defaultValue": "1", "dataSource": [ { "label": "选项一", "value": "1" }, { "label": "选项二", "value": "2" } ], "size": "medium", "shape": "normal", "direction": "hoz" }, } } ]; export default { ...OadpRadioGroupMeta, snippets };