vg-print 1.1.212 → 1.1.214

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -263,6 +263,10 @@ const onSaveDirect = () => designer.value?.save()
263
263
  - `showPdf: boolean` 是否显示“导出 PDF”按钮,默认 `true`
264
264
  - `showImg: boolean` 是否显示“导出图片”按钮,默认 `true`
265
265
  - `showPrint2: boolean` 是否显示“直接打印”按钮,默认 `true`
266
+ - `pdfOptions: object` 导出 PDF 选项(参考 `toPdf`)
267
+ - `imageOptions: object` 导出图片 选项(参考 `toImage`)
268
+ - `directPrintOptions: object` 直接打印 选项(参考 `print`)
269
+ - `browserPrintOptions: object` 浏览器打印 选项(参考 `printView`)
266
270
  - `showPrinterSelect: boolean` 是否显示“打印机选择”下拉区域,默认 `true`
267
271
  - `modalShow: boolean` 弹窗显隐(支持 `v-model:modalShow`)
268
272
  - `width: string | number` 弹窗宽度(默认 `'80%'`)
@@ -306,6 +310,10 @@ type PreviewShowOptions = {
306
310
  showPrint2?: boolean
307
311
  showPrinterSelect?: boolean
308
312
  showTitle?: boolean
313
+ pdfOptions?: object
314
+ imageOptions?: object
315
+ directPrintOptions?: object
316
+ browserPrintOptions?: object
309
317
  onClick?: (type: 'pdf' | 'img' | 'print' | 'print2' | 'close') => void
310
318
  onClose?: () => void
311
319
  onRender?: () => void
@@ -377,6 +385,29 @@ const openPreview = () => {
377
385
  showImg: false,
378
386
  showPrint2: false,
379
387
  showPrinterSelect: false,
388
+ pdfOptions: {
389
+ scale: 2,
390
+ paperWidth: 210,
391
+ paperHeight: 297,
392
+ perPage: 6
393
+ },
394
+ imageOptions: {
395
+ paperWidth: 210,
396
+ paperHeight: 297,
397
+ limit: 6,
398
+ isDownload: true,
399
+ name: 'A4排版',
400
+ type: 'image/jpeg',
401
+ pixelRatio: 2,
402
+ },
403
+ directPrintOptions: {
404
+ printer: printer.value,
405
+ title: '测试打印',
406
+ copies: 2
407
+ },
408
+ browserPrintOptions: {
409
+ applyPanelLayoutHtml: true
410
+ },
380
411
  onClick: (type) => {
381
412
  // 示例:点击导出 PDF 按钮
382
413
  if (type === 'pdf') {