@guodun/antdv 1.7.12 → 1.7.14

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.
Files changed (67) hide show
  1. package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +373 -295
  2. package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +219 -202
  3. package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.vue.mjs +18 -18
  4. package/dist/es/components/contract-signing-location/src/template-source.mjs +62 -49
  5. package/dist/es/components/index.mjs +1 -0
  6. package/dist/es/components/pro-contract-template-designer/index.mjs +1 -0
  7. package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +37 -42
  8. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.mjs +69 -55
  9. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.mjs +278 -270
  10. package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +344 -343
  11. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1025 -964
  12. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +120 -74
  13. package/dist/es/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.mjs +72 -59
  14. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +133 -132
  15. package/dist/es/components/pro-contract-template-designer/src/utils/contract-layout-check.mjs +239 -0
  16. package/dist/es/components/pro-contract-template-designer/src/utils/contract-print-document.mjs +95 -71
  17. package/dist/es/components/pro-contract-template-designer/src/utils/page-decorations.mjs +67 -76
  18. package/dist/es/components/pro-contract-template-designer/src/utils/signing-layout-presets.mjs +77 -61
  19. package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +96 -83
  20. package/dist/es/components/pro-contract-template-designer/src/utils/template-variable-render.mjs +23 -15
  21. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  22. package/dist/es/contract-print-css/index.mjs +134 -30
  23. package/dist/es/contract-print.mjs +2 -0
  24. package/dist/es/index.mjs +21 -20
  25. package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
  26. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
  27. package/dist/lib/components/contract-signing-location/src/ContractSigningTemplatePage.vue.cjs +1 -1
  28. package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
  29. package/dist/lib/components/index.cjs +1 -1
  30. package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
  31. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -1
  32. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.cjs +1 -1
  33. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.cjs +1 -1
  34. package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
  35. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
  36. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
  37. package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.cjs +1 -1
  38. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
  39. package/dist/lib/components/pro-contract-template-designer/src/utils/contract-layout-check.cjs +1 -0
  40. package/dist/lib/components/pro-contract-template-designer/src/utils/contract-print-document.cjs +50 -28
  41. package/dist/lib/components/pro-contract-template-designer/src/utils/page-decorations.cjs +1 -1
  42. package/dist/lib/components/pro-contract-template-designer/src/utils/signing-layout-presets.cjs +1 -1
  43. package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +5 -5
  44. package/dist/lib/components/pro-contract-template-designer/src/utils/template-variable-render.cjs +1 -1
  45. package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
  46. package/dist/lib/contract-print-css/index.cjs +74 -23
  47. package/dist/lib/contract-print.cjs +1 -0
  48. package/dist/lib/index.cjs +1 -1
  49. package/dist/theme/icon.css +1 -1
  50. package/dist/theme/index.css +1 -1
  51. package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +9 -0
  52. package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +7 -0
  53. package/dist/types/components/contract-signing-location/src/template-source.d.ts +6 -0
  54. package/dist/types/components/pro-contract-template-designer/index.d.ts +1 -0
  55. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.d.ts +2 -0
  56. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +5 -1
  57. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +7 -2
  58. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +2 -2
  59. package/dist/types/components/pro-contract-template-designer/src/types.d.ts +36 -0
  60. package/dist/types/components/pro-contract-template-designer/src/utils/contract-layout-check.d.ts +104 -0
  61. package/dist/types/components/pro-contract-template-designer/src/utils/contract-print-document.d.ts +4 -1
  62. package/dist/types/components/pro-contract-template-designer/src/utils/page-decorations.d.ts +2 -8
  63. package/dist/types/components/pro-contract-template-designer/src/utils/signing-layout-presets.d.ts +9 -0
  64. package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +6 -1
  65. package/dist/types/contract-print-css/index.d.ts +70 -0
  66. package/dist/types/contract-print.d.ts +2 -0
  67. package/package.json +14 -2
