import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types'; import printer from './printer.svg'; const PrintButtonMeta: IPublicTypeComponentMetadata = { "componentName": "PrintButton", "title": "打印", "group": "精选组件", "category": "基础元素", "docUrl": "", "screenshot": "", "devMode": "proCode", "npm": { "package": "lowcode-edit-pro-table", "version": "{{version}}", "exportName": "PrintButton", "main": "src/index.tsx", "destructuring": true, "subName": "" }, "configure": { "props": [ // { // "title": { // "label": { // "type": "i18n", // "en-US": "Print ID", // "zh-CN": "打印编号" // }, // "tip": "printId | 打印编号" // }, // "name": "printId", // "setter": { // "componentName": "StringSetter", // "isRequired": false, // "initialValue": "" // } // }, { "title": { "label": { "type": "i18n", "en-US": "Button Text", "zh-CN": "文字" }, "tip": "Text | 文字" }, "name": "text", "setter": { "componentName": "StringSetter", "isRequired": false, "initialValue": "打印" } }, { "title": { "label": { "type": "i18n", "en-US": "Button Type", "zh-CN": "类型" }, "tip": "type | 类型" }, "name": "type", "description": "类型", "setter": { "componentName": "RadioGroupSetter", "props": { "dataSource": [ { "label": "primary", "value": "primary" }, { "label": "secondary", "value": "secondary" }, { "label": "normal", "value": "normal" } ], "options": [ { "label": "primary", "value": "primary" }, { "label": "secondary", "value": "secondary" }, { "label": "normal", "value": "normal" } ] }, "initialValue": "primary" } }, { "title": { "label": { "type": "i18n", "en-US": "Button Size", "zh-CN": "大小" }, "tip": "size | 大小" }, "name": "size", "description": "大小", "setter": { "componentName": "RadioGroupSetter", "props": { "dataSource": [ { "label": "small", "value": "small" }, { "label": "medium", "value": "medium" }, { "label": "large", "value": "large" } ], "options": [ { "label": "small", "value": "small" }, { "label": "medium", "value": "medium" }, { "label": "large", "value": "large" } ] }, "initialValue": "medium" } }, ], "supports": { "style": true }, "component": {} } }; const snippets: IPublicTypeSnippet[] = [ { "title": "打印", "screenshot": printer, "schema": { "componentName": "PrintButton", "props": {} } } ]; export default { ...PrintButtonMeta, snippets };