@borurio-print/print-designer 1.0.29 → 1.0.30
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 +1 -1
- package/dist-lib/PrintDesigner.vue.d.ts +20 -2
- package/dist-lib/{canvasPdfGenerator-Bf9bdKit.js → canvasPdfGenerator-CRCbiKtP.js} +2 -2
- package/dist-lib/components/BpdButton.vue.d.ts +1 -1
- package/dist-lib/components/BpdDialog.vue.d.ts +1 -1
- package/dist-lib/core/types.d.ts +12 -1
- package/dist-lib/{index-DbutHW7U.js → index-SdN_1rry.js} +4006 -3944
- package/dist-lib/index.d.ts +6 -1
- package/dist-lib/{index.es-Bvb0KVUH.js → index.es-CBHrCdZT.js} +2 -2
- package/dist-lib/index.js +1 -1
- package/dist-lib/style.css +1 -1
- package/dist-lib/views/print-designer/components/ComponentPanel.vue.d.ts +1 -0
- package/dist-lib/views/print-designer/components/TemplateInfoDialog.vue.d.ts +14 -1
- package/dist-lib/views/print-designer/components/TemplateInfoPanel.vue.d.ts +17 -1
- package/dist-lib/views/print-designer/components/properties/TableConfigProperty.vue.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -209,7 +209,7 @@ const fieldGroups: BusinessFieldGroup[] = [
|
|
|
209
209
|
- 从业务字段添加的页码在没有显式页码字段值时,自动显示当前业务记录内部的 `1/N`;基础组件中的页码仍显示整个打印任务的全局页码。
|
|
210
210
|
|
|
211
211
|
调用时一条原始面单对应一条根记录:
|
|
212
|
-
|
|
212
|
+
办事处里面其他动物的元素应该替换成猫咪的元素,然后办事处这个场景图是否应该把这两个人物放上去,因为后续他们可能是各种各样的姿态出现的,有可能趴在桌子上睡觉,有可能两个人在说悄悄话
|
|
213
213
|
```ts
|
|
214
214
|
const requestId = crypto.randomUUID()
|
|
215
215
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BusinessFieldGroup, PrintRequest, PrintResult, PrintTemplate, PrintDesignerTheme } from '@/core/types';
|
|
1
|
+
import type { BusinessFieldGroup, PrintRequest, PrintResult, PrintTemplate, PrintDesignerTheme, TemplateInfo } from '@/core/types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/**
|
|
4
4
|
* 由业务系统提供的可打印字段目录。
|
|
@@ -7,6 +7,8 @@ type __VLS_Props = {
|
|
|
7
7
|
fieldGroups?: readonly BusinessFieldGroup[];
|
|
8
8
|
/** 当前设计器实例使用的主色主题。 */
|
|
9
9
|
theme?: PrintDesignerTheme;
|
|
10
|
+
allowCustomTable?: boolean;
|
|
11
|
+
beforeTemplateInfoConfirm?: () => boolean | Promise<boolean>;
|
|
10
12
|
};
|
|
11
13
|
declare function getTemplate(): PrintTemplate;
|
|
12
14
|
declare function loadTemplate(template: PrintTemplate): void;
|
|
@@ -14,17 +16,33 @@ declare function loadTemplate(template: PrintTemplate): void;
|
|
|
14
16
|
declare function generatePdf(request: PrintRequest): Promise<void>;
|
|
15
17
|
/** 供业务系统打开 PDF 预览,结果统一通过 print-result 事件通知。 */
|
|
16
18
|
declare function previewPdf(request: PrintRequest): Promise<void>;
|
|
17
|
-
declare
|
|
19
|
+
declare var __VLS_13: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
'template-info-extra'?: (props: typeof __VLS_13) => any;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
18
24
|
getTemplate: typeof getTemplate;
|
|
19
25
|
loadTemplate: typeof loadTemplate;
|
|
20
26
|
generatePdf: typeof generatePdf;
|
|
21
27
|
previewPdf: typeof previewPdf;
|
|
28
|
+
openTemplateInfo: () => void | undefined;
|
|
22
29
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
30
|
"print-result": (result: PrintResult) => any;
|
|
31
|
+
"template-info-open": (value: TemplateInfo) => any;
|
|
32
|
+
"template-info-confirm": (value: TemplateInfo) => any;
|
|
24
33
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
34
|
"onPrint-result"?: (result: PrintResult) => any;
|
|
35
|
+
"onTemplate-info-open"?: (value: TemplateInfo) => any;
|
|
36
|
+
"onTemplate-info-confirm"?: (value: TemplateInfo) => any;
|
|
26
37
|
}>, {
|
|
27
38
|
fieldGroups: readonly BusinessFieldGroup[];
|
|
39
|
+
allowCustomTable: boolean;
|
|
28
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
42
|
declare const _default: typeof __VLS_export;
|
|
30
43
|
export default _default;
|
|
44
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as Mc, a as Ic, f as Bs, g as Rs, r as Ec, b as Cc, c as zu, d as Fc, e as jc, h as Oc, J as Bc, Q as Rc, l as Tc, j as Dc, k as nf, T as qc, m as Uc, n as zc } from "./index-
|
|
1
|
+
import { i as Mc, a as Ic, f as Bs, g as Rs, r as Ec, b as Cc, c as zu, d as Fc, e as jc, h as Oc, J as Bc, Q as Rc, l as Tc, j as Dc, k as nf, T as qc, m as Uc, n as zc } from "./index-SdN_1rry.js";
|
|
2
2
|
function xe(r) {
|
|
3
3
|
"@babel/helpers - typeof";
|
|
4
4
|
return xe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
@@ -8800,7 +8800,7 @@ endobj\r
|
|
|
8800
8800
|
var d = c.getContext("2d");
|
|
8801
8801
|
d.fillStyle = "#fff", d.fillRect(0, 0, c.width, c.height);
|
|
8802
8802
|
var g = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, x = this;
|
|
8803
|
-
return (Jt.canvg ? Promise.resolve(Jt.canvg) : import("./index.es-
|
|
8803
|
+
return (Jt.canvg ? Promise.resolve(Jt.canvg) : import("./index.es-CBHrCdZT.js")).catch(function(N) {
|
|
8804
8804
|
return Promise.reject(new Error("Could not load canvg: " + N));
|
|
8805
8805
|
}).then(function(N) {
|
|
8806
8806
|
return N.default ? N.default : N;
|
|
@@ -11,8 +11,8 @@ type __VLS_Slots = {} & {
|
|
|
11
11
|
default?: (props: typeof __VLS_1) => any;
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
-
link: boolean;
|
|
15
14
|
type: "primary" | "danger" | "default" | string;
|
|
15
|
+
link: boolean;
|
|
16
16
|
loading: boolean;
|
|
17
17
|
plain: boolean;
|
|
18
18
|
disabled: boolean;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
22
22
|
"onUpdate:modelValue"?: (value: boolean) => any;
|
|
23
23
|
onOpen?: () => any;
|
|
24
24
|
}>, {
|
|
25
|
-
width: string | number;
|
|
26
25
|
title: string;
|
|
26
|
+
width: string | number;
|
|
27
27
|
modalClass: string;
|
|
28
28
|
closeOnClickModal: boolean;
|
|
29
29
|
closeOnPressEscape: boolean;
|
package/dist-lib/core/types.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ export interface PrintResult {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
/** 业务字段允许在标签中使用的初始展示方式。 */
|
|
75
|
-
export type FieldElementType = 'text' | 'textBox' | 'qrcode' | 'barcode' | 'pageNumber' | 'pdf';
|
|
75
|
+
export type FieldElementType = 'text' | 'textBox' | 'qrcode' | 'barcode' | 'pageNumber' | 'pdf' | 'table';
|
|
76
76
|
/**
|
|
77
77
|
* 由业务系统传给设计器的字段定义。
|
|
78
78
|
*
|
|
@@ -87,6 +87,15 @@ export interface BusinessField {
|
|
|
87
87
|
currentPageField?: string;
|
|
88
88
|
/** type 为 pageNumber 时,从当前业务记录读取总页数的字段路径。 */
|
|
89
89
|
totalPageField?: string;
|
|
90
|
+
/** 表格字段在添加时复制此配置,此后与预设相互独立。 */
|
|
91
|
+
tableConfig?: BusinessTablePreset;
|
|
92
|
+
}
|
|
93
|
+
export interface BusinessTablePreset {
|
|
94
|
+
mode?: TableMode;
|
|
95
|
+
groupField?: string;
|
|
96
|
+
detailField?: string;
|
|
97
|
+
columns: readonly (Partial<TableColumn> & Pick<TableColumn, 'type' | 'title'>)[];
|
|
98
|
+
groupHeaderCells?: readonly Partial<TableGroupHeaderCell>[];
|
|
90
99
|
}
|
|
91
100
|
/** 左侧字段列表的分组;不同业务系统可以传入完全不同的分组和字段。 */
|
|
92
101
|
export interface BusinessFieldGroup {
|
|
@@ -304,6 +313,8 @@ export interface TableConfigValue {
|
|
|
304
313
|
/** 表格作为单个元素拖动和缩放,内部列配置由右侧属性面板维护。 */
|
|
305
314
|
export interface TableDesignerElement extends BaseDesignerElement {
|
|
306
315
|
type: 'table';
|
|
316
|
+
/** 业务预设表格锁定字段映射及列结构。 */
|
|
317
|
+
bindingLocked?: boolean;
|
|
307
318
|
mode: TableMode;
|
|
308
319
|
/** 打印控件后续从业务数据中读取表格数组的字段路径。 */
|
|
309
320
|
field?: string;
|