@guodun/antdv 1.4.7 → 1.5.1
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/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +315 -286
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +316 -285
- package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.vue.mjs +62 -54
- package/dist/es/components/contract-signing-location/style/index.css +1 -1
- package/dist/es/components/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractPrintIframe.mjs +7 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractPrintIframe.vue.mjs +129 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractPrintIframe.vue_vue_type_style_index_0_scoped_a9912ff0_lang.css +1 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.mjs +10 -5
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +64 -43
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.mjs +82 -53
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +271 -265
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +762 -751
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +217 -197
- package/dist/es/components/pro-contract-template-designer/src/constants.mjs +29 -51
- package/dist/es/components/pro-contract-template-designer/src/extensions/template-variable.mjs +103 -103
- package/dist/es/components/pro-contract-template-designer/src/extensions/word-paste.mjs +24 -21
- package/dist/es/components/pro-contract-template-designer/src/utils/contract-print-document.mjs +314 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/page-decorations.mjs +1 -1
- package/dist/es/components/pro-contract-template-designer/src/utils/template-variable-render.mjs +47 -47
- package/dist/es/components/pro-contract-template-designer/src/utils/word-paste.mjs +216 -148
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/index.mjs +27 -26
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/ContractSigningTemplatePage.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/style/index.css +1 -1
- package/dist/lib/components/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractPrintIframe.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractPrintIframe.vue.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractPrintIframe.vue_vue_type_style_index_0_scoped_a9912ff0_lang.css +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/constants.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/template-variable.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/word-paste.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/contract-print-document.cjs +211 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/page-decorations.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-variable-render.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/word-paste.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/theme/contract-signing-location.css +1 -1
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +7 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +4 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningTemplatePage.vue.d.ts +9 -3
- package/dist/types/components/contract-signing-location/src/types.d.ts +5 -0
- package/dist/types/components/pro-contract-template-designer/index.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractPrintIframe.vue.d.ts +35 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.d.ts +2 -2
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewModal.vue.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.d.ts +13 -1
- package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +6 -0
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/constants.d.ts +4 -4
- package/dist/types/components/pro-contract-template-designer/src/extensions/word-paste.d.ts +8 -0
- package/dist/types/components/pro-contract-template-designer/src/types.d.ts +10 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/contract-print-document.d.ts +119 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/word-paste.d.ts +2 -0
- package/package.json +2 -1
package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import a from "./
|
|
3
|
-
import { resolvePageSize as
|
|
4
|
-
import
|
|
5
|
-
import { computed as
|
|
1
|
+
import e from "./ContractPrintIframe.mjs";
|
|
2
|
+
import { CONTRACT_PAGE_BASE_PADDING as t, buildPageDecorationClassNames as n, buildPageDecorationsHtml as r, getPageDecorationSafePadding as i, hasEnabledPageFooter as a, hasEnabledPageHeader as o, normalizePageDecorations as s } from "./utils/page-decorations.mjs";
|
|
3
|
+
import { resolvePageSize as c } from "./composables/use-template-designer.mjs";
|
|
4
|
+
import l from "./ContractTemplatePreviewSigningLayer.mjs";
|
|
5
|
+
import { computed as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createVNode as m, defineComponent as h, normalizeStyle as g, openBlock as _, shallowRef as v, toDisplayString as y } from "vue";
|
|
6
6
|
//#region src/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var b = { class: "gd-contract-template-designer__preview-page-shell" }, x = [
|
|
8
8
|
"data-page-id",
|
|
9
9
|
"data-page-format",
|
|
10
10
|
"data-page-label",
|
|
11
11
|
"data-page-width",
|
|
12
12
|
"data-page-height"
|
|
13
|
-
],
|
|
13
|
+
], S = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "gd-contract-template-designer__preview-font-error",
|
|
16
|
+
role: "alert"
|
|
17
|
+
}, C = /* @__PURE__ */ h({
|
|
14
18
|
name: "ContractTemplatePreviewPage",
|
|
15
19
|
__name: "ContractTemplatePreviewPage",
|
|
16
20
|
props: {
|
|
@@ -21,48 +25,65 @@ var h = { class: "gd-contract-template-designer__preview-page-shell" }, g = [
|
|
|
21
25
|
pageDecorations: {},
|
|
22
26
|
pageNumber: {},
|
|
23
27
|
totalPages: {},
|
|
24
|
-
variables: {}
|
|
28
|
+
variables: {},
|
|
29
|
+
fontBaseUrl: {}
|
|
25
30
|
},
|
|
26
|
-
setup(
|
|
27
|
-
let
|
|
28
|
-
let
|
|
31
|
+
setup(h) {
|
|
32
|
+
let C = h, w = u(() => c(C.page.pageSize, C.fallbackPageSize)), T = u(() => {
|
|
33
|
+
let e = s(C.pageDecorations);
|
|
29
34
|
return {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
paddingTop: `${r(a, v.pageNumber) ? t(a.header) : e.top}px`,
|
|
33
|
-
paddingBottom: `${n(a, v.pageNumber) ? t(a.footer) : e.bottom}px`
|
|
35
|
+
top: o(e, C.pageNumber) ? i(e.header) : t.top,
|
|
36
|
+
bottom: a(e, C.pageNumber) ? i(e.footer) : t.bottom
|
|
34
37
|
};
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
}), E = u(() => ({
|
|
39
|
+
width: `${w.value.width}px`,
|
|
40
|
+
height: `${w.value.height}px`
|
|
41
|
+
})), D = u(() => n(C.pageDecorations, C.pageNumber)), O = u(() => r(C.pageDecorations, C.pageNumber, C.totalPages, C.variables)), k = v("");
|
|
42
|
+
function A(e, t) {
|
|
43
|
+
k.value = e === "error" ? t || "合同排版度量校验失败" : "";
|
|
44
|
+
}
|
|
45
|
+
return (t, n) => (_(), f("article", b, [p("section", {
|
|
46
|
+
class: "gd-contract-template-designer__preview-page",
|
|
47
|
+
"data-page-id": h.page.id,
|
|
48
|
+
"data-page-format": w.value.format ?? "Custom",
|
|
49
|
+
"data-page-label": w.value.label ?? w.value.format ?? "自定义",
|
|
50
|
+
"data-page-width": w.value.width,
|
|
51
|
+
"data-page-height": w.value.height,
|
|
52
|
+
style: g(E.value)
|
|
44
53
|
}, [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"page-
|
|
48
|
-
|
|
49
|
-
|
|
54
|
+
m(e, {
|
|
55
|
+
"page-id": h.page.id,
|
|
56
|
+
"page-format": w.value.format,
|
|
57
|
+
width: w.value.width,
|
|
58
|
+
height: w.value.height,
|
|
59
|
+
"padding-top": T.value.top,
|
|
60
|
+
"padding-bottom": T.value.bottom,
|
|
61
|
+
"class-names": D.value,
|
|
62
|
+
"decorations-html": O.value,
|
|
63
|
+
"content-html": h.contentHtml,
|
|
64
|
+
"font-base-url": h.fontBaseUrl,
|
|
65
|
+
title: `第 ${h.pageNumber} 页合同预览`,
|
|
66
|
+
onStatus: A
|
|
50
67
|
}, null, 8, [
|
|
51
|
-
"
|
|
52
|
-
"page-
|
|
53
|
-
"
|
|
54
|
-
"
|
|
68
|
+
"page-id",
|
|
69
|
+
"page-format",
|
|
70
|
+
"width",
|
|
71
|
+
"height",
|
|
72
|
+
"padding-top",
|
|
73
|
+
"padding-bottom",
|
|
74
|
+
"class-names",
|
|
75
|
+
"decorations-html",
|
|
76
|
+
"content-html",
|
|
77
|
+
"font-base-url",
|
|
78
|
+
"title"
|
|
55
79
|
]),
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, null, 8,
|
|
60
|
-
d(
|
|
61
|
-
|
|
62
|
-
placements: f.signingPlacements
|
|
63
|
-
}, null, 8, ["page-size", "placements"])
|
|
64
|
-
], 12, g)]));
|
|
80
|
+
m(l, {
|
|
81
|
+
"page-size": w.value,
|
|
82
|
+
placements: h.signingPlacements
|
|
83
|
+
}, null, 8, ["page-size", "placements"]),
|
|
84
|
+
k.value ? (_(), f("div", S, y(k.value), 1)) : d("", !0)
|
|
85
|
+
], 12, x)]));
|
|
65
86
|
}
|
|
66
87
|
});
|
|
67
88
|
//#endregion
|
|
68
|
-
export {
|
|
89
|
+
export { C as default };
|
package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.mjs
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import a from "./
|
|
3
|
-
import { computed as
|
|
1
|
+
import e from "./ContractPrintIframe.mjs";
|
|
2
|
+
import { CONTRACT_PAGE_BASE_PADDING as t, buildPageDecorationClassNames as n, buildPageDecorationsHtml as r, getPageDecorationSafePadding as i, hasEnabledPageFooter as a, hasEnabledPageHeader as o, normalizePageDecorations as s } from "./utils/page-decorations.mjs";
|
|
3
|
+
import { computed as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createVNode as f, defineComponent as p, normalizeStyle as m, openBlock as h, shallowRef as g, toDisplayString as _ } from "vue";
|
|
4
4
|
//#region src/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var v = ["data-render-page-id"], y = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "gd-contract-template-renderer__page-meta"
|
|
8
|
-
},
|
|
8
|
+
}, b = [
|
|
9
9
|
"data-page-id",
|
|
10
10
|
"data-page-format",
|
|
11
11
|
"data-page-width",
|
|
12
12
|
"data-page-height"
|
|
13
|
-
],
|
|
13
|
+
], x = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "gd-contract-template-renderer__font-error",
|
|
16
|
+
role: "alert"
|
|
17
|
+
}, S = /* @__PURE__ */ p({
|
|
14
18
|
name: "ContractTemplateRendererPage",
|
|
15
19
|
__name: "ContractTemplateRendererPage",
|
|
16
20
|
props: {
|
|
@@ -18,59 +22,84 @@ var _ = ["data-render-page-id"], v = {
|
|
|
18
22
|
index: {},
|
|
19
23
|
total: {},
|
|
20
24
|
zoom: {},
|
|
21
|
-
showMeta: { type: Boolean }
|
|
25
|
+
showMeta: { type: Boolean },
|
|
26
|
+
fontBaseUrl: {},
|
|
27
|
+
activeKey: {},
|
|
28
|
+
scrollRequest: {}
|
|
22
29
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
emits: [
|
|
31
|
+
"status",
|
|
32
|
+
"metrics",
|
|
33
|
+
"interaction"
|
|
34
|
+
],
|
|
35
|
+
setup(p, { emit: S }) {
|
|
36
|
+
let C = p, w = S, T = c(() => ({
|
|
37
|
+
width: `${C.page.width * C.zoom}px`,
|
|
38
|
+
height: `${C.page.height * C.zoom}px`
|
|
39
|
+
})), E = c(() => {
|
|
40
|
+
let e = s(C.page.pageDecorations);
|
|
29
41
|
return {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
paddingTop: `${r(a, x.index + 1) ? t(a.header) : e.top}px`,
|
|
33
|
-
paddingBottom: `${n(a, x.index + 1) ? t(a.footer) : e.bottom}px`,
|
|
34
|
-
transform: `scale(${x.zoom})`
|
|
42
|
+
top: o(e, C.index + 1) ? i(e.header) : t.top,
|
|
43
|
+
bottom: a(e, C.index + 1) ? i(e.footer) : t.bottom
|
|
35
44
|
};
|
|
36
|
-
})
|
|
37
|
-
|
|
45
|
+
}), D = c(() => ({
|
|
46
|
+
width: `${C.page.width}px`,
|
|
47
|
+
height: `${C.page.height}px`,
|
|
48
|
+
transform: `scale(${C.zoom})`
|
|
49
|
+
})), O = c(() => n(C.page.pageDecorations, C.index + 1)), k = c(() => r(C.page.pageDecorations, C.index + 1, C.total, C.page.decorationVariables, C.page.decorationValues)), A = g("");
|
|
50
|
+
function j(e, t) {
|
|
51
|
+
A.value = e === "error" ? t || "合同排版度量校验失败" : "", w("status", e, t);
|
|
52
|
+
}
|
|
53
|
+
return (t, n) => (h(), u("article", {
|
|
38
54
|
class: "gd-contract-template-renderer__page-shell",
|
|
39
|
-
"data-render-page-id":
|
|
40
|
-
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
])) :
|
|
55
|
+
"data-render-page-id": p.page.id
|
|
56
|
+
}, [p.showMeta ? (h(), u("header", y, [
|
|
57
|
+
d("strong", null, "第 " + _(p.index + 1) + " / " + _(p.total) + " 页", 1),
|
|
58
|
+
d("span", null, _(p.page.title), 1),
|
|
59
|
+
d("small", null, _(p.page.format) + " · " + _(p.page.width) + " × " + _(p.page.height) + " px", 1)
|
|
60
|
+
])) : l("", !0), d("div", {
|
|
45
61
|
class: "gd-contract-template-renderer__page-frame",
|
|
46
|
-
style:
|
|
47
|
-
}, [
|
|
48
|
-
class:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"data-page-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
style: m(T.value)
|
|
63
|
+
}, [d("div", {
|
|
64
|
+
class: "gd-contract-template-renderer__print-page",
|
|
65
|
+
"data-page-id": p.page.id,
|
|
66
|
+
"data-page-format": p.page.format,
|
|
67
|
+
"data-page-width": p.page.width,
|
|
68
|
+
"data-page-height": p.page.height,
|
|
69
|
+
style: m(D.value)
|
|
70
|
+
}, [f(e, {
|
|
71
|
+
"page-id": p.page.id,
|
|
72
|
+
"page-format": p.page.format,
|
|
73
|
+
width: p.page.width,
|
|
74
|
+
height: p.page.height,
|
|
75
|
+
"padding-top": E.value.top,
|
|
76
|
+
"padding-bottom": E.value.bottom,
|
|
77
|
+
"class-names": O.value,
|
|
78
|
+
"decorations-html": k.value,
|
|
79
|
+
"content-html": p.page.contentHtml,
|
|
80
|
+
"font-base-url": p.fontBaseUrl,
|
|
81
|
+
"active-key": p.activeKey,
|
|
82
|
+
"scroll-request": p.scrollRequest,
|
|
83
|
+
title: `第 ${p.index + 1} 页合同填写内容`,
|
|
84
|
+
onInteraction: n[0] ||= (e) => w("interaction", e),
|
|
85
|
+
onMetrics: n[1] ||= (e) => w("metrics", e),
|
|
86
|
+
onStatus: j
|
|
63
87
|
}, null, 8, [
|
|
64
|
-
"
|
|
65
|
-
"page-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
class
|
|
71
|
-
|
|
72
|
-
|
|
88
|
+
"page-id",
|
|
89
|
+
"page-format",
|
|
90
|
+
"width",
|
|
91
|
+
"height",
|
|
92
|
+
"padding-top",
|
|
93
|
+
"padding-bottom",
|
|
94
|
+
"class-names",
|
|
95
|
+
"decorations-html",
|
|
96
|
+
"content-html",
|
|
97
|
+
"font-base-url",
|
|
98
|
+
"active-key",
|
|
99
|
+
"scroll-request",
|
|
100
|
+
"title"
|
|
101
|
+
]), A.value ? (h(), u("div", x, _(A.value), 1)) : l("", !0)], 12, b)], 4)], 8, v));
|
|
73
102
|
}
|
|
74
103
|
});
|
|
75
104
|
//#endregion
|
|
76
|
-
export {
|
|
105
|
+
export { S as default };
|