@guodun/antdv 1.5.1 → 1.5.3
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/style/index.css +1 -1
- package/dist/es/components/pro-contract-template-designer/src/ContractPrintIframe.mjs +3 -5
- package/dist/es/components/pro-contract-template-designer/src/ContractPrintIframe.vue.mjs +7 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.mjs +190 -169
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.mjs +43 -43
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +114 -98
- package/dist/es/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.mjs +29 -18
- package/dist/es/components/pro-contract-template-designer/src/extensions/editor-extensions.mjs +4 -1
- package/dist/es/components/pro-contract-template-designer/src/extensions/word-paste.mjs +62 -34
- package/dist/es/components/pro-contract-template-designer/src/utils/clipboard.mjs +24 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/toolbar-overflow.mjs +4 -1
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/components/contract-signing-location/style/index.css +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractPrintIframe.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractPrintIframe.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/editor-extensions.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/extensions/word-paste.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/clipboard.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/toolbar-overflow.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/style/index.css +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/pro-contract-template-designer/src/ContractPrintIframe.vue.d.ts +1 -1
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerToolbar.vue.d.ts +2 -1
- package/dist/types/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.d.ts +1 -1
- package/dist/types/components/pro-contract-template-designer/src/extensions/editor-extensions.d.ts +2 -0
- package/dist/types/components/pro-contract-template-designer/src/extensions/word-paste.d.ts +2 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/clipboard.d.ts +7 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/toolbar-overflow.d.ts +2 -2
- package/package.json +1 -1
- package/dist/es/components/pro-contract-template-designer/src/ContractPrintIframe.vue_vue_type_style_index_0_scoped_a9912ff0_lang.css +0 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractPrintIframe.vue_vue_type_style_index_0_scoped_a9912ff0_lang.css +0 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { writeContractClipboardText as e } from "./utils/clipboard.mjs";
|
|
2
|
+
import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, openBlock as c, ref as l, toDisplayString as u, unref as d, watch as f, withCtx as p } from "vue";
|
|
3
|
+
import { Button as m, Modal as h, Tooltip as g, message as _ } from "ant-design-vue";
|
|
4
|
+
import { CheckOutlined as v, CopyOutlined as y } from "@ant-design/icons-vue";
|
|
4
5
|
//#region src/components/pro-contract-template-designer/src/ContractTemplateVariableDataModal.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
6
|
+
var b = { class: "gd-contract-template-designer__variable-data-grid" }, x = { class: "gd-contract-template-designer__variable-data-section" }, S = { class: "gd-contract-template-designer__variable-data-section-head" }, C = { class: "gd-contract-template-designer__variable-data-code" }, w = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "gd-contract-template-designer__variable-data-error"
|
|
8
|
-
},
|
|
9
|
+
}, T = { class: "gd-contract-template-designer__variable-data-section" }, E = { class: "gd-contract-template-designer__variable-data-section-head" }, D = { class: "gd-contract-template-designer__variable-data-code" }, O = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "gd-contract-template-designer__variable-data-error"
|
|
11
|
-
},
|
|
12
|
+
}, k = /* @__PURE__ */ s({
|
|
12
13
|
__name: "ContractTemplateVariableDataModal",
|
|
13
14
|
props: {
|
|
14
15
|
open: { type: Boolean },
|
|
@@ -16,47 +17,46 @@ var y = { class: "gd-contract-template-designer__variable-data-grid" }, b = { cl
|
|
|
16
17
|
fileName: {}
|
|
17
18
|
},
|
|
18
19
|
emits: ["update:open", "cancel"],
|
|
19
|
-
setup(
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
e || (
|
|
20
|
+
setup(s, { emit: k }) {
|
|
21
|
+
let A = s, j = k, M = l(), N = l(), P = l(""), F = l(), I = t(() => JSON.stringify(A.data.values, null, 2)), L = t(() => JSON.stringify(A.data.variables, null, 2));
|
|
22
|
+
f(() => A.open, (e) => {
|
|
23
|
+
e || (M.value = void 0, N.value = void 0, P.value = "", F.value = void 0);
|
|
23
24
|
});
|
|
24
|
-
async function
|
|
25
|
-
let
|
|
26
|
-
|
|
25
|
+
async function R(t) {
|
|
26
|
+
let n = t === "values" ? I.value : L.value;
|
|
27
|
+
M.value = t, N.value = void 0, P.value = "", F.value = void 0;
|
|
27
28
|
try {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
N.value = `复制失败:${n}`, P.value = e, g.error(`复制失败:${n}`);
|
|
29
|
+
await e(n), N.value = t, _.success(t === "values" ? "控件值对象已复制" : "控件变量定义已复制");
|
|
30
|
+
} catch (e) {
|
|
31
|
+
let n = e instanceof Error ? e.message : "未知错误";
|
|
32
|
+
P.value = `复制失败:${n}`, F.value = t, _.error(`复制失败:${n}`);
|
|
33
33
|
} finally {
|
|
34
|
-
|
|
34
|
+
M.value = void 0;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
return (e,
|
|
38
|
-
open:
|
|
39
|
-
title:
|
|
37
|
+
return (e, t) => (c(), n(d(h), {
|
|
38
|
+
open: s.open,
|
|
39
|
+
title: s.fileName ? `控件变量 · ${s.fileName}` : "控件变量",
|
|
40
40
|
width: "min(1100px, calc(100vw - 48px))",
|
|
41
41
|
centered: "",
|
|
42
42
|
footer: null,
|
|
43
43
|
"wrap-class-name": "gd-contract-template-designer__variable-data-modal",
|
|
44
|
-
"onUpdate:open":
|
|
45
|
-
onCancel:
|
|
44
|
+
"onUpdate:open": t[2] ||= (e) => j("update:open", e),
|
|
45
|
+
onCancel: t[3] ||= (e) => j("cancel")
|
|
46
46
|
}, {
|
|
47
|
-
default:
|
|
48
|
-
|
|
49
|
-
default:
|
|
47
|
+
default: p(() => [a("div", b, [a("section", x, [
|
|
48
|
+
a("div", S, [t[4] ||= a("div", null, [a("strong", null, "接口请求值"), a("small", null, "按控件 key 生成,可直接作为请求 body")], -1), o(d(g), { title: "复制接口请求值" }, {
|
|
49
|
+
default: p(() => [o(d(m), {
|
|
50
50
|
size: "small",
|
|
51
51
|
class: "gd-contract-template-designer__icon-button",
|
|
52
|
-
loading:
|
|
52
|
+
loading: M.value === "values",
|
|
53
53
|
"aria-label": "复制接口请求值",
|
|
54
|
-
onClick:
|
|
54
|
+
onClick: t[0] ||= (e) => R("values")
|
|
55
55
|
}, {
|
|
56
|
-
default:
|
|
56
|
+
default: p(() => [N.value === "values" ? (c(), n(d(v), {
|
|
57
57
|
key: 1,
|
|
58
58
|
"aria-hidden": "true"
|
|
59
|
-
})) : (
|
|
59
|
+
})) : (c(), n(d(y), {
|
|
60
60
|
key: 0,
|
|
61
61
|
"aria-hidden": "true"
|
|
62
62
|
}))]),
|
|
@@ -64,21 +64,21 @@ var y = { class: "gd-contract-template-designer__variable-data-grid" }, b = { cl
|
|
|
64
64
|
}, 8, ["loading"])]),
|
|
65
65
|
_: 1
|
|
66
66
|
})]),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
]),
|
|
70
|
-
|
|
71
|
-
default:
|
|
67
|
+
a("pre", C, u(I.value), 1),
|
|
68
|
+
P.value && F.value === "values" ? (c(), i("small", w, u(P.value), 1)) : r("", !0)
|
|
69
|
+
]), a("section", T, [
|
|
70
|
+
a("div", E, [t[5] ||= a("div", null, [a("strong", null, "控件变量定义"), a("small", null, "当前文件完整 variables 数组")], -1), o(d(g), { title: "复制控件变量定义" }, {
|
|
71
|
+
default: p(() => [o(d(m), {
|
|
72
72
|
size: "small",
|
|
73
73
|
class: "gd-contract-template-designer__icon-button",
|
|
74
|
-
loading:
|
|
74
|
+
loading: M.value === "variables",
|
|
75
75
|
"aria-label": "复制控件变量定义",
|
|
76
|
-
onClick:
|
|
76
|
+
onClick: t[1] ||= (e) => R("variables")
|
|
77
77
|
}, {
|
|
78
|
-
default:
|
|
78
|
+
default: p(() => [N.value === "variables" ? (c(), n(d(v), {
|
|
79
79
|
key: 1,
|
|
80
80
|
"aria-hidden": "true"
|
|
81
|
-
})) : (
|
|
81
|
+
})) : (c(), n(d(y), {
|
|
82
82
|
key: 0,
|
|
83
83
|
"aria-hidden": "true"
|
|
84
84
|
}))]),
|
|
@@ -86,12 +86,12 @@ var y = { class: "gd-contract-template-designer__variable-data-grid" }, b = { cl
|
|
|
86
86
|
}, 8, ["loading"])]),
|
|
87
87
|
_: 1
|
|
88
88
|
})]),
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
a("pre", D, u(L.value), 1),
|
|
90
|
+
P.value && F.value === "variables" ? (c(), i("small", O, u(P.value), 1)) : r("", !0)
|
|
91
91
|
])])]),
|
|
92
92
|
_: 1
|
|
93
93
|
}, 8, ["open", "title"]));
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
//#endregion
|
|
97
|
-
export {
|
|
97
|
+
export { k as default };
|