import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types'; const LinkMeta: IPublicTypeComponentMetadata = { componentName: 'Link', title: 'Link', group: '原子组件', category: '按钮类', docUrl: '', screenshot: '', devMode: 'proCode', npm: { package: 'yl-ssa-lowcode-antd-comps', version: '0.1.5', exportName: 'Link', main: 'src\\index.tsx', destructuring: true, subName: '', }, configure: { props: [ { name: 'href', title: { label: { type: 'i18n', zh_CN: '超链接', en_US: 'Link', }, tip: { type: 'i18n', zh_CN: '属性:href | 说明:超链接地址', en_US: 'prop: href | description: link address', }, }, setter: 'StringSetter', defaultValue: 'https://fusion.design', }, { name: 'title', title: { label: { type: 'i18n', zh_CN: '链接文案', en_US: 'Text', }, tip: { type: 'i18n', zh_CN: '属性:title | 说明:超链接文案', en_US: 'prop: title | description: text of the link', }, }, setter: 'StringSetter', defaultValue: '这是一个超链接', }, { name: 'target', title: { label: { type: 'i18n', zh_CN: '页面目标', en_US: 'Target', }, tip: { type: 'i18n', zh_CN: '属性:target | 说明:跳转页面目标', en_US: 'prop: target | description: target of new page', }, }, setter: [ { componentName: 'RadioGroupSetter', props: { options: [ { title: '当前', value: '_blank', }, { title: '新开页面', value: '_self', }, ], }, }, 'VariableSetter', ], defaultValue: '_blank', }, { name: 'icon', title: { label: '图标', tip: 'icon | 设置按钮的图标组件' }, propType: 'node', setter: { componentName: 'SlotSetter', initialValue: { type: 'JSSlot', value: [ { componentName: 'Icon', props: { type: 'SmileOutlined', size: 20, rotate: 0, spin: false, }, }, ], }, }, }, ], supports: { style: true, }, component: {}, }, }; const snippets: IPublicTypeSnippet[] = [ { title: 'Link', screenshot: require('./__screenshots__/link.png'), schema: { componentName: 'Link', props: {}, children: [ { componentName: 'Icon', props: { type: 'SearchOutlined', }, }, ], }, }, ]; export default { ...LinkMeta, snippets, };