@@ -1,24 +1,25 @@
1
- import { validateTemplateRenderValues as e } from "./utils/template-renderer.mjs";
2
- import { resolveContractTemplateFileTabTargetIndex as t } from "./utils/file-tabs.mjs";
3
- import n from "./ContractTemplateSingleRenderer.mjs";
4
- import { useRendererFiles as r } from "./composables/use-renderer-files.mjs";
5
- import { Fragment as i, createBlock as a, createElementBlock as o, createElementVNode as s, createSlots as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, nextTick as f, normalizeProps as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, withCtx as b } from "vue";
1
+ import { resolveTemplateDisplayValues as e, validateTemplateRenderValues as t } from "./utils/template-renderer.mjs";
2
+ import { createContractTemplateLayoutChecker as n, describeContractTemplateLayoutIssue as r } from "./utils/contract-layout-check.mjs";
3
+ import { resolveContractTemplateFileTabTargetIndex as i } from "./utils/file-tabs.mjs";
4
+ import a from "./ContractTemplateSingleRenderer.mjs";
5
+ import { useRendererFiles as o } from "./composables/use-renderer-files.mjs";
6
+ import { Fragment as s, createBlock as c, createElementBlock as l, createElementVNode as u, createSlots as d, defineComponent as f, guardReactiveProps as p, mergeProps as m, nextTick as h, normalizeProps as g, onBeforeUnmount as _, openBlock as v, ref as y, renderList as b, renderSlot as x, toDisplayString as S, unref as C, withCtx as w } from "vue";
6
7
  //#region src/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue?vue&type=script&setup=true&lang.ts
