import watermark from '../libs/plugins/watermark'; import {HlinePrintElementType, ImagePrintElementType, PrintElementTypes, TextPrintElementType, VlinePrintElementType, RectPrintElementType, OvalPrintElementType, TablePrintElementType, LongTextPrintElementType, BarcodePrintElementType, QRCodePrintElementType, HTMLPrintElementType} from '../types'; export default { text: { printElementType: { title: '文本', type: PrintElementTypes.TEXT, }, options: { textType: 'text', title: '文本', }, } as TextPrintElementType, textVal: { printElementType: { title: '值(文本)', type: PrintElementTypes.TEXT, }, options: { textType: 'text', title: '值(文本)', }, } as TextPrintElementType, ImageElement: { printElementType: { title: '图片', type: PrintElementTypes.IMAGE, }, options: { title: '图片', }, } as ImagePrintElementType, HlineElement: { printElementType: { title: '横线', type: PrintElementTypes.HLINE, }, options: { title: '横线', }, } as HlinePrintElementType, VlineElement: { printElementType: { title: '竖线', type: PrintElementTypes.VLINE, }, options: { title: '竖线', }, } as VlinePrintElementType, ReactElement: { printElementType: { title: '矩形', type: PrintElementTypes.RECT, }, options: { title: '矩形', }, } as RectPrintElementType, OvalElement: { printElementType: { title: '圆形', type: PrintElementTypes.OVAL, }, options: { title: '圆形', }, } as OvalPrintElementType, TableElement: { printElementType: { title: '表格', type: PrintElementTypes.TABLE, columns: [ [ { title: '列1', width: 100, rowspan: 1, colspan: 1, }, { title: '列2', width: 100, rowspan: 1, colspan: 1, }, ], ], }, options: { title: '表格', }, } as TablePrintElementType, emptyTableElement: { printElementType: { title: '空白表格', type: PrintElementTypes.TABLE, columns: [], }, options: { title: '空白表格', }, } as TablePrintElementType, LongTextElement: { printElementType: { title: '长文本', type: PrintElementTypes.LONGTEXT, }, options: { title: '长文本', }, } as LongTextPrintElementType, HTMLElement: { printElementType: { title: 'HTML', type: PrintElementTypes.HTML, }, options: { title: 'HTML', }, } as HTMLPrintElementType, QRCodeElement: { printElementType: { title: '二维码', type: PrintElementTypes.TEXT, }, options: { title: '二维码', textType: 'qrcode', }, } as QRCodePrintElementType, barcode: { printElementType: { title: '条形码', type: PrintElementTypes.TEXT, }, options: { title: '条形码', textType: 'barcode', }, } as BarcodePrintElementType, panel: { index: 0, name: 1, height: 297, width: 210, paperHeader: 7.5, paperFooter: 780, paperNumberLeft: 565, paperNumberTop: 45, paperNumberContinue: false, paperNumberFormat: '1', panelPaperRule: 'odd', panelPageRule: 'none', firstPaperFooter: 1, evenPaperFooter: 1, oddPaperFooter: 1, lastPaperFooter: 1, topOffset: 1, fontFamily: 'Microsoft YaHei', leftOffset: 1, orient: 1, }, watermark: { content: '阿恃多伐底', rotate: 25, timestamp: true, format: 'YYYY-MM-DD HH:mm', fillStyle: 'rgba(184, 184, 184, 0.3)', fontSize: '14px', width: 200, height: 200, }, };