@guodun/antdv 1.7.9 → 1.7.11

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 (29) hide show
  1. package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +295 -296
  2. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.mjs +247 -220
  3. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.mjs +1 -1
  4. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.mjs +297 -294
  5. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1 -2
  6. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +1 -1
  7. package/dist/es/components/pro-contract-template-designer/src/utils/contract-print-document.mjs +7 -1
  8. package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +113 -102
  9. package/dist/es/components/pro-contract-template-designer/src/utils/template-variable-render.mjs +35 -20
  10. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  11. package/dist/es/index.mjs +19 -19
  12. package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
  13. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue.cjs +1 -1
  14. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererField.vue.cjs +1 -1
  15. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.cjs +1 -1
  16. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
  17. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +1 -1
  18. package/dist/lib/components/pro-contract-template-designer/src/utils/contract-print-document.cjs +7 -1
  19. package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +5 -3
  20. package/dist/lib/components/pro-contract-template-designer/src/utils/template-variable-render.cjs +1 -1
  21. package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
  22. package/dist/lib/index.cjs +1 -1
  23. package/dist/theme/icon.css +1 -1
  24. package/dist/theme/index.css +1 -1
  25. package/dist/types/components/pro-contract-template-designer/src/types.d.ts +3 -0
  26. package/dist/types/components/pro-contract-template-designer/src/utils/contract-print-document.d.ts +1 -1
  27. package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +2 -0
  28. package/dist/types/components/pro-contract-template-designer/src/utils/template-variable-render.d.ts +8 -2
  29. package/package.json +3 -2
@@ -1,41 +1,48 @@
1
- import { DEFAULT_FIELD_STYLE as e, getFieldOption as t } from "./composables/use-template-designer.mjs";
2
- import { resolveFieldTypeIcon as n } from "./utils/template-tool-icons.mjs";
3
- import r from "./ContractTemplatePanelTabs.mjs";
4
- import ee from "./ContractTemplateChoiceOptionsEditor.mjs";
5
- import te from "./ContractTemplateControlLibrary.mjs";
6
- import ne from "./ContractTemplateVariableAdvanced.mjs";
7
- import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, normalizeClass as re, openBlock as p, resolveDynamicComponent as ie, shallowRef as m, toDisplayString as h, unref as g, useId as ae, vShow as _, watch as oe, withCtx as v, withDirectives as y } from "vue";
8
- import { Button as b, Input as x, InputNumber as S, Popconfirm as se, Select as C, Switch as w, Tooltip as T } from "ant-design-vue";
9
- import { CopyOutlined as ce, DeleteOutlined as le, LeftOutlined as ue, RightOutlined as E } from "@ant-design/icons-vue";
1
+ import { TEMPLATE_NUMBER_FORMAT_OPTIONS as e } from "./utils/template-variable-render.mjs";
2
+ import { DEFAULT_FIELD_STYLE as t, getFieldOption as n } from "./composables/use-template-designer.mjs";
3
+ import { resolveFieldTypeIcon as r } from "./utils/template-tool-icons.mjs";
4
+ import ee from "./ContractTemplatePanelTabs.mjs";
5
+ import te from "./ContractTemplateChoiceOptionsEditor.mjs";
6
+ import ne from "./ContractTemplateControlLibrary.mjs";
7
+ import re from "./ContractTemplateVariableAdvanced.mjs";
8
+ import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, normalizeClass as ie, openBlock as p, resolveDynamicComponent as ae, shallowRef as oe, toDisplayString as m, unref as h, useId as se, vShow as g, watch as ce, withCtx as _, withDirectives as v } from "vue";
9
+ import { Button as y, Input as b, InputNumber as x, Popconfirm as le, Select as S, Switch as C, Tooltip as w } from "ant-design-vue";
10
+ import { CopyOutlined as ue, DeleteOutlined as de, LeftOutlined as fe, RightOutlined as T } from "@ant-design/icons-vue";
10
11
  //#region src/components/pro-contract-template-designer/src/ContractTemplateDesignerInspector.vue?vue&type=script&setup=true&lang.ts
