import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types'; const RadioMeta: IPublicTypeComponentMetadata = { componentName: 'Radio', title: 'Radio', group: '原子组件', category: '单选类', docUrl: '', screenshot: '', devMode: 'proCode', npm: { package: 'yl-ssa-lowcode-antd-comps', version: '0.1.32', exportName: 'Radio', main: 'src\\index.tsx', destructuring: true, subName: '', }, props: [ { name: 'children', title: { label: '内容', tip: '内容' }, propType: 'string', setter: 'StringSetter', supportVariable: true, }, { name: 'autoFocus', title: { label: '自动聚焦', tip: '自动获取焦点' }, propType: 'bool', defaultValue: false, setter: 'BoolSetter', supportVariable: true, }, { name: 'defaultChecked', title: { label: '默认选中', tip: '初始是否选中' }, propType: 'bool', defaultValue: false, setter: 'BoolSetter', supportVariable: true, }, { name: 'checked', title: { label: '是否选中', tip: '指定当前是否选中' }, propType: 'bool', defaultValue: false, setter: 'BoolSetter', supportVariable: true, }, { name: 'disabled', title: { label: '是否禁用', tip: '是否为禁用状态' }, propType: 'bool', defaultValue: false, setter: 'BoolSetter', supportVariable: true, }, // { // name: 'value', // title: { // label: '根据值判断', // tip: '根据 value 进行比较,判断是否选中', // }, // propType: 'string', // }, ], configure: { supports: { style: true } }, }; const snippets: IPublicTypeSnippet[] = [ { title: '单选框', screenshot: require('./__screenshots__/radio.png'), schema: { componentName: 'Radio', props: { children: 'Radio', }, }, }, { title: '单选框组', screenshot: require('./__screenshots__/radio-grop.png'), schema: { componentName: 'Radio.Group', props: { options: [ { label: 'A', value: 'A', }, { label: 'B', value: 'B', }, { label: 'C', value: 'C', }, ], }, }, }, ]; export default { ...RadioMeta, snippets, };