sun-form-v3 1.0.89 → 1.0.92

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,280 @@
1
+ import { computed as N, ref as h, resolveComponent as u, openBlock as C, createElementBlock as U, Fragment as k, createVNode as e, withCtx as l, createTextVNode as g, unref as d, isRef as j, createElementVNode as c, pushScopeId as I, popScopeId as J } from "vue";
2
+ import { _ as T } from "./index-DAk2H32-.js";
3
+ const E = (m) => (I("data-v-ede8dcab"), m = m(), J(), m), H = /* @__PURE__ */ E(() => /* @__PURE__ */ c("span", null, "数据配置", -1)), B = { class: "h-full flex flex-col" }, D = { class: "flex-1 overflow-hidden" }, F = {
4
+ __name: "dataConfig",
5
+ props: {
6
+ modelValue: [Object, null],
7
+ widget: {
8
+ type: Object
9
+ }
10
+ },
11
+ emits: ["update:modelValue"],
12
+ setup(m, { emit: o }) {
13
+ let b = m;
14
+ const t = N(() => b.widget.props);
15
+ let a = h(!1);
16
+ const p = h([]), s = (x) => {
17
+ p.value.splice(x, 1);
18
+ }, _ = () => {
19
+ p.value.push({
20
+ title: null,
21
+ value: null,
22
+ key: null,
23
+ unit: null
24
+ });
25
+ }, i = () => {
26
+ t.value.data && (p.value = JSON.parse(JSON.stringify(t.value.data))), a.value = !0;
27
+ }, w = () => {
28
+ a.value = !1;
29
+ }, O = () => {
30
+ t.value.data = JSON.parse(JSON.stringify(p.value)), a.value = !1;
31
+ };
32
+ return (x, y) => {
33
+ const f = u("el-button"), V = u("el-input"), v = u("vxe-column"), S = u("vxe-table"), z = u("vxe-modal");
34
+ return C(), U(k, null, [
35
+ e(f, {
36
+ plain: "",
37
+ icon: "Setting",
38
+ onClick: i,
39
+ type: t.value.data.length ? "primary" : ""
40
+ }, {
41
+ default: l(() => [
42
+ g(" 数据配置 ")
43
+ ]),
44
+ _: 1
45
+ }, 8, ["type"]),
46
+ e(z, {
47
+ transfer: "",
48
+ modelValue: d(a),
49
+ "onUpdate:modelValue": y[0] || (y[0] = (n) => j(a) ? a.value = n : a = n),
50
+ width: "830px",
51
+ height: "700px",
52
+ "show-footer": "",
53
+ onClose: w
54
+ }, {
55
+ title: l(() => [
56
+ H
57
+ ]),
58
+ default: l(() => [
59
+ c("div", B, [
60
+ e(f, {
61
+ type: "primary",
62
+ class: "w-16 mb-2",
63
+ onClick: _
64
+ }, {
65
+ default: l(() => [
66
+ g("新增")
67
+ ]),
68
+ _: 1
69
+ }),
70
+ c("div", D, [
71
+ e(S, {
72
+ ref: "mainTable",
73
+ data: p.value,
74
+ height: "auto",
75
+ "row-config": { isCurrent: !0, isHover: !0 },
76
+ size: "mini",
77
+ border: "",
78
+ "scroll-y": { enabled: !0 },
79
+ "column-config": { resizable: !0 },
80
+ align: "left",
81
+ class: "w-full"
82
+ }, {
83
+ default: l(() => [
84
+ e(v, {
85
+ field: "time",
86
+ title: "时间"
87
+ }, {
88
+ default: l(({ row: n }) => [
89
+ c("div", null, [
90
+ e(V, {
91
+ modelValue: n.time,
92
+ "onUpdate:modelValue": (r) => n.time = r
93
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
94
+ ])
95
+ ]),
96
+ _: 1
97
+ }),
98
+ e(v, {
99
+ field: "title",
100
+ title: "标题"
101
+ }, {
102
+ default: l(({ row: n }) => [
103
+ c("div", null, [
104
+ e(V, {
105
+ modelValue: n.title,
106
+ "onUpdate:modelValue": (r) => n.title = r
107
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
108
+ ])
109
+ ]),
110
+ _: 1
111
+ }),
112
+ e(v, {
113
+ field: "description",
114
+ title: "描述"
115
+ }, {
116
+ default: l(({ row: n }) => [
117
+ c("div", null, [
118
+ e(V, {
119
+ modelValue: n.description,
120
+ "onUpdate:modelValue": (r) => n.description = r
121
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
122
+ ])
123
+ ]),
124
+ _: 1
125
+ }),
126
+ e(v, {
127
+ title: "操作栏",
128
+ width: "60",
129
+ align: "center"
130
+ }, {
131
+ default: l(({ row: n, rowIndex: r }) => [
132
+ e(f, {
133
+ link: "",
134
+ type: "primary",
135
+ size: "small",
136
+ onClick: (R) => s(r)
137
+ }, {
138
+ default: l(() => [
139
+ g("删除")
140
+ ]),
141
+ _: 2
142
+ }, 1032, ["onClick"])
143
+ ]),
144
+ _: 1
145
+ })
146
+ ]),
147
+ _: 1
148
+ }, 8, ["data"])
149
+ ])
150
+ ])
151
+ ]),
152
+ footer: l(() => [
153
+ e(f, {
154
+ icon: "Close",
155
+ size: "small",
156
+ onClick: w
157
+ }, {
158
+ default: l(() => [
159
+ g("关闭")
160
+ ]),
161
+ _: 1
162
+ }),
163
+ e(f, {
164
+ icon: "Check",
165
+ type: "primary",
166
+ size: "small",
167
+ onClick: O
168
+ }, {
169
+ default: l(() => [
170
+ g("确认")
171
+ ]),
172
+ _: 1
173
+ })
174
+ ]),
175
+ _: 1
176
+ }, 8, ["modelValue"])
177
+ ], 64);
178
+ };
179
+ }
180
+ }, M = /* @__PURE__ */ T(F, [["__scopeId", "data-v-ede8dcab"]]), A = /* @__PURE__ */ Object.assign({ name: "config-timeline" }, {
181
+ __name: "index",
182
+ props: {
183
+ designer: {
184
+ type: Object,
185
+ default: {}
186
+ },
187
+ widget: {
188
+ type: Object,
189
+ default: {}
190
+ }
191
+ },
192
+ setup(m) {
193
+ let o = m;
194
+ return (b, t) => {
195
+ const a = u("el-radio-button"), p = u("el-radio-group"), s = u("common-label-container"), _ = u("el-switch");
196
+ return C(), U(k, null, [
197
+ e(s, { label: "时间戳位置" }, {
198
+ default: l(() => [
199
+ e(p, {
200
+ modelValue: d(o).widget.props.placement,
201
+ "onUpdate:modelValue": t[0] || (t[0] = (i) => d(o).widget.props.placement = i)
202
+ }, {
203
+ default: l(() => [
204
+ e(a, {
205
+ value: "top",
206
+ label: "top"
207
+ }),
208
+ e(a, {
209
+ value: "bottom",
210
+ label: "bottom"
211
+ })
212
+ ]),
213
+ _: 1
214
+ }, 8, ["modelValue"])
215
+ ]),
216
+ _: 1
217
+ }),
218
+ e(s, { label: "节点尺寸" }, {
219
+ default: l(() => [
220
+ e(p, {
221
+ modelValue: d(o).widget.props.size,
222
+ "onUpdate:modelValue": t[1] || (t[1] = (i) => d(o).widget.props.size = i)
223
+ }, {
224
+ default: l(() => [
225
+ e(a, {
226
+ value: "normal",
227
+ label: "normal"
228
+ }),
229
+ e(a, {
230
+ value: "large",
231
+ label: "large"
232
+ })
233
+ ]),
234
+ _: 1
235
+ }, 8, ["modelValue"])
236
+ ]),
237
+ _: 1
238
+ }),
239
+ e(s, { label: "隐藏时间戳" }, {
240
+ default: l(() => [
241
+ e(_, {
242
+ modelValue: d(o).widget.props.hideTimestamp,
243
+ "onUpdate:modelValue": t[2] || (t[2] = (i) => d(o).widget.props.hideTimestamp = i)
244
+ }, null, 8, ["modelValue"])
245
+ ]),
246
+ _: 1
247
+ }),
248
+ e(s, { label: "垂直居中" }, {
249
+ default: l(() => [
250
+ e(_, {
251
+ modelValue: d(o).widget.props.center,
252
+ "onUpdate:modelValue": t[3] || (t[3] = (i) => d(o).widget.props.center = i)
253
+ }, null, 8, ["modelValue"])
254
+ ]),
255
+ _: 1
256
+ }),
257
+ e(s, { label: "是否空心点" }, {
258
+ default: l(() => [
259
+ e(_, {
260
+ modelValue: d(o).widget.props.hollow,
261
+ "onUpdate:modelValue": t[4] || (t[4] = (i) => d(o).widget.props.hollow = i)
262
+ }, null, 8, ["modelValue"])
263
+ ]),
264
+ _: 1
265
+ }),
266
+ e(s, { label: "时间线数据" }, {
267
+ default: l(() => [
268
+ e(M, {
269
+ widget: d(o).widget
270
+ }, null, 8, ["widget"])
271
+ ]),
272
+ _: 1
273
+ })
274
+ ], 64);
275
+ };
276
+ }
277
+ });
278
+ export {
279
+ A as default
280
+ };
@@ -0,0 +1,148 @@
1
+ import { ref as g, resolveComponent as u, openBlock as b, createElementBlock as V, Fragment as w, createVNode as e, withCtx as n, unref as a } from "vue";
2
+ import { c } from "./index-DAk2H32-.js";
3
+ const k = /* @__PURE__ */ Object.assign({ name: "config-text" }, {
4
+ __name: "index",
5
+ props: {
6
+ designer: {
7
+ type: Object,
8
+ default: {}
9
+ },
10
+ widget: {
11
+ type: Object,
12
+ default: {}
13
+ }
14
+ },
15
+ setup(i) {
16
+ let l = i;
17
+ const m = g(c);
18
+ return (_, o) => {
19
+ const d = u("el-option"), r = u("el-select"), p = u("common-label-container"), s = u("el-switch"), f = u("el-color-picker");
20
+ return b(), V(w, null, [
21
+ e(p, { label: "组件尺寸" }, {
22
+ default: n(() => [
23
+ e(r, {
24
+ modelValue: a(l).widget.props.size,
25
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => a(l).widget.props.size = t)
26
+ }, {
27
+ default: n(() => [
28
+ e(d, {
29
+ label: "大尺寸",
30
+ value: "large"
31
+ }),
32
+ e(d, {
33
+ label: "默认",
34
+ value: "default"
35
+ }),
36
+ e(d, {
37
+ label: "小尺寸",
38
+ value: "small"
39
+ })
40
+ ]),
41
+ _: 1
42
+ }, 8, ["modelValue"])
43
+ ]),
44
+ _: 1
45
+ }),
46
+ e(p, { label: "组件类型" }, {
47
+ default: n(() => [
48
+ e(r, {
49
+ modelValue: a(l).widget.props.type,
50
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => a(l).widget.props.type = t)
51
+ }, {
52
+ default: n(() => [
53
+ e(d, {
54
+ label: "primary",
55
+ value: "primary"
56
+ }),
57
+ e(d, {
58
+ label: "success",
59
+ value: "success"
60
+ }),
61
+ e(d, {
62
+ label: "info",
63
+ value: "info"
64
+ }),
65
+ e(d, {
66
+ label: "warning",
67
+ value: "warning"
68
+ }),
69
+ e(d, {
70
+ label: "danger",
71
+ value: "danger"
72
+ })
73
+ ]),
74
+ _: 1
75
+ }, 8, ["modelValue"])
76
+ ]),
77
+ _: 1
78
+ }),
79
+ e(p, { label: "主题" }, {
80
+ default: n(() => [
81
+ e(r, {
82
+ modelValue: a(l).widget.props.effect,
83
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => a(l).widget.props.effect = t)
84
+ }, {
85
+ default: n(() => [
86
+ e(d, {
87
+ label: "light",
88
+ value: "light"
89
+ }),
90
+ e(d, {
91
+ label: "dark",
92
+ value: "dark"
93
+ }),
94
+ e(d, {
95
+ label: "plain",
96
+ value: "plain"
97
+ })
98
+ ]),
99
+ _: 1
100
+ }, 8, ["modelValue"])
101
+ ]),
102
+ _: 1
103
+ }),
104
+ e(p, { label: "是否可关闭" }, {
105
+ default: n(() => [
106
+ e(s, {
107
+ modelValue: a(l).widget.props.closable,
108
+ "onUpdate:modelValue": o[3] || (o[3] = (t) => a(l).widget.props.closable = t)
109
+ }, null, 8, ["modelValue"])
110
+ ]),
111
+ _: 1
112
+ }),
113
+ e(p, { label: "边框描边" }, {
114
+ default: n(() => [
115
+ e(s, {
116
+ modelValue: a(l).widget.props.hit,
117
+ "onUpdate:modelValue": o[4] || (o[4] = (t) => a(l).widget.props.hit = t)
118
+ }, null, 8, ["modelValue"])
119
+ ]),
120
+ _: 1
121
+ }),
122
+ e(p, { label: "是否圆形" }, {
123
+ default: n(() => [
124
+ e(s, {
125
+ modelValue: a(l).widget.props.round,
126
+ "onUpdate:modelValue": o[5] || (o[5] = (t) => a(l).widget.props.round = t)
127
+ }, null, 8, ["modelValue"])
128
+ ]),
129
+ _: 1
130
+ }),
131
+ e(p, { label: "背景颜色" }, {
132
+ default: n(() => [
133
+ e(f, {
134
+ modelValue: a(l).widget.props.color,
135
+ "onUpdate:modelValue": o[6] || (o[6] = (t) => a(l).widget.props.color = t),
136
+ "show-alpha": "",
137
+ predefine: m.value
138
+ }, null, 8, ["modelValue", "predefine"])
139
+ ]),
140
+ _: 1
141
+ })
142
+ ], 64);
143
+ };
144
+ }
145
+ });
146
+ export {
147
+ k as default
148
+ };
@@ -0,0 +1,43 @@
1
+ import { resolveComponent as d, openBlock as u, createElementBlock as i, Fragment as s, createVNode as t, withCtx as p, unref as l } from "vue";
2
+ const f = /* @__PURE__ */ Object.assign({ name: "config-editor" }, {
3
+ __name: "index",
4
+ props: {
5
+ designer: {
6
+ type: Object,
7
+ default: {}
8
+ },
9
+ widget: {
10
+ type: Object,
11
+ default: {}
12
+ }
13
+ },
14
+ setup(m) {
15
+ let e = m;
16
+ return (c, o) => {
17
+ const r = d("el-switch"), a = d("common-label-container");
18
+ return u(), i(s, null, [
19
+ t(a, { label: "是否必填" }, {
20
+ default: p(() => [
21
+ t(r, {
22
+ modelValue: l(e).widget.props.required,
23
+ "onUpdate:modelValue": o[0] || (o[0] = (n) => l(e).widget.props.required = n)
24
+ }, null, 8, ["modelValue"])
25
+ ]),
26
+ _: 1
27
+ }),
28
+ t(a, { label: "是否只读" }, {
29
+ default: p(() => [
30
+ t(r, {
31
+ modelValue: l(e).widget.props.readonly,
32
+ "onUpdate:modelValue": o[1] || (o[1] = (n) => l(e).widget.props.readonly = n)
33
+ }, null, 8, ["modelValue"])
34
+ ]),
35
+ _: 1
36
+ })
37
+ ], 64);
38
+ };
39
+ }
40
+ });
41
+ export {
42
+ f as default
43
+ };