@guodun/antdv 1.4.2 → 1.4.4
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/ContractSigningLocationCanvas.vue.mjs +304 -293
- package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.vue.mjs +66 -13
- package/dist/es/components/contract-signing-location/src/constants.mjs +27 -17
- package/dist/es/components/contract-signing-location/src/coordinates.mjs +23 -23
- package/dist/es/components/contract-signing-location/src/location-rules.mjs +20 -10
- package/dist/es/components/contract-signing-location/src/page-layout.mjs +12 -9
- package/dist/es/components/contract-signing-location/src/template-source.mjs +52 -34
- package/dist/es/components/contract-signing-location/style/index.css +1 -1
- package/dist/es/components/index.mjs +1 -1
- package/dist/es/components/pro-contract-template-designer/index.mjs +1 -1
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +186 -148
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +4 -4
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.mjs +5 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.mjs +179 -0
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +149 -126
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1229 -1059
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +34 -34
- package/dist/es/components/pro-contract-template-designer/src/utils/page-decorations.mjs +17 -17
- package/dist/es/components/pro-contract-template-designer/src/utils/signing-placement.mjs +14 -14
- package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +89 -89
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/index.mjs +25 -25
- 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/src/constants.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/coordinates.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/location-rules.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/page-layout.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/template-source.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/ContractTemplateDesignerWorkspaceHeader.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/ContractTemplateTextBubbleMenu.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.cjs +1 -0
- 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/composables/use-template-designer.cjs +3 -3
- 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/signing-placement.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.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/ContractSigningTemplatePage.vue.d.ts +3 -1
- package/dist/types/components/contract-signing-location/src/constants.d.ts +18 -0
- package/dist/types/components/contract-signing-location/src/coordinates.d.ts +8 -2
- package/dist/types/components/contract-signing-location/src/page-layout.d.ts +2 -2
- package/dist/types/components/contract-signing-location/src/template-source.d.ts +19 -0
- package/dist/types/components/contract-signing-location/src/types.d.ts +3 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +10 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.d.ts +43 -0
- package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +22 -0
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +90 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/context-menu-viewport.d.ts +3 -0
- package/package.json +5 -3
|
@@ -53,11 +53,11 @@ import "./pro-selector-group/index.mjs";
|
|
|
53
53
|
import "./pro-dynamic-tags/index.mjs";
|
|
54
54
|
import "./pro-drawer/src/types.mjs";
|
|
55
55
|
import "./pro-drawer/index.mjs";
|
|
56
|
+
import "./pro-contract-template-designer/src/constants.mjs";
|
|
56
57
|
import "./contract-signing-location/src/constants.mjs";
|
|
57
58
|
import "./contract-signing-location/src/coordinates.mjs";
|
|
58
59
|
import "./pro-contract-template-designer/src/types.mjs";
|
|
59
60
|
import "./pro-contract-template-designer/src/utils/signing-placement.mjs";
|
|
60
|
-
import "./pro-contract-template-designer/src/constants.mjs";
|
|
61
61
|
import "./pro-contract-template-designer/src/composables/use-template-designer.mjs";
|
|
62
62
|
import "./pro-contract-template-designer/src/utils/image-url.mjs";
|
|
63
63
|
import "./pro-contract-template-designer/src/utils/template-renderer.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { withInstall as e } from "../utils/install.mjs";
|
|
2
|
+
import "./src/constants.mjs";
|
|
2
3
|
import "../contract-signing-location/src/constants.mjs";
|
|
3
4
|
import "./src/types.mjs";
|
|
4
5
|
import "./src/utils/signing-placement.mjs";
|
|
5
|
-
import "./src/constants.mjs";
|
|
6
6
|
import "./src/composables/use-template-designer.mjs";
|
|
7
7
|
import "./src/utils/image-url.mjs";
|
|
8
8
|
import "./src/utils/template-renderer.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, ref as l, toDisplayString as u, unref as d, withCtx as f } from "vue";
|
|
2
2
|
import { Button as p, Tooltip as m } from "ant-design-vue";
|
|
3
|
-
import { AuditOutlined as h, BgColorsOutlined as g, ColumnWidthOutlined as _, DatabaseOutlined as v, DeleteOutlined as y, EyeOutlined as b,
|
|
3
|
+
import { AuditOutlined as h, BgColorsOutlined as g, ColumnWidthOutlined as _, DatabaseOutlined as v, DeleteOutlined as y, EyeOutlined as b, FormOutlined as x, FullscreenExitOutlined as S, FullscreenOutlined as C, ReloadOutlined as w, UpOutlined as T, ZoomInOutlined as E, ZoomOutOutlined as D } from "@ant-design/icons-vue";
|
|
4
4
|
//#region src/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var O = { class: "gd-contract-template-designer__workspace-meta" }, k = { class: "gd-contract-template-designer__workspace-actions" }, A = { class: "gd-contract-template-designer__workspace-controls" }, j = { class: "gd-contract-template-designer__zoom" }, M = { class: "gd-contract-template-designer__workspace-buttons" }, N = { class: "gd-contract-template-designer__page-decorations-trigger-copy" }, P = /* @__PURE__ */ o({
|
|
6
6
|
__name: "ContractTemplateDesignerWorkspaceHeader",
|
|
7
7
|
props: {
|
|
8
8
|
summary: {},
|
|
@@ -16,11 +16,13 @@ var E = { class: "gd-contract-template-designer__workspace-meta" }, D = { class:
|
|
|
16
16
|
zoomOutDisabled: { type: Boolean },
|
|
17
17
|
zoomInDisabled: { type: Boolean },
|
|
18
18
|
isFullscreen: { type: Boolean },
|
|
19
|
+
immersive: { type: Boolean },
|
|
19
20
|
pageDecorationsOpen: { type: Boolean },
|
|
20
21
|
pageDecorationsStudioId: {},
|
|
21
22
|
pageDecorationsPresetLabel: {},
|
|
22
23
|
pageDecorationsEnabledCount: {},
|
|
23
|
-
pageDecorationsEnabledStates: {}
|
|
24
|
+
pageDecorationsEnabledStates: {},
|
|
25
|
+
chromeControlsId: {}
|
|
24
26
|
},
|
|
25
27
|
emits: [
|
|
26
28
|
"zoomOut",
|
|
@@ -28,188 +30,224 @@ var E = { class: "gd-contract-template-designer__workspace-meta" }, D = { class:
|
|
|
28
30
|
"fitWidth",
|
|
29
31
|
"resetZoom",
|
|
30
32
|
"toggleFullscreen",
|
|
33
|
+
"toggleImmersive",
|
|
31
34
|
"clear",
|
|
32
35
|
"validate",
|
|
33
36
|
"preview",
|
|
34
37
|
"submitData",
|
|
35
|
-
"togglePageDecorations"
|
|
38
|
+
"togglePageDecorations",
|
|
39
|
+
"toggleChrome"
|
|
36
40
|
],
|
|
37
|
-
setup(o, { expose:
|
|
38
|
-
let
|
|
41
|
+
setup(o, { expose: P, emit: F }) {
|
|
42
|
+
let I = o, L = F, R = l(), z = e(() => [
|
|
39
43
|
{
|
|
40
44
|
key: "header",
|
|
41
45
|
label: "页眉",
|
|
42
|
-
enabled:
|
|
46
|
+
enabled: I.pageDecorationsEnabledStates.header
|
|
43
47
|
},
|
|
44
48
|
{
|
|
45
49
|
key: "footer",
|
|
46
50
|
label: "页脚",
|
|
47
|
-
enabled:
|
|
51
|
+
enabled: I.pageDecorationsEnabledStates.footer
|
|
48
52
|
},
|
|
49
53
|
{
|
|
50
54
|
key: "watermark",
|
|
51
55
|
label: "水印",
|
|
52
|
-
enabled:
|
|
56
|
+
enabled: I.pageDecorationsEnabledStates.watermark
|
|
53
57
|
}
|
|
54
|
-
]),
|
|
55
|
-
return
|
|
58
|
+
]), B = e(() => `页面装饰 · ${I.pageDecorationsPresetLabel} · 启用 ${I.pageDecorationsEnabledCount}/3`), V = e(() => `页面装饰,${I.pageDecorationsPresetLabel},已启用 ${I.pageDecorationsEnabledCount}/3;${z.value.map((e) => `${e.label}${e.enabled ? "已启用" : "未启用"}`).join(",")}`);
|
|
59
|
+
return P({
|
|
60
|
+
focusPageDecorations: () => R.value?.querySelector(".gd-contract-template-designer__page-decorations-trigger")?.focus(),
|
|
61
|
+
focusImmersive: () => R.value?.querySelector(".gd-contract-template-designer__immersive-trigger")?.focus(),
|
|
62
|
+
focusChromeToggle: () => R.value?.querySelector(".gd-contract-template-designer__workspace-chrome-toggle")?.focus()
|
|
63
|
+
}), (e, l) => (c(), r("header", {
|
|
56
64
|
ref_key: "workspaceHeader",
|
|
57
|
-
ref:
|
|
65
|
+
ref: R,
|
|
58
66
|
class: "gd-contract-template-designer__workspace-header"
|
|
59
|
-
}, [i("div",
|
|
67
|
+
}, [i("div", O, [i("strong", null, u(o.summary), 1), o.showDraftCacheStatus && o.draftCacheStatusText ? (c(), r("small", {
|
|
60
68
|
key: 0,
|
|
61
69
|
class: s(["gd-contract-template-designer__draft-cache-status", o.draftCacheStatusClass])
|
|
62
|
-
}, u(o.draftCacheStatusText), 3)) : n("", !0)]), i("div",
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
}, u(o.draftCacheStatusText), 3)) : n("", !0)]), i("div", k, [
|
|
71
|
+
i("div", A, [i("div", j, [
|
|
72
|
+
a(d(m), { title: "缩小" }, {
|
|
73
|
+
default: f(() => [a(d(p), {
|
|
74
|
+
size: "small",
|
|
75
|
+
class: "gd-contract-template-designer__icon-button",
|
|
76
|
+
disabled: o.zoomOutDisabled,
|
|
77
|
+
"aria-label": "缩小",
|
|
78
|
+
onClick: l[0] ||= (e) => L("zoomOut")
|
|
79
|
+
}, {
|
|
80
|
+
default: f(() => [a(d(D), { "aria-hidden": "true" })]),
|
|
81
|
+
_: 1
|
|
82
|
+
}, 8, ["disabled"])]),
|
|
72
83
|
_: 1
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
}),
|
|
85
|
+
i("span", null, u(o.zoomPercent), 1),
|
|
86
|
+
a(d(m), { title: "放大" }, {
|
|
87
|
+
default: f(() => [a(d(p), {
|
|
88
|
+
size: "small",
|
|
89
|
+
class: "gd-contract-template-designer__icon-button",
|
|
90
|
+
disabled: o.zoomInDisabled,
|
|
91
|
+
"aria-label": "放大",
|
|
92
|
+
onClick: l[1] ||= (e) => L("zoomIn")
|
|
93
|
+
}, {
|
|
94
|
+
default: f(() => [a(d(E), { "aria-hidden": "true" })]),
|
|
95
|
+
_: 1
|
|
96
|
+
}, 8, ["disabled"])]),
|
|
86
97
|
_: 1
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
}),
|
|
99
|
+
a(d(m), { title: "适应宽度" }, {
|
|
100
|
+
default: f(() => [a(d(p), {
|
|
101
|
+
size: "small",
|
|
102
|
+
class: "gd-contract-template-designer__icon-button",
|
|
103
|
+
"aria-label": "适应宽度",
|
|
104
|
+
onClick: l[2] ||= (e) => L("fitWidth")
|
|
105
|
+
}, {
|
|
106
|
+
default: f(() => [a(d(_), { "aria-hidden": "true" })]),
|
|
107
|
+
_: 1
|
|
108
|
+
})]),
|
|
98
109
|
_: 1
|
|
99
|
-
})
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
}),
|
|
111
|
+
a(d(m), { title: "重置缩放" }, {
|
|
112
|
+
default: f(() => [a(d(p), {
|
|
113
|
+
size: "small",
|
|
114
|
+
class: "gd-contract-template-designer__icon-button",
|
|
115
|
+
"aria-label": "重置缩放",
|
|
116
|
+
onClick: l[3] ||= (e) => L("resetZoom")
|
|
117
|
+
}, {
|
|
118
|
+
default: f(() => [a(d(w), { "aria-hidden": "true" })]),
|
|
119
|
+
_: 1
|
|
120
|
+
})]),
|
|
110
121
|
_: 1
|
|
111
|
-
})
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
})
|
|
122
|
+
}),
|
|
123
|
+
a(d(m), { title: o.isFullscreen ? "退出全屏" : "全屏显示" }, {
|
|
124
|
+
default: f(() => [a(d(p), {
|
|
125
|
+
size: "small",
|
|
126
|
+
class: "gd-contract-template-designer__icon-button",
|
|
127
|
+
"aria-label": o.isFullscreen ? "退出全屏" : "全屏显示",
|
|
128
|
+
onClick: l[4] ||= (e) => L("toggleFullscreen")
|
|
129
|
+
}, {
|
|
130
|
+
default: f(() => [o.isFullscreen ? (c(), t(d(S), {
|
|
131
|
+
key: 0,
|
|
132
|
+
"aria-hidden": "true"
|
|
133
|
+
})) : (c(), t(d(C), {
|
|
134
|
+
key: 1,
|
|
135
|
+
"aria-hidden": "true"
|
|
136
|
+
}))]),
|
|
137
|
+
_: 1
|
|
138
|
+
}, 8, ["aria-label"])]),
|
|
128
139
|
_: 1
|
|
129
|
-
}, 8, ["
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
class
|
|
141
|
-
disabled: o.readonly,
|
|
142
|
-
"aria-label": "清空合同",
|
|
143
|
-
onClick: l[5] ||= (e) => F("clear")
|
|
144
|
-
}, {
|
|
145
|
-
default: f(() => [a(d(y), { "aria-hidden": "true" })]),
|
|
140
|
+
}, 8, ["title"]),
|
|
141
|
+
a(d(m), { title: "沉浸写作(只保留写作区)" }, {
|
|
142
|
+
default: f(() => [a(d(p), {
|
|
143
|
+
size: "small",
|
|
144
|
+
class: s(["gd-contract-template-designer__icon-button gd-contract-template-designer__immersive-trigger", { "is-selected": o.immersive }]),
|
|
145
|
+
"aria-pressed": o.immersive,
|
|
146
|
+
"aria-label": "沉浸写作",
|
|
147
|
+
onClick: l[5] ||= (e) => L("toggleImmersive")
|
|
148
|
+
}, {
|
|
149
|
+
default: f(() => [a(d(x), { "aria-hidden": "true" })]),
|
|
150
|
+
_: 1
|
|
151
|
+
}, 8, ["class", "aria-pressed"])]),
|
|
146
152
|
_: 1
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
class: s(["gd-contract-template-designer__page-decorations-trigger", { "is-selected": o.pageDecorationsOpen }]),
|
|
154
|
-
"aria-pressed": o.pageDecorationsOpen,
|
|
155
|
-
"aria-expanded": o.pageDecorationsOpen,
|
|
156
|
-
"aria-controls": o.pageDecorationsStudioId,
|
|
157
|
-
"aria-label": z.value,
|
|
158
|
-
onClick: l[6] ||= (e) => F("togglePageDecorations")
|
|
153
|
+
})
|
|
154
|
+
])]),
|
|
155
|
+
i("div", M, [
|
|
156
|
+
o.showClearButton ? (c(), t(d(m), {
|
|
157
|
+
key: 0,
|
|
158
|
+
title: "清空合同"
|
|
159
159
|
}, {
|
|
160
|
-
default: f(() => [a(d(
|
|
160
|
+
default: f(() => [a(d(p), {
|
|
161
|
+
size: "small",
|
|
162
|
+
danger: "",
|
|
163
|
+
class: "gd-contract-template-designer__icon-button",
|
|
164
|
+
disabled: o.readonly,
|
|
165
|
+
"aria-label": "清空合同",
|
|
166
|
+
onClick: l[6] ||= (e) => L("clear")
|
|
167
|
+
}, {
|
|
168
|
+
default: f(() => [a(d(y), { "aria-hidden": "true" })]),
|
|
169
|
+
_: 1
|
|
170
|
+
}, 8, ["disabled"])]),
|
|
161
171
|
_: 1
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
172
|
+
})) : n("", !0),
|
|
173
|
+
a(d(m), { title: B.value }, {
|
|
174
|
+
default: f(() => [a(d(p), {
|
|
175
|
+
size: "small",
|
|
176
|
+
class: s(["gd-contract-template-designer__page-decorations-trigger", { "is-selected": o.pageDecorationsOpen }]),
|
|
177
|
+
"aria-pressed": o.pageDecorationsOpen,
|
|
178
|
+
"aria-expanded": o.pageDecorationsOpen,
|
|
179
|
+
"aria-controls": o.pageDecorationsStudioId,
|
|
180
|
+
"aria-label": V.value,
|
|
181
|
+
onClick: l[7] ||= (e) => L("togglePageDecorations")
|
|
182
|
+
}, {
|
|
183
|
+
default: f(() => [a(d(g), { "aria-hidden": "true" }), i("span", N, [l[12] ||= i("span", null, "页面装饰", -1), i("small", null, u(o.pageDecorationsPresetLabel) + " · 启用 " + u(o.pageDecorationsEnabledCount) + "/3", 1)])]),
|
|
184
|
+
_: 1
|
|
185
|
+
}, 8, [
|
|
186
|
+
"class",
|
|
187
|
+
"aria-pressed",
|
|
188
|
+
"aria-expanded",
|
|
189
|
+
"aria-controls",
|
|
190
|
+
"aria-label"
|
|
191
|
+
])]),
|
|
179
192
|
_: 1
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
193
|
+
}, 8, ["title"]),
|
|
194
|
+
a(d(m), { title: "校验" }, {
|
|
195
|
+
default: f(() => [a(d(p), {
|
|
196
|
+
size: "small",
|
|
197
|
+
class: "gd-contract-template-designer__icon-button",
|
|
198
|
+
"aria-label": "校验",
|
|
199
|
+
onClick: l[8] ||= (e) => L("validate")
|
|
200
|
+
}, {
|
|
201
|
+
default: f(() => [a(d(h), { "aria-hidden": "true" })]),
|
|
202
|
+
_: 1
|
|
203
|
+
})]),
|
|
204
|
+
_: 1
|
|
205
|
+
}),
|
|
206
|
+
a(d(m), { title: "预览" }, {
|
|
207
|
+
default: f(() => [a(d(p), {
|
|
208
|
+
size: "small",
|
|
209
|
+
type: "primary",
|
|
210
|
+
class: "gd-contract-template-designer__icon-button",
|
|
211
|
+
"aria-label": "预览",
|
|
212
|
+
onClick: l[9] ||= (e) => L("preview")
|
|
213
|
+
}, {
|
|
214
|
+
default: f(() => [a(d(b), { "aria-hidden": "true" })]),
|
|
215
|
+
_: 1
|
|
216
|
+
})]),
|
|
217
|
+
_: 1
|
|
218
|
+
}),
|
|
219
|
+
o.showSubmitDataViewer ? (c(), t(d(m), {
|
|
220
|
+
key: 1,
|
|
221
|
+
title: "数据查看"
|
|
190
222
|
}, {
|
|
191
|
-
default: f(() => [a(d(
|
|
223
|
+
default: f(() => [a(d(p), {
|
|
224
|
+
size: "small",
|
|
225
|
+
class: "gd-contract-template-designer__icon-button",
|
|
226
|
+
"aria-label": "数据查看",
|
|
227
|
+
onClick: l[10] ||= (e) => L("submitData")
|
|
228
|
+
}, {
|
|
229
|
+
default: f(() => [a(d(v), { "aria-hidden": "true" })]),
|
|
230
|
+
_: 1
|
|
231
|
+
})]),
|
|
192
232
|
_: 1
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
o.showSubmitDataViewer ? (c(), t(d(m), {
|
|
197
|
-
key: 1,
|
|
198
|
-
title: "数据查看"
|
|
199
|
-
}, {
|
|
233
|
+
})) : n("", !0)
|
|
234
|
+
]),
|
|
235
|
+
a(d(m), { title: "收起工具区" }, {
|
|
200
236
|
default: f(() => [a(d(p), {
|
|
201
237
|
size: "small",
|
|
202
|
-
class: "gd-contract-template-designer__icon-button",
|
|
203
|
-
"aria-label": "
|
|
204
|
-
|
|
238
|
+
class: "gd-contract-template-designer__icon-button gd-contract-template-designer__workspace-chrome-toggle",
|
|
239
|
+
"aria-label": "收起工具区",
|
|
240
|
+
"aria-expanded": !0,
|
|
241
|
+
"aria-controls": o.chromeControlsId,
|
|
242
|
+
onClick: l[11] ||= (e) => L("toggleChrome")
|
|
205
243
|
}, {
|
|
206
|
-
default: f(() => [a(d(
|
|
244
|
+
default: f(() => [a(d(T), { "aria-hidden": "true" })]),
|
|
207
245
|
_: 1
|
|
208
|
-
})]),
|
|
246
|
+
}, 8, ["aria-controls"])]),
|
|
209
247
|
_: 1
|
|
210
|
-
})
|
|
211
|
-
])]
|
|
248
|
+
})
|
|
249
|
+
])], 512));
|
|
212
250
|
}
|
|
213
251
|
});
|
|
214
252
|
//#endregion
|
|
215
|
-
export {
|
|
253
|
+
export { P as default };
|
package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CONTRACT_PAGE_BASE_PADDING as e, getPageDecorationSafePadding as t, hasEnabledPageFooter as n, hasEnabledPageHeader as r, normalizePageDecorations as i } from "./utils/page-decorations.mjs";
|
|
2
|
-
import
|
|
3
|
-
import o from "./
|
|
2
|
+
import a from "./ContractTemplatePageDecorations.mjs";
|
|
3
|
+
import { resolvePageSize as o } from "./composables/use-template-designer.mjs";
|
|
4
4
|
import s from "./ContractTemplatePreviewSigningLayer.mjs";
|
|
5
5
|
import { computed as c, createElementBlock as l, createElementVNode as u, createVNode as d, defineComponent as f, normalizeStyle as p, openBlock as m } from "vue";
|
|
6
6
|
//#region src/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -24,7 +24,7 @@ var h = { class: "gd-contract-template-designer__preview-page-shell" }, g = [
|
|
|
24
24
|
variables: {}
|
|
25
25
|
},
|
|
26
26
|
setup(f) {
|
|
27
|
-
let v = f, y = c(() =>
|
|
27
|
+
let v = f, y = c(() => o(v.page.pageSize, v.fallbackPageSize)), b = c(() => {
|
|
28
28
|
let a = i(v.pageDecorations);
|
|
29
29
|
return {
|
|
30
30
|
width: `${y.value.width}px`,
|
|
@@ -42,7 +42,7 @@ var h = { class: "gd-contract-template-designer__preview-page-shell" }, g = [
|
|
|
42
42
|
"data-page-height": y.value.height,
|
|
43
43
|
style: p(b.value)
|
|
44
44
|
}, [
|
|
45
|
-
d(
|
|
45
|
+
d(a, {
|
|
46
46
|
decorations: f.pageDecorations,
|
|
47
47
|
"page-number": f.pageNumber,
|
|
48
48
|
"total-pages": f.totalPages,
|
package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.mjs
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { Fragment as e, createBlock as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, normalizeClass as o, normalizeStyle as s, openBlock as c, ref as l, renderList as u, resolveDynamicComponent as d, unref as f, withCtx as p } from "vue";
|
|
2
|
+
import { Button as m, Select as h, Tooltip as g } from "ant-design-vue";
|
|
3
|
+
import { AlignCenterOutlined as _, AlignLeftOutlined as v, AlignRightOutlined as y, BoldOutlined as b, ClearOutlined as x, EllipsisOutlined as S, ItalicOutlined as C, UnderlineOutlined as w } from "@ant-design/icons-vue";
|
|
4
|
+
//#region src/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var T = ["value"], E = /* @__PURE__ */ a({
|
|
6
|
+
name: "ContractTemplateTextBubbleMenu",
|
|
7
|
+
__name: "ContractTemplateTextBubbleMenu",
|
|
8
|
+
props: {
|
|
9
|
+
x: {},
|
|
10
|
+
y: {},
|
|
11
|
+
editorState: {},
|
|
12
|
+
fontSizePresetOptions: {},
|
|
13
|
+
currentEditorFontSize: {},
|
|
14
|
+
editorFontSizeSearchValue: {},
|
|
15
|
+
currentEditorTextColor: {},
|
|
16
|
+
textAlignOptions: {}
|
|
17
|
+
},
|
|
18
|
+
emits: [
|
|
19
|
+
"command",
|
|
20
|
+
"patch-font-size",
|
|
21
|
+
"patch-text-align",
|
|
22
|
+
"patch-color",
|
|
23
|
+
"font-size-search",
|
|
24
|
+
"font-size-commit",
|
|
25
|
+
"font-size-dropdown-change",
|
|
26
|
+
"font-size-keydown",
|
|
27
|
+
"more"
|
|
28
|
+
],
|
|
29
|
+
setup(a, { expose: E, emit: D }) {
|
|
30
|
+
let O = D, k = {
|
|
31
|
+
left: v,
|
|
32
|
+
center: _,
|
|
33
|
+
right: y
|
|
34
|
+
}, A = l();
|
|
35
|
+
function j(e) {
|
|
36
|
+
let t = e.currentTarget?.getBoundingClientRect();
|
|
37
|
+
O("more", t?.left ?? e.clientX, t?.bottom ?? e.clientY);
|
|
38
|
+
}
|
|
39
|
+
return E({ getMenuElement: () => A.value }), (l, _) => (c(), n("div", {
|
|
40
|
+
ref_key: "menuElement",
|
|
41
|
+
ref: A,
|
|
42
|
+
class: "gd-contract-template-designer__bubble-menu",
|
|
43
|
+
style: s({
|
|
44
|
+
left: `${a.x}px`,
|
|
45
|
+
top: `${a.y}px`
|
|
46
|
+
}),
|
|
47
|
+
role: "toolbar",
|
|
48
|
+
"aria-label": "选区格式工具条"
|
|
49
|
+
}, [
|
|
50
|
+
i(f(g), { title: "加粗" }, {
|
|
51
|
+
default: p(() => [i(f(m), {
|
|
52
|
+
size: "small",
|
|
53
|
+
class: o(["gd-contract-template-designer__icon-button", { "is-selected": a.editorState.isBold }]),
|
|
54
|
+
"aria-pressed": a.editorState.isBold,
|
|
55
|
+
"aria-label": "加粗",
|
|
56
|
+
onClick: _[0] ||= (e) => O("command", { type: "toggle-bold" })
|
|
57
|
+
}, {
|
|
58
|
+
default: p(() => [i(f(b), { "aria-hidden": "true" })]),
|
|
59
|
+
_: 1
|
|
60
|
+
}, 8, ["class", "aria-pressed"])]),
|
|
61
|
+
_: 1
|
|
62
|
+
}),
|
|
63
|
+
i(f(g), { title: "斜体" }, {
|
|
64
|
+
default: p(() => [i(f(m), {
|
|
65
|
+
size: "small",
|
|
66
|
+
class: o(["gd-contract-template-designer__icon-button", { "is-selected": a.editorState.isItalic }]),
|
|
67
|
+
"aria-pressed": a.editorState.isItalic,
|
|
68
|
+
"aria-label": "斜体",
|
|
69
|
+
onClick: _[1] ||= (e) => O("command", { type: "toggle-italic" })
|
|
70
|
+
}, {
|
|
71
|
+
default: p(() => [i(f(C), { "aria-hidden": "true" })]),
|
|
72
|
+
_: 1
|
|
73
|
+
}, 8, ["class", "aria-pressed"])]),
|
|
74
|
+
_: 1
|
|
75
|
+
}),
|
|
76
|
+
i(f(g), { title: "下划线" }, {
|
|
77
|
+
default: p(() => [i(f(m), {
|
|
78
|
+
size: "small",
|
|
79
|
+
class: o(["gd-contract-template-designer__icon-button", { "is-selected": a.editorState.isUnderline }]),
|
|
80
|
+
"aria-pressed": a.editorState.isUnderline,
|
|
81
|
+
"aria-label": "下划线",
|
|
82
|
+
onClick: _[2] ||= (e) => O("command", { type: "toggle-underline" })
|
|
83
|
+
}, {
|
|
84
|
+
default: p(() => [i(f(w), { "aria-hidden": "true" })]),
|
|
85
|
+
_: 1
|
|
86
|
+
}, 8, ["class", "aria-pressed"])]),
|
|
87
|
+
_: 1
|
|
88
|
+
}),
|
|
89
|
+
_[10] ||= r("span", {
|
|
90
|
+
class: "gd-contract-template-designer__bubble-divider",
|
|
91
|
+
"aria-hidden": "true"
|
|
92
|
+
}, null, -1),
|
|
93
|
+
i(f(h), {
|
|
94
|
+
class: "gd-contract-template-designer__bubble-font-size",
|
|
95
|
+
"popup-class-name": "gd-contract-template-designer__bubble-menu-popup",
|
|
96
|
+
value: a.currentEditorFontSize,
|
|
97
|
+
options: a.fontSizePresetOptions,
|
|
98
|
+
"show-search": "",
|
|
99
|
+
"filter-option": !1,
|
|
100
|
+
"search-value": a.editorFontSizeSearchValue,
|
|
101
|
+
size: "small",
|
|
102
|
+
onBlur: _[3] ||= (e) => O("font-size-commit"),
|
|
103
|
+
onChange: _[4] ||= (e) => O("patch-font-size", e),
|
|
104
|
+
onDropdownVisibleChange: _[5] ||= (e) => O("font-size-dropdown-change", e),
|
|
105
|
+
onInputKeyDown: _[6] ||= (e) => O("font-size-keydown", e),
|
|
106
|
+
onSearch: _[7] ||= (e) => O("font-size-search", e)
|
|
107
|
+
}, null, 8, [
|
|
108
|
+
"value",
|
|
109
|
+
"options",
|
|
110
|
+
"search-value"
|
|
111
|
+
]),
|
|
112
|
+
i(f(g), { title: "文字颜色" }, {
|
|
113
|
+
default: p(() => [r("input", {
|
|
114
|
+
class: "gd-contract-template-designer__bubble-color",
|
|
115
|
+
type: "color",
|
|
116
|
+
"aria-label": "文字颜色",
|
|
117
|
+
value: a.currentEditorTextColor,
|
|
118
|
+
onInput: _[8] ||= (e) => O("patch-color", e.target.value)
|
|
119
|
+
}, null, 40, T)]),
|
|
120
|
+
_: 1
|
|
121
|
+
}),
|
|
122
|
+
_[11] ||= r("span", {
|
|
123
|
+
class: "gd-contract-template-designer__bubble-divider",
|
|
124
|
+
"aria-hidden": "true"
|
|
125
|
+
}, null, -1),
|
|
126
|
+
(c(!0), n(e, null, u(a.textAlignOptions, (e) => (c(), t(f(g), {
|
|
127
|
+
key: e.value,
|
|
128
|
+
title: e.label
|
|
129
|
+
}, {
|
|
130
|
+
default: p(() => [i(f(m), {
|
|
131
|
+
size: "small",
|
|
132
|
+
class: o(["gd-contract-template-designer__icon-button", { "is-selected": a.editorState.textAlign === e.value }]),
|
|
133
|
+
"aria-pressed": a.editorState.textAlign === e.value,
|
|
134
|
+
"aria-label": e.label,
|
|
135
|
+
onClick: (t) => O("patch-text-align", e.value)
|
|
136
|
+
}, {
|
|
137
|
+
default: p(() => [(c(), t(d(k[e.value]), { "aria-hidden": "true" }))]),
|
|
138
|
+
_: 2
|
|
139
|
+
}, 1032, [
|
|
140
|
+
"class",
|
|
141
|
+
"aria-pressed",
|
|
142
|
+
"aria-label",
|
|
143
|
+
"onClick"
|
|
144
|
+
])]),
|
|
145
|
+
_: 2
|
|
146
|
+
}, 1032, ["title"]))), 128)),
|
|
147
|
+
_[12] ||= r("span", {
|
|
148
|
+
class: "gd-contract-template-designer__bubble-divider",
|
|
149
|
+
"aria-hidden": "true"
|
|
150
|
+
}, null, -1),
|
|
151
|
+
i(f(g), { title: "清除文字格式" }, {
|
|
152
|
+
default: p(() => [i(f(m), {
|
|
153
|
+
size: "small",
|
|
154
|
+
class: "gd-contract-template-designer__icon-button",
|
|
155
|
+
"aria-label": "清除文字格式",
|
|
156
|
+
onClick: _[9] ||= (e) => O("command", { type: "clear-text-format" })
|
|
157
|
+
}, {
|
|
158
|
+
default: p(() => [i(f(x), { "aria-hidden": "true" })]),
|
|
159
|
+
_: 1
|
|
160
|
+
})]),
|
|
161
|
+
_: 1
|
|
162
|
+
}),
|
|
163
|
+
i(f(g), { title: "更多操作" }, {
|
|
164
|
+
default: p(() => [i(f(m), {
|
|
165
|
+
size: "small",
|
|
166
|
+
class: "gd-contract-template-designer__icon-button",
|
|
167
|
+
"aria-label": "更多操作",
|
|
168
|
+
onClick: j
|
|
169
|
+
}, {
|
|
170
|
+
default: p(() => [i(f(S), { "aria-hidden": "true" })]),
|
|
171
|
+
_: 1
|
|
172
|
+
})]),
|
|
173
|
+
_: 1
|
|
174
|
+
})
|
|
175
|
+
], 4));
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
//#endregion
|
|
179
|
+
export { E as default };
|