7
- var x = {
8
+ var T = {
8
9
  class: "gd-contract-template-renderer__files",
9
10
  "aria-label": "合同文件"
10
- }, S = {
11
+ }, E = {
11
12
  class: "gd-contract-template-renderer__file-tabs",
12
13
  role: "tablist",
13
14
  "aria-label": "合同文件列表"
14
- }, C = [
15
+ }, D = [
15
16
  "data-renderer-file-id",
16
17
  "aria-selected",
17
18
  "tabindex",
18
19
  "disabled",
19
20
  "onClick",
20
21
  "onKeydown"
21
- ], w = /* @__PURE__ */ l({
22
+ ], O = /* @__PURE__ */ f({
22
23
  name: "ProContractTemplateRenderer",
23
24
  __name: "ProContractTemplateRenderer",
24
25
  props: {
@@ -92,100 +93,145 @@ var x = {
92
93
  "update:zoom",
93
94
  "control-warning"
94
95
  ],
95
- setup(l, { expose: w, emit: T }) {
96
- let E = l, D = T, O = h(), { enabled: k, files: A, activeId: j, activeFile: M, values: N, fileErrors: P, select: F, update: I, getAllValues: L, validateAll: R } = r(E, (e) => D("update:activeFileId", e), (e) => D("update:valuesByFile", e));
97
- function z(e) {
98
- k.value ? I(e) : D("update:values", e);
96
+ setup(f, { expose: O, emit: k }) {
97
+ let A = f, j = k, M = y(), N = n();
98
+ _(() => N.dispose());
99
+ let { enabled: P, files: F, activeId: I, activeFile: L, values: R, fileErrors: z, select: B, update: V, getAllValues: H, validateAll: U } = o(A, (e) => j("update:activeFileId", e), (e) => j("update:valuesByFile", e));
100
+ function W(e) {
101
+ P.value ? V(e) : j("update:values", e);
99
102
  }
100
- function B(e) {
101
- D("validate", k.value ? e.map((e) => ({
103
+ function G(e) {
104
+ j("validate", P.value ? e.map((e) => ({
102
105
  ...e,
103
- fileId: j.value || void 0
106
+ fileId: I.value || void 0
104
107
  })) : e);
105
108
  }
106
- function V() {
107
- let t = O.value?.validate() ?? e(E.template, E.values ?? {});
108
- return k.value ? t.map((e) => ({
109
+ function K() {
110
+ let e = M.value?.validate() ?? t(A.template, A.values ?? {});
111
+ return P.value ? e.map((e) => ({
109
112
  ...e,
110
- fileId: j.value || void 0
111
- })) : t;
113
+ fileId: I.value || void 0
114
+ })) : e;
112
115
  }
113
- function H() {
114
- if (!k.value) return V();
115
- let e = R();
116
- D("validate", e);
116
+ function q() {
117
+ if (!P.value) return K();
118
+ let e = U();
119
+ j("validate", e);
117
120
  let t = e[0];
118
- return t?.fileId && A.value.some((e) => e.id === t.fileId) && !E.disabled ? (F(t.fileId), f(() => {
119
- j.value === t.fileId && (O.value?.showValidation(e.filter((e) => e.fileId === j.value)), O.value?.focusError(t));
120
- })) : O.value?.showValidation(e.filter((e) => !e.fileId || e.fileId === j.value)), e;
121
+ return t?.fileId && F.value.some((e) => e.id === t.fileId) && !A.disabled ? (B(t.fileId), h(() => {
122
+ I.value === t.fileId && (M.value?.showValidation(e.filter((e) => e.fileId === I.value)), M.value?.focusError(t));
123
+ })) : M.value?.showValidation(e.filter((e) => !e.fileId || e.fileId === I.value)), e;
121
124
  }
122
- function U(e, n) {
123
- if (E.disabled) return;
124
- let r = t(n, e.key, A.value.length), i = r === void 0 ? void 0 : A.value[r];
125
- i && (e.preventDefault(), F(i.id), f(() => {
126
- let e = (O.value?.$el)?.querySelectorAll("[data-renderer-file-id]") ?? [];
127
- Array.from(e).find((e) => e.dataset.rendererFileId === i.id)?.focus();
125
+ async function J() {
126
+ let t = P.value ? F.value.map((t) => ({
127
+ fileId: t.id,
128
+ template: t.template,
129
+ values: e(t.template, R.value[t.id] ?? {}, A.controlRegistry)
130
+ })) : A.template ? [{
131
+ template: A.template,
132
+ values: e(A.template, M.value?.getValues() ?? A.values ?? {}, A.controlRegistry)
133
+ }] : [];
134
+ return (await N.check(t, { reuse: (e) => M.value?.getMountedLayoutMetrics(e) })).flatMap((e) => Y(e));
135
+ }
136
+ function Y(e) {
137
+ let t = {
138
+ type: "page",
139
+ ...e.fileId === void 0 ? {} : { fileId: e.fileId },
140
+ pageId: e.pageId
141
+ };
142
+ if (e.kind === "measure-failed") return r(e, "generate").map((n) => ({
143
+ ...t,
144
+ id: `${e.fileId ?? ""}|${e.pageId}|layout-unverified`,
145
+ code: "PAGE_LAYOUT_UNVERIFIED",
146
+ message: n
147
+ }));
148
+ let n = [];
149
+ return e.overflowHeight > 0 && n.push({
150
+ ...t,
151
+ id: `${e.fileId ?? ""}|${e.pageId}|layout-overflow-height`,
152
+ code: "PAGE_LAYOUT_OVERFLOW_HEIGHT",
153
+ message: r({
154
+ ...e,
155
+ overflowWidth: 0
156
+ }, "generate")[0] ?? ""
157
+ }), e.overflowWidth > 0 && n.push({
158
+ ...t,
159
+ id: `${e.fileId ?? ""}|${e.pageId}|layout-overflow-width`,
160
+ code: "PAGE_LAYOUT_OVERFLOW_WIDTH",
161
+ message: r({
162
+ ...e,
163
+ overflowHeight: 0
164
+ }, "generate")[0] ?? ""
165
+ }), n;
166
+ }
167
+ function X(e, t) {
168
+ if (A.disabled) return;
169
+ let n = i(t, e.key, F.value.length), r = n === void 0 ? void 0 : F.value[n];
170
+ r && (e.preventDefault(), B(r.id), h(() => {
171
+ let e = (M.value?.$el)?.querySelectorAll("[data-renderer-file-id]") ?? [];
172
+ Array.from(e).find((e) => e.dataset.rendererFileId === r.id)?.focus();
128
173
  }));
129
174
  }
130
- return w({
131
- getAllValues: L,
132
- validateAll: H,
133
- getValues: () => O.value?.getValues() ?? {},
175
+ return O({
176
+ getAllValues: H,
177
+ validateAll: q,
178
+ getValues: () => M.value?.getValues() ?? {},
134
179
  setValues: (e) => {
135
- (!k.value || !E.disabled) && O.value?.setValues(e);
180
+ (!P.value || !A.disabled) && M.value?.setValues(e);
136
181
  },
137
- resetValues: () => k.value && E.disabled ? O.value?.getValues() ?? {} : O.value?.resetValues() ?? {},
138
- validate: V,
139
- submit: () => O.value?.submit() ?? !1,
140
- scrollToVariable: (e) => O.value?.scrollToVariable(e),
141
- scrollToPage: (e) => O.value?.scrollToPage(e),
142
- setZoom: (e) => O.value?.setZoom(e) ?? 1,
143
- resetZoom: () => O.value?.resetZoom() ?? 1,
144
- getZoom: () => O.value?.getZoom() ?? 1,
145
- fitWidth: () => O.value?.fitWidth() ?? 1
146
- }), (e, t) => (m(), a(n, d({
147
- key: y(k) ? `file:${y(j)}` : "single",
182
+ resetValues: () => P.value && A.disabled ? M.value?.getValues() ?? {} : M.value?.resetValues() ?? {},
183
+ validate: K,
184
+ validateLayoutAll: J,
185
+ submit: () => M.value?.submit() ?? !1,
186
+ scrollToVariable: (e) => M.value?.scrollToVariable(e),
187
+ scrollToPage: (e) => M.value?.scrollToPage(e),
188
+ setZoom: (e) => M.value?.setZoom(e) ?? 1,
189
+ resetZoom: () => M.value?.resetZoom() ?? 1,
190
+ getZoom: () => M.value?.getZoom() ?? 1,
191
+ fitWidth: () => M.value?.fitWidth() ?? 1
192
+ }), (e, t) => (v(), c(a, m({
193
+ key: C(P) ? `file:${C(I)}` : "single",
148
194
  ref_key: "renderer",
149
- ref: O
150
- }, E, {
151
- class: { "is-multi-file": y(k) },
152
- template: y(k) ? y(M)?.template : l.template,
153
- values: y(k) ? y(N)[y(j)] : E.values,
154
- "onUpdate:values": z,
155
- onChange: t[0] ||= (e) => D("change", e),
156
- onValidate: B,
157
- onSubmit: t[1] ||= (e) => D("submit", e),
158
- "onUpdate:zoom": t[2] ||= (e) => D("update:zoom", e),
159
- onControlWarning: t[3] ||= (e) => D("control-warning", e)
160
- }), c({ _: 2 }, [
161
- y(k) ? {
195
+ ref: M
196
+ }, A, {
197
+ class: { "is-multi-file": C(P) },
198
+ template: C(P) ? C(L)?.template : f.template,
199
+ values: C(P) ? C(R)[C(I)] : A.values,
200
+ "onUpdate:values": W,
201
+ onChange: t[0] ||= (e) => j("change", e),
202
+ onValidate: G,
203
+ onSubmit: t[1] ||= (e) => j("submit", e),
204
+ "onUpdate:zoom": t[2] ||= (e) => j("update:zoom", e),
205
+ onControlWarning: t[3] ||= (e) => j("control-warning", e)
206
+ }), d({ _: 2 }, [
207
+ C(P) ? {
162
208
  name: "fileBar",
163
- fn: b(() => [s("nav", x, [s("div", S, [(m(!0), o(i, null, g(y(A), (e, t) => (m(), o("button", {
209
+ fn: w(() => [u("nav", T, [u("div", E, [(v(!0), l(s, null, b(C(F), (e, t) => (v(), l("button", {
164
210
  key: e.id,
165
211
  type: "button",
166
212
  role: "tab",
167
213
  class: "gd-contract-template-renderer__file-tab",
168
214
  "data-renderer-file-id": e.id,
169
- "aria-selected": y(j) === e.id,
170
- tabindex: y(j) === e.id ? 0 : -1,
171
- disabled: l.disabled,
172
- onClick: (t) => y(F)(e.id),
173
- onKeydown: (e) => U(e, t)
174
- }, v(e.name || e.id), 41, C))), 128))]), (m(!0), o(i, null, g(y(P), (e) => (m(), o("p", {
215
+ "aria-selected": C(I) === e.id,
216
+ tabindex: C(I) === e.id ? 0 : -1,
217
+ disabled: f.disabled,
218
+ onClick: (t) => C(B)(e.id),
219
+ onKeydown: (e) => X(e, t)
220
+ }, S(e.name || e.id), 41, D))), 128))]), (v(!0), l(s, null, b(C(z), (e) => (v(), l("p", {
175
221
  key: e.id,
176
222
  class: "gd-contract-template-renderer__file-error",
177
223
  role: "alert"
178
- }, v(e.message), 1))), 128))])]),
224
+ }, S(e.message), 1))), 128))])]),
179
225
  key: "0"
180
226
  } : void 0,
181
227
  e.$slots.field ? {
182
228
  name: "field",
183
- fn: b((t) => [_(e.$slots, "field", p(u(t)))]),
229
+ fn: w((t) => [x(e.$slots, "field", g(p(t)))]),
184
230
  key: "1"
185
231
  } : void 0,
186
232
  e.$slots.headerExtra ? {
187
233
  name: "headerExtra",
188
- fn: b(() => [_(e.$slots, "headerExtra")]),
234
+ fn: w(() => [x(e.$slots, "headerExtra")]),
189
235
  key: "2"
190
236
  } : void 0
191
237
  ]), 1040, [
@@ -196,4 +242,4 @@ var x = {
196
242
  }
197
243
  });
198
244
  //#endregion
199
- export { w as default };
245
+ export { O as default };
@@ -1,12 +1,16 @@
1
- import { SIGNING_LAYOUT_ARRANGEMENTS as e, SIGNING_LAYOUT_ARRANGEMENT_LABELS as t, SIGNING_LAYOUT_FIELD_KEYS as n, SIGNING_LAYOUT_FIELD_LABELS as r, SIGNING_LAYOUT_PRESETS as i, buildSigningLayoutPreviewModel as a, describeSigningLayoutOptions as o, normalizeSigningLayoutOptions as s } from "./utils/signing-layout-presets.mjs";
2
- import c from "./SigningLayoutPreview.mjs";
3
- import { computed as l, createBlock as u, createElementVNode as d, createVNode as f, defineComponent as p, openBlock as m, ref as h, toDisplayString as g, unref as _, watch as v, withCtx as y } from "vue";
4
- import { CheckboxGroup as b, InputNumber as x, Modal as S, RadioGroup as C } from "ant-design-vue";
1
+ import { SIGNING_LAYOUT_ARRANGEMENTS as e, SIGNING_LAYOUT_ARRANGEMENT_LABELS as t, SIGNING_LAYOUT_FIELD_KEYS as n, SIGNING_LAYOUT_FIELD_LABELS as r, SIGNING_LAYOUT_PRESETS as i, buildSigningLayoutPreviewModel as a, describeSigningLayoutOptions as o, isSingleRowSigningLayoutArrangement as s, normalizeSigningLayoutOptions as c } from "./utils/signing-layout-presets.mjs";
2
+ import l from "./SigningLayoutPreview.mjs";
3
+ import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineComponent as g, openBlock as _, ref as v, toDisplayString as y, unref as b, watch as x, withCtx as S } from "vue";
4
+ import { CheckboxGroup as C, InputNumber as w, Modal as T, RadioGroup as E } from "ant-design-vue";
5
5
  //#region src/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue?vue&type=script&setup=true&lang.ts
6
- var w = { class: "gd-contract-template-designer__signing-layout-modal-body" }, T = { class: "gd-contract-template-designer__signing-layout-modal-fields" }, E = { class: "gd-contract-template-designer__signing-layout-modal-field" }, D = { class: "gd-contract-template-designer__signing-layout-modal-field" }, O = { class: "gd-contract-template-designer__signing-layout-modal-field" }, k = { class: "gd-contract-template-designer__signing-layout-modal-preview" }, A = {
6
+ var D = { class: "gd-contract-template-designer__signing-layout-modal-body" }, O = { class: "gd-contract-template-designer__signing-layout-modal-fields" }, k = { class: "gd-contract-template-designer__signing-layout-modal-field" }, A = { class: "gd-contract-template-designer__signing-layout-modal-field" }, j = {
7
+ key: 0,
8
+ class: "gd-contract-template-designer__signing-layout-modal-hint",
9
+ role: "note"
10
+ }, M = { class: "gd-contract-template-designer__signing-layout-modal-field" }, N = { class: "gd-contract-template-designer__signing-layout-modal-preview" }, P = {
7
11
  class: "gd-contract-template-designer__signing-layout-modal-hint",
8
12
  "aria-live": "polite"
9
- }, j = /* @__PURE__ */ p({
13
+ }, F = /* @__PURE__ */ g({
10
14
  name: "SigningLayoutCustomModal",
11
15
  __name: "SigningLayoutCustomModal",
12
16
  props: {
@@ -17,58 +21,63 @@ var w = { class: "gd-contract-template-designer__signing-layout-modal-body" }, T
17
21
  }
18
22
  },
19
23
  emits: ["update:open", "insert"],
20
- setup(p, { emit: j }) {
21
- let M = p, N = j, P = e.map((e) => ({
22
- value: e,
23
- label: t[e]
24
- })), F = n.map((e) => ({
24
+ setup(g, { emit: F }) {
25
+ let I = g, L = F, R = n.map((e) => ({
25
26
  value: e,
26
27
  label: r[e]
27
- })), I = h(i["dual-party"].options.partyCount), L = h("side-by-side"), R = h([
28
+ })), z = v(i["dual-party"].options.partyCount), B = v("side-by-side"), V = v([
28
29
  "seal",
29
30
  "signature",
30
31
  "date"
31
32
  ]);
32
- v(() => M.open, (e) => {
33
+ x(() => I.open, (e) => {
33
34
  if (!e) return;
34
35
  let t = i["dual-party"].options;
35
- I.value = t.partyCount, L.value = t.arrangement, R.value = n.filter((e) => t.fields[e]);
36
+ z.value = t.partyCount, B.value = t.arrangement, V.value = n.filter((e) => t.fields[e]);
36
37
  });
37
- let z = l(() => s({
38
- partyCount: I.value,
39
- arrangement: L.value,
38
+ let H = u(() => Number(z.value) > 3), U = u(() => H.value && s(B.value) ? "stacked" : B.value), W = u(() => e.map((e) => ({
39
+ value: e,
40
+ label: t[e],
41
+ disabled: H.value && s(e)
42
+ })));
43
+ x(H, (e) => {
44
+ e && (B.value = U.value);
45
+ });
46
+ let G = u(() => c({
47
+ partyCount: z.value,
48
+ arrangement: U.value,
40
49
  fields: {
41
- seal: R.value.includes("seal"),
42
- signature: R.value.includes("signature"),
43
- date: R.value.includes("date"),
44
- title: R.value.includes("title")
50
+ seal: V.value.includes("seal"),
51
+ signature: V.value.includes("signature"),
52
+ date: V.value.includes("date"),
53
+ title: V.value.includes("title")
45
54
  }
46
- })), B = l(() => a(z.value)), V = l(() => o(z.value)), H = l(() => !M.disabled);
47
- function U() {
48
- if (!H.value) return;
49
- let e = z.value;
50
- N("insert", e), N("update:open", !1);
55
+ })), K = u(() => a(G.value)), q = u(() => o(G.value)), J = u(() => !I.disabled);
56
+ function Y() {
57
+ if (!J.value) return;
58
+ let e = G.value;
59
+ L("insert", e), L("update:open", !1);
51
60
  }
52
- return (e, t) => (m(), u(_(S), {
53
- open: p.open,
61
+ return (e, t) => (_(), d(b(T), {
62
+ open: g.open,
54
63
  title: "自定义签署版式",
55
64
  width: "min(720px, calc(100vw - 48px))",
56
65
  centered: "",
57
66
  "ok-text": "插入",
58
67
  "cancel-text": "取消",
59
- "ok-button-props": { disabled: !H.value },
68
+ "ok-button-props": { disabled: !J.value },
60
69
  "wrap-class-name": "gd-contract-template-designer__signing-layout-modal",
61
- "onUpdate:open": t[3] ||= (e) => N("update:open", e),
62
- onOk: U
70
+ "onUpdate:open": t[3] ||= (e) => L("update:open", e),
71
+ onOk: Y
63
72
  }, {
64
- default: y(() => [d("div", w, [d("div", T, [
65
- d("label", E, [t[4] ||= d("span", null, "签署方数量", -1), f(_(x), {
66
- value: I.value,
67
- "onUpdate:value": t[0] ||= (e) => I.value = e,
68
- min: _(1),
69
- max: _(6),
73
+ default: S(() => [m("div", D, [m("div", O, [
74
+ m("label", k, [t[4] ||= m("span", null, "签署方数量", -1), h(b(w), {
75
+ value: z.value,
76
+ "onUpdate:value": t[0] ||= (e) => z.value = e,
77
+ min: b(1),
78
+ max: b(6),
70
79
  precision: 0,
71
- disabled: p.disabled,
80
+ disabled: g.disabled,
72
81
  "aria-label": "签署方数量"
73
82
  }, null, 8, [
74
83
  "value",
@@ -76,35 +85,39 @@ var w = { class: "gd-contract-template-designer__signing-layout-modal-body" }, T
76
85
  "max",
77
86
  "disabled"
78
87
  ])]),
79
- d("div", D, [t[5] ||= d("span", null, "排列方式", -1), f(_(C), {
80
- value: L.value,
81
- "onUpdate:value": t[1] ||= (e) => L.value = e,
82
- options: _(P),
83
- "option-type": "button",
84
- "button-style": "solid",
85
- size: "small",
86
- disabled: p.disabled,
87
- "aria-label": "排列方式"
88
- }, null, 8, [
89
- "value",
90
- "options",
91
- "disabled"
92
- ])]),
93
- d("div", O, [t[6] ||= d("span", null, "包含项", -1), f(_(b), {
94
- value: R.value,
95
- "onUpdate:value": t[2] ||= (e) => R.value = e,
96
- options: _(F),
97
- disabled: p.disabled,
88
+ m("div", A, [
89
+ t[5] ||= m("span", null, "排列方式", -1),
90
+ h(b(E), {
91
+ value: B.value,
92
+ "onUpdate:value": t[1] ||= (e) => B.value = e,
93
+ options: W.value,
94
+ "option-type": "button",
95
+ "button-style": "solid",
96
+ size: "small",
97
+ disabled: g.disabled,
98
+ "aria-label": "排列方式"
99
+ }, null, 8, [
100
+ "value",
101
+ "options",
102
+ "disabled"
103
+ ]),
104
+ H.value ? (_(), p("span", j, y("并排最多 3 方,请改用逐行列出"))) : f("", !0)
105
+ ]),
106
+ m("div", M, [t[6] ||= m("span", null, "包含项", -1), h(b(C), {
107
+ value: V.value,
108
+ "onUpdate:value": t[2] ||= (e) => V.value = e,
109
+ options: b(R),
110
+ disabled: g.disabled,
98
111
  "aria-label": "包含项"
99
112
  }, null, 8, [
100
113
  "value",
101
114
  "options",
102
115
  "disabled"
103
116
  ])])
104
- ]), d("div", k, [f(c, { model: B.value }, null, 8, ["model"]), d("span", A, g(V.value), 1)])])]),
117
+ ]), m("div", N, [h(l, { model: K.value }, null, 8, ["model"]), m("span", P, y(q.value), 1)])])]),
105
118
  _: 1
106
119
  }, 8, ["open", "ok-button-props"]));
107
120
  }
108
121
  });
109
122
  //#endregion
110
- export { j as default };
123
+ export { F as default };