sy-form-designer 1.0.0
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/_commonjsHelpers-C6fGbg64.js +6 -0
- package/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/designer-DsmFhyc-.js +198 -0
- package/index-BFhlK9cb.js +39 -0
- package/index-CKi_slLG.js +1220 -0
- package/index-CPJTgrJ5.js +228 -0
- package/index-CiII3mIY.js +350 -0
- package/index-CsmEJRUU.js +2433 -0
- package/index.css +1 -0
- package/index.js +5 -0
- package/index.umd.cjs +1011 -0
- package/package.json +15 -0
- package/render-CfYxuuCz.js +958 -0
- package/settings-Cc6phwii.js +14907 -0
- package/vite.svg +1 -0
- package/vue-i18n-CiM3E4ph.js +3113 -0
- package/widgets-BHbptXKj.js +90 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { mergeModels as B, useModel as R, ref as i, onMounted as E, provide as C, resolveComponent as n, createElementBlock as P, openBlock as N, createVNode as o, withCtx as t, createElementVNode as p, createTextVNode as r, createBlock as $, createCommentVNode as z } from "vue";
|
|
2
|
+
import { S as A, _ as G } from "./settings-Cc6phwii.js";
|
|
3
|
+
const H = { class: "form-designer" }, L = { class: "toolbar-container" }, T = {
|
|
4
|
+
class: "right-toolbar",
|
|
5
|
+
style: { float: "right", display: "flex", "line-height": "42px" }
|
|
6
|
+
}, q = { class: "right-toolbar-con" }, D = { class: "dialog-footer" }, Q = {
|
|
7
|
+
__name: "designer",
|
|
8
|
+
props: /* @__PURE__ */ B({
|
|
9
|
+
mode: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: () => "edit"
|
|
12
|
+
}
|
|
13
|
+
}, {
|
|
14
|
+
conf: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default: () => {
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
confModifiers: {}
|
|
20
|
+
}),
|
|
21
|
+
emits: ["update:conf"],
|
|
22
|
+
setup(c) {
|
|
23
|
+
const a = R(c, "conf"), u = i(null), v = i(null), f = i(""), S = i({
|
|
24
|
+
fontSize: "14px",
|
|
25
|
+
// 设置字体大小
|
|
26
|
+
showPrintMargin: !1,
|
|
27
|
+
// 是否显示打印边距
|
|
28
|
+
enableLiveAutocompletion: !0
|
|
29
|
+
// 启用实时自动补全功能
|
|
30
|
+
}), s = i(!1), k = () => {
|
|
31
|
+
f.value = JSON.stringify(a.value, null, 2), s.value = !0;
|
|
32
|
+
}, w = () => {
|
|
33
|
+
a.value = JSON.parse(f.value), s.value = !1;
|
|
34
|
+
}, _ = i({}), m = i(!1), J = () => {
|
|
35
|
+
_.value = JSON.parse(JSON.stringify(a.value)), m.value = !0;
|
|
36
|
+
};
|
|
37
|
+
return E(() => {
|
|
38
|
+
}), C("renderConf", a), C("designerRender", v), (F, e) => {
|
|
39
|
+
const O = n("sy-widgets"), g = n("el-aside"), d = n("el-button"), y = n("el-button-group"), U = n("el-header"), V = n("sy-render"), M = n("el-scrollbar"), j = n("el-main"), x = n("el-container"), b = n("el-dialog");
|
|
40
|
+
return N(), P("div", H, [
|
|
41
|
+
o(x, null, {
|
|
42
|
+
default: t(() => [
|
|
43
|
+
o(g, {
|
|
44
|
+
class: "aside-component",
|
|
45
|
+
style: { display: "flex", "flex-direction": "column" }
|
|
46
|
+
}, {
|
|
47
|
+
default: t(() => [
|
|
48
|
+
o(O)
|
|
49
|
+
]),
|
|
50
|
+
_: 1
|
|
51
|
+
}),
|
|
52
|
+
o(x, {
|
|
53
|
+
direction: "vertical",
|
|
54
|
+
style: { "min-width": "500px" }
|
|
55
|
+
}, {
|
|
56
|
+
default: t(() => [
|
|
57
|
+
o(U, { style: { height: "42px", padding: "0 8px" } }, {
|
|
58
|
+
default: t(() => [
|
|
59
|
+
p("div", L, [
|
|
60
|
+
p("div", T, [
|
|
61
|
+
p("div", q, [
|
|
62
|
+
o(y, { style: { "margin-right": "4px" } }, {
|
|
63
|
+
default: t(() => [
|
|
64
|
+
o(d, {
|
|
65
|
+
type: "primary",
|
|
66
|
+
icon: "el-icon-edit",
|
|
67
|
+
onClick: k
|
|
68
|
+
}, {
|
|
69
|
+
default: t(() => e[7] || (e[7] = [
|
|
70
|
+
r("编辑JSON")
|
|
71
|
+
])),
|
|
72
|
+
_: 1
|
|
73
|
+
}),
|
|
74
|
+
o(d, {
|
|
75
|
+
type: "primary",
|
|
76
|
+
icon: "el-icon-edit",
|
|
77
|
+
onClick: J
|
|
78
|
+
}, {
|
|
79
|
+
default: t(() => e[8] || (e[8] = [
|
|
80
|
+
r("预览")
|
|
81
|
+
])),
|
|
82
|
+
_: 1
|
|
83
|
+
})
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
}),
|
|
87
|
+
o(y, null, {
|
|
88
|
+
default: t(() => [
|
|
89
|
+
o(d, {
|
|
90
|
+
type: "primary",
|
|
91
|
+
icon: "el-icon-delete"
|
|
92
|
+
}, {
|
|
93
|
+
default: t(() => e[9] || (e[9] = [
|
|
94
|
+
r("清空")
|
|
95
|
+
])),
|
|
96
|
+
_: 1
|
|
97
|
+
})
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
})
|
|
101
|
+
])
|
|
102
|
+
])
|
|
103
|
+
])
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
}),
|
|
107
|
+
o(j, { style: { padding: "0px" } }, {
|
|
108
|
+
default: t(() => [
|
|
109
|
+
o(M, null, {
|
|
110
|
+
default: t(() => [
|
|
111
|
+
o(V, {
|
|
112
|
+
ref_key: "designerRender",
|
|
113
|
+
ref: v,
|
|
114
|
+
conf: a.value,
|
|
115
|
+
mode: c.mode,
|
|
116
|
+
active: u.value,
|
|
117
|
+
"onUpdate:active": e[0] || (e[0] = (l) => u.value = l)
|
|
118
|
+
}, null, 8, ["conf", "mode", "active"])
|
|
119
|
+
]),
|
|
120
|
+
_: 1
|
|
121
|
+
})
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
})
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
}),
|
|
128
|
+
o(g, null, {
|
|
129
|
+
default: t(() => [
|
|
130
|
+
o(A, {
|
|
131
|
+
conf: u.value,
|
|
132
|
+
"onUpdate:conf": e[1] || (e[1] = (l) => u.value = l),
|
|
133
|
+
form: a.value.formConfig,
|
|
134
|
+
"onUpdate:form": e[2] || (e[2] = (l) => a.value.formConfig = l)
|
|
135
|
+
}, null, 8, ["conf", "form"])
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
})
|
|
139
|
+
]),
|
|
140
|
+
_: 1
|
|
141
|
+
}),
|
|
142
|
+
o(b, {
|
|
143
|
+
title: "编辑JSON",
|
|
144
|
+
modelValue: s.value,
|
|
145
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => s.value = l)
|
|
146
|
+
}, {
|
|
147
|
+
footer: t(() => [
|
|
148
|
+
p("div", D, [
|
|
149
|
+
o(d, {
|
|
150
|
+
onClick: e[4] || (e[4] = (l) => s.value = !1)
|
|
151
|
+
}, {
|
|
152
|
+
default: t(() => e[10] || (e[10] = [
|
|
153
|
+
r("取消")
|
|
154
|
+
])),
|
|
155
|
+
_: 1
|
|
156
|
+
}),
|
|
157
|
+
o(d, {
|
|
158
|
+
type: "primary",
|
|
159
|
+
onClick: w
|
|
160
|
+
}, {
|
|
161
|
+
default: t(() => e[11] || (e[11] = [
|
|
162
|
+
r("确定")
|
|
163
|
+
])),
|
|
164
|
+
_: 1
|
|
165
|
+
})
|
|
166
|
+
])
|
|
167
|
+
]),
|
|
168
|
+
default: t(() => [
|
|
169
|
+
o(G, {
|
|
170
|
+
lang: "json",
|
|
171
|
+
options: S.value,
|
|
172
|
+
modelValue: f.value,
|
|
173
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => f.value = l)
|
|
174
|
+
}, null, 8, ["options", "modelValue"])
|
|
175
|
+
]),
|
|
176
|
+
_: 1
|
|
177
|
+
}, 8, ["modelValue"]),
|
|
178
|
+
o(b, {
|
|
179
|
+
title: "表单预览",
|
|
180
|
+
modelValue: m.value,
|
|
181
|
+
"onUpdate:modelValue": e[6] || (e[6] = (l) => m.value = l)
|
|
182
|
+
}, {
|
|
183
|
+
default: t(() => [
|
|
184
|
+
m.value ? (N(), $(V, {
|
|
185
|
+
key: 0,
|
|
186
|
+
conf: _.value,
|
|
187
|
+
mode: "view"
|
|
188
|
+
}, null, 8, ["conf"])) : z("", !0)
|
|
189
|
+
]),
|
|
190
|
+
_: 1
|
|
191
|
+
}, 8, ["modelValue"])
|
|
192
|
+
]);
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
export {
|
|
197
|
+
Q as default
|
|
198
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createElementBlock as s, openBlock as n, normalizeClass as r, createElementVNode as a, createCommentVNode as i, toDisplayString as c } from "vue";
|
|
2
|
+
import { _ as o } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const l = {
|
|
4
|
+
name: "SvgIcon",
|
|
5
|
+
props: {
|
|
6
|
+
iconClass: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: !0
|
|
9
|
+
},
|
|
10
|
+
className: {
|
|
11
|
+
type: String
|
|
12
|
+
},
|
|
13
|
+
title: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
computed: {
|
|
19
|
+
iconName() {
|
|
20
|
+
return `#icon-${this.iconClass}`;
|
|
21
|
+
},
|
|
22
|
+
svgClass() {
|
|
23
|
+
return this.className ? "svg-icon " + this.className : "svg-icon";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, m = ["xlink:href"], d = { key: 0 };
|
|
27
|
+
function u(_, f, e, p, g, t) {
|
|
28
|
+
return n(), s("svg", {
|
|
29
|
+
class: r(t.svgClass),
|
|
30
|
+
"aria-hidden": "true"
|
|
31
|
+
}, [
|
|
32
|
+
a("use", { "xlink:href": t.iconName }, null, 8, m),
|
|
33
|
+
e.title ? (n(), s("title", d, c(e.title), 1)) : i("", !0)
|
|
34
|
+
], 2);
|
|
35
|
+
}
|
|
36
|
+
const N = /* @__PURE__ */ o(l, [["render", u], ["__scopeId", "data-v-f0bfb888"]]);
|
|
37
|
+
export {
|
|
38
|
+
N as default
|
|
39
|
+
};
|