11
- var D = ["aria-label", "aria-expanded"], O = { class: "gd-contract-template-designer__panel-stack" }, k = { class: "gd-contract-authoring-panel__body" }, A = ["id", "aria-labelledby"], j = ["id", "aria-labelledby"], M = { class: "gd-contract-authoring-panel__section-heading" }, N = {
12
+ var pe = ["aria-label", "aria-expanded"], me = { class: "gd-contract-template-designer__panel-stack" }, E = { class: "gd-contract-authoring-panel__body" }, D = ["id", "aria-labelledby"], O = ["id", "aria-labelledby"], k = { class: "gd-contract-authoring-panel__section-heading" }, A = {
12
13
  key: 0,
13
14
  class: "gd-contract-authoring-panel__meta"
14
- }, P = {
15
+ }, j = {
15
16
  key: 0,
16
17
  class: "gd-contract-authoring-panel__empty"
17
- }, F = { class: "gd-contract-authoring-panel__selection" }, I = {
18
+ }, M = { class: "gd-contract-authoring-panel__selection" }, N = {
18
19
  class: "gd-contract-authoring-panel__variable-icon",
19
20
  "aria-hidden": "true"
20
- }, L = { class: "gd-contract-authoring-panel__variable-copy" }, R = { class: "gd-contract-authoring-panel__item-title" }, z = { class: "gd-contract-authoring-panel__meta" }, B = { class: "gd-contract-authoring-panel__property-group" }, V = { class: "gd-contract-authoring-panel__fields" }, H = { class: "gd-contract-authoring-panel__field" }, U = { class: "gd-contract-authoring-panel__field" }, de = {
21
+ }, P = { class: "gd-contract-authoring-panel__variable-copy" }, F = { class: "gd-contract-authoring-panel__item-title" }, I = { class: "gd-contract-authoring-panel__meta" }, L = { class: "gd-contract-authoring-panel__property-group" }, R = { class: "gd-contract-authoring-panel__fields" }, z = { class: "gd-contract-authoring-panel__field" }, he = { class: "gd-contract-authoring-panel__field" }, ge = {
21
22
  key: 0,
22
23
  class: "gd-contract-authoring-panel__field"
23
- }, fe = {
24
+ }, _e = {
24
25
  open: "",
25
26
  class: "gd-contract-authoring-panel__property-group"
26
- }, pe = { class: "gd-contract-authoring-panel__group-title" }, me = { class: "gd-contract-authoring-panel__fields" }, he = { class: "gd-contract-authoring-panel__switch" }, ge = { class: "gd-contract-authoring-panel__switch" }, _e = {
27
+ }, ve = { class: "gd-contract-authoring-panel__group-title" }, ye = { class: "gd-contract-authoring-panel__fields" }, B = { class: "gd-contract-authoring-panel__switch" }, be = { class: "gd-contract-authoring-panel__switch" }, xe = {
27
28
  key: 0,
28
29
  class: "gd-contract-authoring-panel__field"
29
- }, ve = {
30
+ }, Se = {
30
31
  key: 1,
31
32
  class: "gd-contract-authoring-panel__field"
32
- }, ye = { class: "gd-contract-authoring-panel__field" }, be = { class: "gd-contract-authoring-panel__field" }, xe = { class: "gd-contract-authoring-panel__switch" }, Se = { class: "gd-contract-authoring-panel__field" }, Ce = { class: "gd-contract-authoring-panel__field" }, we = {
33
+ }, Ce = { class: "gd-contract-authoring-panel__field" }, we = { key: 0 }, Te = { class: "gd-contract-authoring-panel__field" }, Ee = { class: "gd-contract-authoring-panel__switch" }, De = { class: "gd-contract-authoring-panel__field" }, Oe = { class: "gd-contract-authoring-panel__field" }, ke = {
33
34
  key: 4,
34
35
  class: "gd-contract-authoring-panel__switch"
35
- }, Te = {
36
+ }, Ae = {
36
37
  key: 5,
37
38
  class: "gd-contract-authoring-panel__field"
38
- }, Ee = { class: "gd-contract-authoring-panel__property-group" }, De = { class: "gd-contract-authoring-panel__group-title" }, Oe = { class: "gd-contract-authoring-panel__fields" }, W = { class: "gd-contract-authoring-panel__field-pair" }, ke = { class: "gd-contract-authoring-panel__field" }, Ae = { class: "gd-contract-authoring-panel__field" }, je = { class: "gd-contract-authoring-panel__switch" }, Me = { class: "gd-contract-authoring-panel__switch" }, Ne = { class: "gd-contract-authoring-panel__field" }, Pe = { class: "gd-contract-authoring-panel__field" }, Fe = { class: "gd-contract-authoring-panel__color" }, Ie = ["value", "disabled"], Le = { class: "gd-contract-authoring-panel__color" }, Re = ["value", "disabled"], ze = { class: "gd-contract-authoring-panel__color" }, Be = ["value", "disabled"], Ve = { class: "gd-contract-authoring-panel__field" }, He = { class: "gd-contract-authoring-panel__field" }, Ue = { class: "gd-contract-authoring-panel__field" }, We = { class: "gd-contract-authoring-panel__danger-zone" }, G = /* @__PURE__ */ f({
39
+ }, je = { class: "gd-contract-authoring-panel__property-group" }, Me = { class: "gd-contract-authoring-panel__group-title" }, Ne = { class: "gd-contract-authoring-panel__fields" }, Pe = { class: "gd-contract-authoring-panel__field-pair" }, Fe = { class: "gd-contract-authoring-panel__field" }, Ie = {
40
+ key: 0,
41
+ class: "gd-contract-authoring-panel__field"
42
+ }, Le = { class: "gd-contract-authoring-panel__meta" }, Re = {
43
+ key: 1,
44
+ class: "gd-contract-authoring-panel__field"
45
+ }, ze = { class: "gd-contract-authoring-panel__switch" }, Be = { class: "gd-contract-authoring-panel__switch" }, Ve = { class: "gd-contract-authoring-panel__field" }, He = { class: "gd-contract-authoring-panel__field" }, Ue = { class: "gd-contract-authoring-panel__color" }, We = ["value", "disabled"], Ge = { class: "gd-contract-authoring-panel__color" }, Ke = ["value", "disabled"], qe = { class: "gd-contract-authoring-panel__color" }, Je = ["value", "disabled"], Ye = { class: "gd-contract-authoring-panel__field" }, Xe = { class: "gd-contract-authoring-panel__field" }, Ze = { class: "gd-contract-authoring-panel__field" }, Qe = { class: "gd-contract-authoring-panel__danger-zone" }, V = /* @__PURE__ */ f({
39
46
  name: "ContractTemplateDesignerInspector",
40
47
  __name: "ContractTemplateDesignerInspector",
41
48
  props: {
@@ -73,376 +80,396 @@ var D = ["aria-label", "aria-expanded"], O = { class: "gd-contract-template-desi
73
80
  "patchBorderStyle",
74
81
  "patchObjectFit"
75
82
  ],
76
- setup(f, { emit: G }) {
77
- let K = f, q = G, J = `gd-contract-inspector-${ae()}`, Y = m("insert"), Ge = [{
83
+ setup(f, { emit: V }) {
84
+ let H = f, U = V, W = `gd-contract-inspector-${se()}`, G = oe("insert"), $e = [{
78
85
  value: "insert",
79
86
  label: "插入控件"
80
87
  }, {
81
88
  value: "properties",
82
89
  label: "控件属性"
83
- }], X = a(() => K.readonly || K.disabled), Ke = a(() => K.selectedVariable ? K.bodyControlToolItems.find((e) => e.type === (K.selectedVariable?.type || "text"))?.label || t(K.selectedVariable.type || "text").label : ""), Z = a(() => K.selectedVariable?.type === "select" || K.selectedVariable?.type === "radio"), qe = a(() => K.selectedVariable?.type === "select" || !!K.selectedVariable?.type?.endsWith("-selector")), Je = a(() => K.selectedVariable?.type === "select" && !!K.selectedVariable.multiple), Ye = a(() => K.selectedVariable?.defaultValue || void 0), Xe = a(() => (K.selectedVariable?.options ?? []).map((e) => ({
90
+ }], K = a(() => e.some((e) => e.value === H.selectedVariable?.format) ? H.selectedVariable?.format : "decimal"), q = a(() => H.readonly || H.disabled), et = a(() => H.selectedVariable ? H.bodyControlToolItems.find((e) => e.type === (H.selectedVariable?.type || "text"))?.label || n(H.selectedVariable.type || "text").label : ""), J = a(() => (!H.selectedVariable?.type || H.selectedVariable.type === "text") && !!H.selectedVariable?.multiline), Y = a(() => H.selectedVariable?.rows || H.defaultMultilineRows), X = a(() => H.selectedVariable?.lineHeight || 28), Z = a(() => H.selectedVariable?.type === "select" || H.selectedVariable?.type === "radio"), tt = a(() => H.selectedVariable?.type === "select" || !!H.selectedVariable?.type?.endsWith("-selector")), nt = a(() => H.selectedVariable?.type === "select" && !!H.selectedVariable.multiple), rt = a(() => H.selectedVariable?.defaultValue || void 0), it = a(() => (H.selectedVariable?.options ?? []).map((e) => ({
84
91
  label: e.label,
85
92
  value: String(e.value)
86
93
  })));
87
- oe(() => K.selectedVariable?.id, (e) => {
88
- Y.value = e ? "properties" : "insert";
94
+ ce(() => H.selectedVariable?.id, (e) => {
95
+ G.value = e ? "properties" : "insert";
89
96
  }, { immediate: !0 });
90
97
  function Q(e) {
91
- K.selectedVariable && !X.value && q("patchVariable", e);
98
+ H.selectedVariable && !q.value && U("patchVariable", e);
92
99
  }
93
100
  function $(e) {
94
- K.selectedVariable && !X.value && q("patchStyle", e);
101
+ H.selectedVariable && !q.value && U("patchStyle", e);
95
102
  }
96
- function Ze(e) {
103
+ function at(e) {
97
104
  Q({ defaultValue: e == null ? "" : String(e) });
98
105
  }
99
- function Qe(e) {
106
+ function ot(e) {
100
107
  let t = { multiple: e };
101
- e && K.selectedVariable?.type === "select" && (t.defaultValue = ""), Q(t);
108
+ e && H.selectedVariable?.type === "select" && (t.defaultValue = ""), Q(t);
102
109
  }
103
- function $e(e) {
104
- let t = e ?? [], n = K.selectedVariable?.defaultValue, r = { options: t };
110
+ function st(e) {
111
+ let t = e ?? [], n = H.selectedVariable?.defaultValue, r = { options: t };
105
112
  n && !t.some((e) => String(e.value) === String(n)) && (r.defaultValue = ""), Q(r);
106
113
  }
107
- function et() {
108
- K.selectedVariable && !X.value && q("duplicateVariable", K.selectedVariable);
114
+ function ct() {
115
+ H.selectedVariable && !q.value && U("duplicateVariable", H.selectedVariable);
109
116
  }
110
- function tt() {
111
- K.selectedVariable && !X.value && q("removeVariable", K.selectedVariable);
117
+ function lt() {
118
+ H.selectedVariable && !q.value && U("removeVariable", H.selectedVariable);
112
119
  }
113
- return (t, a) => (p(), c("aside", {
114
- class: re(["gd-contract-template-designer__inspector gd-contract-authoring-panel", { "is-collapsed": K.collapsed }]),
120
+ return (n, a) => (p(), c("aside", {
121
+ class: ie(["gd-contract-template-designer__inspector gd-contract-authoring-panel", { "is-collapsed": H.collapsed }]),
115
122
  "aria-label": "控件插入与属性"
116
- }, [d(g(T), { title: K.collapsed ? "展开属性栏" : "收起属性栏" }, {
117
- default: v(() => [l("button", {
123
+ }, [d(h(w), { title: H.collapsed ? "展开属性栏" : "收起属性栏" }, {
124
+ default: _(() => [l("button", {
118
125
  type: "button",
119
126
  class: "gd-contract-template-designer__panel-handle gd-contract-authoring-panel__handle",
120
- "aria-label": K.collapsed ? "展开属性栏" : "收起属性栏",
121
- "aria-expanded": !K.collapsed,
122
- onClick: a[0] ||= (e) => q("toggle")
123
- }, [K.collapsed ? (p(), o(g(ue), {
127
+ "aria-label": H.collapsed ? "展开属性栏" : "收起属性栏",
128
+ "aria-expanded": !H.collapsed,
129
+ onClick: a[0] ||= (e) => U("toggle")
130
+ }, [H.collapsed ? (p(), o(h(fe), {
124
131
  key: 0,
125
132
  "aria-hidden": "true"
126
- })) : (p(), o(g(E), {
133
+ })) : (p(), o(h(T), {
127
134
  key: 1,
128
135
  "aria-hidden": "true"
129
- }))], 8, D)]),
136
+ }))], 8, pe)]),
130
137
  _: 1
131
- }, 8, ["title"]), l("div", O, [l("div", k, [
132
- d(r, {
133
- id: J,
134
- modelValue: Y.value,
135
- "onUpdate:modelValue": a[1] ||= (e) => Y.value = e,
136
- items: Ge,
138
+ }, 8, ["title"]), l("div", me, [l("div", E, [
139
+ d(ee, {
140
+ id: W,
141
+ modelValue: G.value,
142
+ "onUpdate:modelValue": a[1] ||= (e) => G.value = e,
143
+ items: $e,
137
144
  label: "控件面板视图"
138
145
  }, null, 8, ["modelValue"]),
139
- y(l("section", {
140
- id: `${J}-panel-insert`,
146
+ v(l("section", {
147
+ id: `${W}-panel-insert`,
141
148
  class: "gd-contract-authoring-panel__view",
142
149
  role: "tabpanel",
143
- "aria-labelledby": `${J}-tab-insert`
144
- }, [d(te, {
145
- items: K.bodyControlToolItems,
146
- readonly: X.value,
147
- onInsertVariable: a[2] ||= (e) => q("insertVariable", e),
148
- onVariableDragStart: a[3] ||= (e, t) => q("variableDragStart", e, t)
149
- }, null, 8, ["items", "readonly"])], 8, A), [[_, Y.value === "insert"]]),
150
- y(l("section", {
151
- id: `${J}-panel-properties`,
150
+ "aria-labelledby": `${W}-tab-insert`
151
+ }, [d(ne, {
152
+ items: H.bodyControlToolItems,
153
+ readonly: q.value,
154
+ onInsertVariable: a[2] ||= (e) => U("insertVariable", e),
155
+ onVariableDragStart: a[3] ||= (e, t) => U("variableDragStart", e, t)
156
+ }, null, 8, ["items", "readonly"])], 8, D), [[g, G.value === "insert"]]),
157
+ v(l("section", {
158
+ id: `${W}-panel-properties`,
152
159
  class: "gd-contract-authoring-panel__view",
153
160
  role: "tabpanel",
154
- "aria-labelledby": `${J}-tab-properties`
155
- }, [l("div", M, [a[31] ||= l("strong", null, "属性", -1), X.value ? (p(), c("small", N, "只读")) : s("", !0)]), K.selectedVariable ? (p(), c("div", {
156
- key: K.selectedVariable.id,
161
+ "aria-labelledby": `${W}-tab-properties`
162
+ }, [l("div", k, [a[32] ||= l("strong", null, "属性", -1), q.value ? (p(), c("small", A, "只读")) : s("", !0)]), H.selectedVariable ? (p(), c("div", {
163
+ key: H.selectedVariable.id,
157
164
  class: "gd-contract-authoring-panel__properties"
158
165
  }, [
159
- l("div", F, [
160
- l("span", I, [(p(), o(ie(g(n)(K.selectedVariable.type))))]),
161
- l("div", L, [l("span", R, h(K.selectedVariable.label), 1), l("small", z, h(Ke.value), 1)]),
162
- d(g(T), { title: "复制变量" }, {
163
- default: v(() => [d(g(b), {
166
+ l("div", M, [
167
+ l("span", N, [(p(), o(ae(h(r)(H.selectedVariable.type))))]),
168
+ l("div", P, [l("span", F, m(H.selectedVariable.label), 1), l("small", I, m(et.value), 1)]),
169
+ d(h(w), { title: "复制变量" }, {
170
+ default: _(() => [d(h(y), {
164
171
  type: "text",
165
- disabled: X.value,
172
+ disabled: q.value,
166
173
  "aria-label": "复制变量",
167
- onClick: et
174
+ onClick: ct
168
175
  }, {
169
- default: v(() => [d(g(ce), { "aria-hidden": "true" })]),
176
+ default: _(() => [d(h(ue), { "aria-hidden": "true" })]),
170
177
  _: 1
171
178
  }, 8, ["disabled"])]),
172
179
  _: 1
173
180
  })
174
181
  ]),
175
- d(ne, {
176
- variable: K.selectedVariable,
177
- variables: K.variables,
178
- readonly: X.value,
182
+ d(re, {
183
+ variable: H.selectedVariable,
184
+ variables: H.variables,
185
+ readonly: q.value,
179
186
  onPatchVariable: Q,
180
- onRenameVariable: a[5] ||= (e) => q("renameVariable", e)
187
+ onRenameVariable: a[5] ||= (e) => U("renameVariable", e)
181
188
  }, null, 8, [
182
189
  "variable",
183
190
  "variables",
184
191
  "readonly"
185
192
  ]),
186
- l("section", B, [a[38] ||= l("h3", { class: "gd-contract-authoring-panel__group-title" }, "基础信息", -1), l("div", V, [
187
- l("label", H, [a[35] ||= l("span", null, "名称", -1), d(g(x), {
188
- value: K.selectedVariable.label,
189
- disabled: X.value,
193
+ l("section", L, [a[39] ||= l("h3", { class: "gd-contract-authoring-panel__group-title" }, "基础信息", -1), l("div", R, [
194
+ l("label", z, [a[36] ||= l("span", null, "名称", -1), d(h(b), {
195
+ value: H.selectedVariable.label,
196
+ disabled: q.value,
190
197
  "aria-label": "变量名称",
191
198
  onChange: a[6] ||= (e) => Q({ label: e.target.value })
192
199
  }, null, 8, ["value", "disabled"])]),
193
- l("label", U, [a[36] ||= l("span", null, "占位文案", -1), d(g(x), {
194
- value: K.selectedVariable.placeholder,
195
- disabled: X.value,
200
+ l("label", he, [a[37] ||= l("span", null, "占位文案", -1), d(h(b), {
201
+ value: H.selectedVariable.placeholder,
202
+ disabled: q.value,
196
203
  "aria-label": "占位文案",
197
204
  onChange: a[7] ||= (e) => Q({ placeholder: e.target.value })
198
205
  }, null, 8, ["value", "disabled"])]),
199
- Je.value ? s("", !0) : (p(), c("label", de, [a[37] ||= l("span", null, "默认值", -1), Z.value ? (p(), o(g(C), {
206
+ nt.value ? s("", !0) : (p(), c("label", ge, [a[38] ||= l("span", null, "默认值", -1), Z.value ? (p(), o(h(S), {
200
207
  key: 0,
201
- value: Ye.value,
202
- options: Xe.value,
203
- disabled: X.value,
208
+ value: rt.value,
209
+ options: it.value,
210
+ disabled: q.value,
204
211
  "allow-clear": "",
205
212
  placeholder: "请选择",
206
213
  "aria-label": "默认值",
207
- onChange: Ze
214
+ onChange: at
208
215
  }, null, 8, [
209
216
  "value",
210
217
  "options",
211
218
  "disabled"
212
- ])) : (p(), o(g(x), {
219
+ ])) : J.value ? (p(), o(h(b).TextArea, {
213
220
  key: 1,
214
- value: K.selectedVariable.defaultValue,
215
- disabled: X.value,
221
+ value: H.selectedVariable.defaultValue,
222
+ rows: Y.value,
223
+ disabled: q.value,
216
224
  "aria-label": "默认值",
217
- onChange: a[8] ||= (e) => Q({ defaultValue: e.target.value })
225
+ "onUpdate:value": a[8] ||= (e) => Q({ defaultValue: e })
226
+ }, null, 8, [
227
+ "value",
228
+ "rows",
229
+ "disabled"
230
+ ])) : (p(), o(h(b), {
231
+ key: 2,
232
+ value: H.selectedVariable.defaultValue,
233
+ disabled: q.value,
234
+ "aria-label": "默认值",
235
+ onChange: a[9] ||= (e) => Q({ defaultValue: e.target.value })
218
236
  }, null, 8, ["value", "disabled"]))]))
219
237
  ])]),
220
- l("details", fe, [l("summary", pe, [d(g(E), {
238
+ l("details", _e, [l("summary", ve, [d(h(T), {
221
239
  class: "gd-contract-authoring-panel__chevron",
222
240
  "aria-hidden": "true"
223
- }), a[39] ||= l("span", null, "填写规则", -1)]), l("div", me, [
224
- l("label", he, [a[40] ||= l("span", null, "必填", -1), d(g(w), {
225
- checked: K.selectedVariable.required,
226
- disabled: X.value,
241
+ }), a[40] ||= l("span", null, "填写规则", -1)]), l("div", ye, [
242
+ l("label", B, [a[41] ||= l("span", null, "必填", -1), d(h(C), {
243
+ checked: H.selectedVariable.required,
244
+ disabled: q.value,
227
245
  "aria-label": "必填",
228
- onChange: a[9] ||= (e) => Q({ required: !!e })
246
+ onChange: a[10] ||= (e) => Q({ required: !!e })
229
247
  }, null, 8, ["checked", "disabled"])]),
230
- !K.selectedVariable.type || K.selectedVariable.type === "text" ? (p(), c(i, { key: 0 }, [l("label", ge, [a[41] ||= l("span", null, "多行", -1), d(g(w), {
231
- checked: !!K.selectedVariable.multiline,
232
- disabled: X.value,
248
+ !H.selectedVariable.type || H.selectedVariable.type === "text" ? (p(), c(i, { key: 0 }, [l("label", be, [a[42] ||= l("span", null, "多行", -1), d(h(C), {
249
+ checked: !!H.selectedVariable.multiline,
250
+ disabled: q.value,
233
251
  "aria-label": "多行",
234
- onChange: a[10] ||= (e) => q("patchMultiline", !!e)
235
- }, null, 8, ["checked", "disabled"])]), K.selectedVariable.multiline ? (p(), c("label", _e, [a[42] ||= l("span", null, "行数", -1), d(g(S), {
236
- value: K.selectedVariable.rows || K.defaultMultilineRows,
252
+ onChange: a[11] ||= (e) => U("patchMultiline", !!e)
253
+ }, null, 8, ["checked", "disabled"])]), H.selectedVariable.multiline ? (p(), c("label", xe, [a[43] ||= l("span", null, "行数", -1), d(h(x), {
254
+ value: H.selectedVariable.rows || H.defaultMultilineRows,
237
255
  min: 2,
238
256
  max: 12,
239
- disabled: X.value,
257
+ disabled: q.value,
240
258
  "aria-label": "行数",
241
- onChange: a[11] ||= (e) => q("patchRows", e)
259
+ onChange: a[12] ||= (e) => U("patchRows", e)
242
260
  }, null, 8, ["value", "disabled"])])) : s("", !0)], 64)) : s("", !0),
243
- K.selectedVariable.type === "date" ? (p(), c("label", ve, [a[43] ||= l("span", null, "日期格式", -1), d(g(x), {
244
- value: K.selectedVariable.format,
245
- disabled: X.value,
261
+ H.selectedVariable.type === "date" ? (p(), c("label", Se, [a[44] ||= l("span", null, "日期格式", -1), d(h(b), {
262
+ value: H.selectedVariable.format,
263
+ disabled: q.value,
246
264
  "aria-label": "日期格式",
247
- onChange: a[12] ||= (e) => Q({ format: e.target.value })
265
+ onChange: a[13] ||= (e) => Q({ format: e.target.value })
248
266
  }, null, 8, ["value", "disabled"])])) : s("", !0),
249
- K.selectedVariable.type === "number" ? (p(), c(i, { key: 2 }, [
250
- l("label", ye, [a[44] ||= l("span", null, "数字格式", -1), d(g(x), {
251
- value: K.selectedVariable.format,
252
- disabled: X.value,
253
- "aria-label": "数字格式",
254
- onChange: a[13] ||= (e) => Q({ format: e.target.value })
255
- }, null, 8, ["value", "disabled"])]),
256
- l("label", be, [a[45] ||= l("span", null, "小数位", -1), d(g(S), {
257
- value: K.selectedVariable.precision,
267
+ H.selectedVariable.type === "number" ? (p(), c(i, { key: 2 }, [
268
+ l("label", Ce, [
269
+ a[45] ||= l("span", null, "数字格式", -1),
270
+ d(h(S), {
271
+ value: K.value,
272
+ options: h(e),
273
+ disabled: q.value,
274
+ "aria-label": "数字格式",
275
+ onChange: a[14] ||= (e) => Q({ format: String(e) })
276
+ }, null, 8, [
277
+ "value",
278
+ "options",
279
+ "disabled"
280
+ ]),
281
+ K.value === "percent" ? (p(), c("span", we, "按比例填写,例如 0.125 显示为 12.5%。")) : s("", !0)
282
+ ]),
283
+ l("label", Te, [a[46] ||= l("span", null, "小数位", -1), d(h(x), {
284
+ value: H.selectedVariable.precision,
258
285
  min: 0,
259
286
  max: 6,
260
- disabled: X.value,
287
+ disabled: q.value,
261
288
  "aria-label": "小数位",
262
- onChange: a[14] ||= (e) => Q({ precision: typeof e == "number" ? e : void 0 })
289
+ onChange: a[15] ||= (e) => Q({ precision: typeof e == "number" ? e : void 0 })
263
290
  }, null, 8, ["value", "disabled"])]),
264
- l("label", xe, [a[46] ||= l("span", null, "千分位", -1), d(g(w), {
265
- checked: K.selectedVariable.useGrouping !== !1,
266
- disabled: X.value,
291
+ l("label", Ee, [a[47] ||= l("span", null, "千分位", -1), d(h(C), {
292
+ checked: H.selectedVariable.useGrouping === !0,
293
+ disabled: q.value,
267
294
  "aria-label": "千分位",
268
- onChange: a[15] ||= (e) => Q({ useGrouping: !!e })
295
+ onChange: a[16] ||= (e) => Q({ useGrouping: !!e })
269
296
  }, null, 8, ["checked", "disabled"])])
270
297
  ], 64)) : s("", !0),
271
- K.selectedVariable.type === "checkbox" ? (p(), c(i, { key: 3 }, [l("label", Se, [a[47] ||= l("span", null, "勾选文本", -1), d(g(x), {
272
- value: K.selectedVariable.checkedText,
273
- disabled: X.value,
298
+ H.selectedVariable.type === "checkbox" ? (p(), c(i, { key: 3 }, [l("label", De, [a[48] ||= l("span", null, "勾选文本", -1), d(h(b), {
299
+ value: H.selectedVariable.checkedText,
300
+ disabled: q.value,
274
301
  "aria-label": "勾选文本",
275
- onChange: a[16] ||= (e) => Q({ checkedText: e.target.value })
276
- }, null, 8, ["value", "disabled"])]), l("label", Ce, [a[48] ||= l("span", null, "未选文本", -1), d(g(x), {
277
- value: K.selectedVariable.uncheckedText,
278
- disabled: X.value,
302
+ onChange: a[17] ||= (e) => Q({ checkedText: e.target.value })
303
+ }, null, 8, ["value", "disabled"])]), l("label", Oe, [a[49] ||= l("span", null, "未选文本", -1), d(h(b), {
304
+ value: H.selectedVariable.uncheckedText,
305
+ disabled: q.value,
279
306
  "aria-label": "未选文本",
280
- onChange: a[17] ||= (e) => Q({ uncheckedText: e.target.value })
307
+ onChange: a[18] ||= (e) => Q({ uncheckedText: e.target.value })
281
308
  }, null, 8, ["value", "disabled"])])], 64)) : s("", !0),
282
- qe.value ? (p(), c("label", we, [a[49] ||= l("span", null, "允许多选", -1), d(g(w), {
283
- checked: !!K.selectedVariable.multiple,
284
- disabled: X.value,
309
+ tt.value ? (p(), c("label", ke, [a[50] ||= l("span", null, "允许多选", -1), d(h(C), {
310
+ checked: !!H.selectedVariable.multiple,
311
+ disabled: q.value,
285
312
  "aria-label": "允许多选",
286
- onChange: a[18] ||= (e) => Qe(!!e)
313
+ onChange: a[19] ||= (e) => ot(!!e)
287
314
  }, null, 8, ["checked", "disabled"])])) : s("", !0),
288
- Z.value ? (p(), c("div", Te, [a[50] ||= l("span", null, "选项", -1), (p(), o(ee, {
289
- key: K.selectedVariable.id,
290
- options: K.selectedVariable.options ?? [],
291
- "variable-type": K.selectedVariable.type || "select",
292
- readonly: X.value,
293
- onChange: $e
315
+ Z.value ? (p(), c("div", Ae, [a[51] ||= l("span", null, "选项", -1), (p(), o(te, {
316
+ key: H.selectedVariable.id,
317
+ options: H.selectedVariable.options ?? [],
318
+ "variable-type": H.selectedVariable.type || "select",
319
+ readonly: q.value,
320
+ onChange: st
294
321
  }, null, 8, [
295
322
  "options",
296
323
  "variable-type",
297
324
  "readonly"
298
325
  ]))])) : s("", !0)
299
326
  ])]),
300
- l("details", Ee, [l("summary", De, [d(g(E), {
327
+ l("details", je, [l("summary", Me, [d(h(T), {
301
328
  class: "gd-contract-authoring-panel__chevron",
302
329
  "aria-hidden": "true"
303
- }), a[51] ||= l("span", null, "外观", -1)]), l("div", Oe, [
304
- l("div", W, [l("label", ke, [a[52] ||= l("span", null, [u("宽度 "), l("small", { class: "gd-contract-authoring-panel__meta" }, "px")], -1), d(g(S), {
305
- value: K.selectedVariable.width,
330
+ }), a[52] ||= l("span", null, "外观", -1)]), l("div", Ne, [
331
+ l("div", Pe, [l("label", Fe, [a[53] ||= l("span", null, [u("宽度 "), l("small", { class: "gd-contract-authoring-panel__meta" }, "px")], -1), d(h(x), {
332
+ value: H.selectedVariable.width,
306
333
  min: 48,
307
- max: K.selectedVariableWidthMax,
308
- disabled: X.value,
334
+ max: H.selectedVariableWidthMax,
335
+ disabled: q.value,
309
336
  "aria-label": "控件宽度",
310
- onChange: a[19] ||= (e) => Q({ width: Number(e || 48) })
337
+ onChange: a[20] ||= (e) => Q({ width: Number(e || 48) })
311
338
  }, null, 8, [
312
339
  "value",
313
340
  "max",
314
341
  "disabled"
315
- ])]), l("label", Ae, [a[53] ||= l("span", null, [u("高度 "), l("small", { class: "gd-contract-authoring-panel__meta" }, "px")], -1), d(g(S), {
316
- value: K.selectedVariable.height,
342
+ ])]), J.value ? (p(), c("div", Ie, [a[54] ||= l("span", null, "高度", -1), l("span", Le, m(Y.value) + "行×" + m(X.value) + "px,正文高度" + m(Y.value * X.value) + "px", 1)])) : (p(), c("label", Re, [a[55] ||= l("span", null, [u("高度 "), l("small", { class: "gd-contract-authoring-panel__meta" }, "px")], -1), d(h(x), {
343
+ value: H.selectedVariable.height,
317
344
  min: 24,
318
- max: K.selectedVariableHeightMax,
319
- disabled: X.value,
345
+ max: H.selectedVariableHeightMax,
346
+ disabled: q.value,
320
347
  "aria-label": "控件高度",
321
- onChange: a[20] ||= (e) => Q({ height: Number(e || 24) })
348
+ onChange: a[21] ||= (e) => Q({ height: Number(e || 24) })
322
349
  }, null, 8, [
323
350
  "value",
324
351
  "max",
325
352
  "disabled"
326
- ])])]),
327
- l("label", je, [a[54] ||= l("span", null, "边框", -1), d(g(w), {
328
- checked: !!K.selectedVariable.style?.border,
329
- disabled: X.value,
353
+ ])]))]),
354
+ l("label", ze, [a[56] ||= l("span", null, "边框", -1), d(h(C), {
355
+ checked: !!H.selectedVariable.style?.border,
356
+ disabled: q.value,
330
357
  "aria-label": "边框",
331
- onChange: a[21] ||= (e) => $({ border: !!e })
358
+ onChange: a[22] ||= (e) => $({ border: !!e })
332
359
  }, null, 8, ["checked", "disabled"])]),
333
- l("label", Me, [a[55] ||= l("span", null, "下划线", -1), d(g(w), {
334
- checked: !!K.selectedVariable.style?.underline,
335
- disabled: X.value,
360
+ l("label", Be, [a[57] ||= l("span", null, "下划线", -1), d(h(C), {
361
+ checked: !!H.selectedVariable.style?.underline,
362
+ disabled: q.value,
336
363
  "aria-label": "下划线",
337
- onChange: a[22] ||= (e) => $({ underline: !!e })
364
+ onChange: a[23] ||= (e) => $({ underline: !!e })
338
365
  }, null, 8, ["checked", "disabled"])]),
339
- l("label", Ne, [a[56] ||= l("span", null, "字体", -1), d(g(C), {
340
- value: K.currentVariableFontFamily,
341
- options: K.fontFamilySelectOptions,
342
- disabled: X.value,
366
+ l("label", Ve, [a[58] ||= l("span", null, "字体", -1), d(h(S), {
367
+ value: H.currentVariableFontFamily,
368
+ options: H.fontFamilySelectOptions,
369
+ disabled: q.value,
343
370
  "aria-label": "控件字体",
344
- onChange: a[23] ||= (e) => q("patchFontFamily", e)
371
+ onChange: a[24] ||= (e) => U("patchFontFamily", e)
345
372
  }, null, 8, [
346
373
  "value",
347
374
  "options",
348
375
  "disabled"
349
376
  ])]),
350
- l("label", Pe, [a[57] ||= l("span", null, "字号", -1), d(g(S), {
351
- value: K.selectedVariable.style?.fontSize,
352
- min: K.minFontSize,
353
- max: K.maxFontSize,
354
- disabled: X.value,
377
+ l("label", He, [a[59] ||= l("span", null, "字号", -1), d(h(x), {
378
+ value: H.selectedVariable.style?.fontSize,
379
+ min: H.minFontSize,
380
+ max: H.maxFontSize,
381
+ disabled: q.value,
355
382
  "aria-label": "控件字号",
356
- onChange: a[24] ||= (e) => q("patchFontSize", e)
383
+ onChange: a[25] ||= (e) => U("patchFontSize", e)
357
384
  }, null, 8, [
358
385
  "value",
359
386
  "min",
360
387
  "max",
361
388
  "disabled"
362
389
  ])]),
363
- l("label", Fe, [a[58] ||= l("span", null, "颜色", -1), l("input", {
390
+ l("label", Ue, [a[60] ||= l("span", null, "颜色", -1), l("input", {
364
391
  type: "color",
365
- value: K.selectedVariable.style?.color || g(e).color,
366
- disabled: X.value,
392
+ value: H.selectedVariable.style?.color || h(t).color,
393
+ disabled: q.value,
367
394
  "aria-label": "控件文字颜色",
368
- onInput: a[25] ||= (e) => $({ color: e.target.value })
369
- }, null, 40, Ie)]),
370
- l("label", Le, [a[59] ||= l("span", null, "占位颜色", -1), l("input", {
395
+ onInput: a[26] ||= (e) => $({ color: e.target.value })
396
+ }, null, 40, We)]),
397
+ l("label", Ge, [a[61] ||= l("span", null, "占位颜色", -1), l("input", {
371
398
  type: "color",
372
- value: K.selectedVariable.style?.placeholderColor || g(e).placeholderColor,
373
- disabled: X.value,
399
+ value: H.selectedVariable.style?.placeholderColor || h(t).placeholderColor,
400
+ disabled: q.value,
374
401
  "aria-label": "控件占位颜色",
375
- onInput: a[26] ||= (e) => $({ placeholderColor: e.target.value })
376
- }, null, 40, Re)]),
377
- l("label", ze, [a[60] ||= l("span", null, "线条颜色", -1), l("input", {
402
+ onInput: a[27] ||= (e) => $({ placeholderColor: e.target.value })
403
+ }, null, 40, Ke)]),
404
+ l("label", qe, [a[62] ||= l("span", null, "线条颜色", -1), l("input", {
378
405
  type: "color",
379
- value: K.selectedVariable.style?.lineColor || g(e).lineColor,
380
- disabled: X.value,
406
+ value: H.selectedVariable.style?.lineColor || h(t).lineColor,
407
+ disabled: q.value,
381
408
  "aria-label": "控件线条颜色",
382
- onInput: a[27] ||= (e) => $({ lineColor: e.target.value })
383
- }, null, 40, Be)]),
384
- l("label", Ve, [a[61] ||= l("span", null, "文字对齐", -1), d(g(C), {
385
- value: K.selectedVariable.style?.textAlign || "left",
386
- options: K.textAlignOptions,
387
- disabled: X.value,
409
+ onInput: a[28] ||= (e) => $({ lineColor: e.target.value })
410
+ }, null, 40, Je)]),
411
+ l("label", Ye, [a[63] ||= l("span", null, "文字对齐", -1), d(h(S), {
412
+ value: H.selectedVariable.style?.textAlign || "left",
413
+ options: H.textAlignOptions,
414
+ disabled: q.value,
388
415
  "aria-label": "控件文字对齐",
389
- onChange: a[28] ||= (e) => q("patchTextAlign", e)
416
+ onChange: a[29] ||= (e) => U("patchTextAlign", e)
390
417
  }, null, 8, [
391
418
  "value",
392
419
  "options",
393
420
  "disabled"
394
421
  ])]),
395
- K.selectedVariable.type === "image" ? (p(), c(i, { key: 0 }, [l("label", He, [a[62] ||= l("span", null, "边框样式", -1), d(g(C), {
396
- value: K.selectedVariable.style?.borderStyle || "dashed",
397
- options: K.borderStyleOptions,
398
- disabled: X.value,
422
+ H.selectedVariable.type === "image" ? (p(), c(i, { key: 0 }, [l("label", Xe, [a[64] ||= l("span", null, "边框样式", -1), d(h(S), {
423
+ value: H.selectedVariable.style?.borderStyle || "dashed",
424
+ options: H.borderStyleOptions,
425
+ disabled: q.value,
399
426
  "aria-label": "图片边框样式",
400
- onChange: a[29] ||= (e) => q("patchBorderStyle", e)
427
+ onChange: a[30] ||= (e) => U("patchBorderStyle", e)
401
428
  }, null, 8, [
402
429
  "value",
403
430
  "options",
404
431
  "disabled"
405
- ])]), l("label", Ue, [a[63] ||= l("span", null, "图片适配", -1), d(g(C), {
406
- value: K.selectedVariable.style?.objectFit || "contain",
407
- options: K.objectFitOptions,
408
- disabled: X.value,
432
+ ])]), l("label", Ze, [a[65] ||= l("span", null, "图片适配", -1), d(h(S), {
433
+ value: H.selectedVariable.style?.objectFit || "contain",
434
+ options: H.objectFitOptions,
435
+ disabled: q.value,
409
436
  "aria-label": "图片适配",
410
- onChange: a[30] ||= (e) => q("patchObjectFit", e)
437
+ onChange: a[31] ||= (e) => U("patchObjectFit", e)
411
438
  }, null, 8, [
412
439
  "value",
413
440
  "options",
414
441
  "disabled"
415
442
  ])])], 64)) : s("", !0)
416
443
  ])]),
417
- l("div", We, [d(g(se), {
444
+ l("div", Qe, [d(h(le), {
418
445
  title: "删除此变量及其全部引用?",
419
446
  "ok-text": "删除变量",
420
447
  "cancel-text": "取消",
421
448
  "ok-button-props": { danger: !0 },
422
- disabled: X.value,
423
- onConfirm: tt
449
+ disabled: q.value,
450
+ onConfirm: lt
424
451
  }, {
425
- default: v(() => [d(g(b), {
452
+ default: _(() => [d(h(y), {
426
453
  type: "text",
427
454
  danger: "",
428
- disabled: X.value,
455
+ disabled: q.value,
429
456
  "aria-label": "删除变量"
430
457
  }, {
431
- default: v(() => [d(g(le), { "aria-hidden": "true" }), a[64] ||= u("删除变量", -1)]),
458
+ default: _(() => [d(h(de), { "aria-hidden": "true" }), a[66] ||= u("删除变量", -1)]),
432
459
  _: 1
433
460
  }, 8, ["disabled"])]),
434
461
  _: 1
435
462
  }, 8, ["disabled"])])
436
- ])) : (p(), c("div", P, [
437
- a[33] ||= l("span", null, "先选择一个正文变量", -1),
438
- a[34] ||= l("small", { class: "gd-contract-authoring-panel__meta" }, "点击正文控件,或从左侧「变量」中定位。", -1),
439
- d(g(b), { onClick: a[4] ||= (e) => Y.value = "insert" }, {
440
- default: v(() => [...a[32] ||= [u("前往插入控件", -1)]]),
463
+ ])) : (p(), c("div", j, [
464
+ a[34] ||= l("span", null, "先选择一个正文变量", -1),
465
+ a[35] ||= l("small", { class: "gd-contract-authoring-panel__meta" }, "点击正文控件,或从左侧「变量」中定位。", -1),
466
+ d(h(y), { onClick: a[4] ||= (e) => G.value = "insert" }, {
467
+ default: _(() => [...a[33] ||= [u("前往插入控件", -1)]]),
441
468
  _: 1
442
469
  })
443
- ]))], 8, j), [[_, Y.value === "properties"]])
470
+ ]))], 8, O), [[g, G.value === "properties"]])
444
471
  ])])], 2));
445
472
  }
446
473
  });
447
474
  //#endregion
448
- export { G as default };
475
+ export { V as default };