dmx-admin-ui 1.2.115 → 1.2.117
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/chart-B6Udxrm4.js +397 -0
- package/dist/{group-BpMRM8vH.js → group-D2VHsGBJ.js} +33 -33
- package/dist/{group-table-bYeB4MuR.js → group-table-BeuJoe3y.js} +33 -32
- package/dist/{group-tabs-DupAjBz3.js → group-tabs-DqA7KhIl.js} +31 -31
- package/dist/group-tabs-plus-DhKLblMj.js +187 -0
- package/dist/{index-DKL5QQJt.js → index-AHjtm1MH.js} +3315 -3593
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +24 -24
- package/package.json +1 -1
- package/dist/chart-D8jaDpil.js +0 -383
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import { defineComponent as W, ref as h, watch as L, onMounted as z, onUnmounted as D, resolveDirective as E, openBlock as S, createElementBlock as k, withDirectives as M, unref as w, renderSlot as R, createCommentVNode as T, createElementVNode as B } from "vue";
|
|
2
|
+
import * as m from "echarts";
|
|
3
|
+
const P = {
|
|
4
|
+
backgroundColor: "transparent",
|
|
5
|
+
textStyle: {},
|
|
6
|
+
title: {
|
|
7
|
+
textStyle: {
|
|
8
|
+
color: "#eeeeee"
|
|
9
|
+
},
|
|
10
|
+
subtextStyle: {
|
|
11
|
+
color: "#aaaaaa"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
categoryAxis: {
|
|
15
|
+
axisLine: {
|
|
16
|
+
lineStyle: {
|
|
17
|
+
color: "#eeeeee"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
axisTick: {
|
|
21
|
+
lineStyle: {
|
|
22
|
+
color: "#eeeeee"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
axisLabel: {
|
|
26
|
+
color: "#eeeeee"
|
|
27
|
+
},
|
|
28
|
+
splitLine: {
|
|
29
|
+
lineStyle: {
|
|
30
|
+
color: ["#aaaaaa"]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
splitArea: {
|
|
34
|
+
show: !1,
|
|
35
|
+
areaStyle: {
|
|
36
|
+
color: ["#eeeeee"]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
valueAxis: {
|
|
41
|
+
axisLine: {
|
|
42
|
+
show: !0,
|
|
43
|
+
lineStyle: {
|
|
44
|
+
color: "#eeeeee"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
axisTick: {
|
|
48
|
+
show: !0,
|
|
49
|
+
lineStyle: {
|
|
50
|
+
color: "#eeeeee"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
axisLabel: {
|
|
54
|
+
show: !0,
|
|
55
|
+
color: "#eeeeee"
|
|
56
|
+
},
|
|
57
|
+
splitLine: {
|
|
58
|
+
show: !0,
|
|
59
|
+
lineStyle: {
|
|
60
|
+
color: ["#aaaaaa"]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
splitArea: {
|
|
64
|
+
show: !1,
|
|
65
|
+
areaStyle: {
|
|
66
|
+
color: ["#eeeeee"]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
legend: {
|
|
71
|
+
textStyle: {
|
|
72
|
+
color: "#eeeeee"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
tooltip: {
|
|
76
|
+
axisPointer: {
|
|
77
|
+
lineStyle: {
|
|
78
|
+
color: "#eeeeee",
|
|
79
|
+
width: "1"
|
|
80
|
+
},
|
|
81
|
+
crossStyle: {
|
|
82
|
+
color: "#eeeeee",
|
|
83
|
+
width: "1"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
timeline: {
|
|
88
|
+
lineStyle: {
|
|
89
|
+
color: "#eeeeee",
|
|
90
|
+
width: 1
|
|
91
|
+
},
|
|
92
|
+
itemStyle: {
|
|
93
|
+
color: "#dd6b66",
|
|
94
|
+
borderWidth: 1
|
|
95
|
+
},
|
|
96
|
+
controlStyle: {
|
|
97
|
+
color: "#eeeeee",
|
|
98
|
+
borderColor: "#eeeeee",
|
|
99
|
+
borderWidth: 0.5
|
|
100
|
+
},
|
|
101
|
+
checkpointStyle: {
|
|
102
|
+
color: "#e43c59",
|
|
103
|
+
borderColor: "#c23531"
|
|
104
|
+
},
|
|
105
|
+
label: {
|
|
106
|
+
color: "#eeeeee"
|
|
107
|
+
},
|
|
108
|
+
emphasis: {
|
|
109
|
+
itemStyle: {
|
|
110
|
+
color: "#a9334c"
|
|
111
|
+
},
|
|
112
|
+
controlStyle: {
|
|
113
|
+
color: "#eeeeee",
|
|
114
|
+
borderColor: "#eeeeee",
|
|
115
|
+
borderWidth: 0.5
|
|
116
|
+
},
|
|
117
|
+
label: {
|
|
118
|
+
color: "#eeeeee"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
visualMap: {
|
|
123
|
+
color: [
|
|
124
|
+
"#bf444c",
|
|
125
|
+
"#d88273",
|
|
126
|
+
"#f6efa6"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
dataZoom: {
|
|
130
|
+
backgroundColor: "rgba(47,69,84,0)",
|
|
131
|
+
dataBackgroundColor: "rgba(255,255,255,0.3)",
|
|
132
|
+
fillerColor: "rgba(167,183,204,0.4)",
|
|
133
|
+
handleColor: "#a7b7cc",
|
|
134
|
+
handleSize: "100%",
|
|
135
|
+
textStyle: {
|
|
136
|
+
color: "#eeeeee"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
markPoint: {
|
|
140
|
+
label: {
|
|
141
|
+
color: "#eeeeee"
|
|
142
|
+
},
|
|
143
|
+
emphasis: {
|
|
144
|
+
label: {
|
|
145
|
+
color: "#eeeeee"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}, b = {};
|
|
150
|
+
function N(t, o = 0.5) {
|
|
151
|
+
if (t.startsWith("rgba"))
|
|
152
|
+
return t.replace(/[\d\.]+\)$/g, `${o})`);
|
|
153
|
+
if (t.startsWith("rgb"))
|
|
154
|
+
return t.replace("rgb", "rgba").replace(")", `, ${o})`);
|
|
155
|
+
if (t.startsWith("#")) {
|
|
156
|
+
if (t.length === 4) {
|
|
157
|
+
const i = parseInt(t[1] + t[1], 16), n = parseInt(t[2] + t[2], 16), l = parseInt(t[3] + t[3], 16);
|
|
158
|
+
return `rgba(${i}, ${n}, ${l}, ${o})`;
|
|
159
|
+
}
|
|
160
|
+
if (t.length === 7) {
|
|
161
|
+
const i = parseInt(t.slice(1, 3), 16), n = parseInt(t.slice(3, 5), 16), l = parseInt(t.slice(5, 7), 16);
|
|
162
|
+
return `rgba(${i}, ${n}, ${l}, ${o})`;
|
|
163
|
+
}
|
|
164
|
+
if (t.length === 9) {
|
|
165
|
+
const i = parseInt(t.slice(1, 3), 16), n = parseInt(t.slice(3, 5), 16), l = parseInt(t.slice(5, 7), 16), p = parseInt(t.slice(7, 9), 16) / 255;
|
|
166
|
+
return `rgba(${i}, ${n}, ${l}, ${p * o})`;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return t.startsWith("hsl") ? t.startsWith("hsla") ? t.replace(/[\d\.]+\)$/g, `${o})`) : t.replace("hsl", "hsla").replace(")", `, ${o})`) : t.startsWith("hsla") ? t.replace(/[\d\.]+\)$/g, `${o})`) : t;
|
|
170
|
+
}
|
|
171
|
+
const d = (t = ["#eee", "#999"]) => (t = Array.isArray(t) ? t : [N(t, 0.7), t], {
|
|
172
|
+
type: "linear",
|
|
173
|
+
x: 0,
|
|
174
|
+
x2: 0,
|
|
175
|
+
y: 0,
|
|
176
|
+
y2: 1,
|
|
177
|
+
colorStops: [
|
|
178
|
+
{
|
|
179
|
+
offset: 0,
|
|
180
|
+
color: t[0]
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
offset: 1,
|
|
184
|
+
color: t[1]
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
}), q = (t = -1) => {
|
|
188
|
+
const o = $store.theme + $store.dark;
|
|
189
|
+
if (!b[o]) {
|
|
190
|
+
const i = $store.theme, n = {
|
|
191
|
+
yellow: "#f59e0b",
|
|
192
|
+
green: "#22c55e",
|
|
193
|
+
purple: "#f43f5e",
|
|
194
|
+
blue: "#3b82f6",
|
|
195
|
+
red: "#f2140d"
|
|
196
|
+
}, l = {
|
|
197
|
+
yellow: "#eedd78",
|
|
198
|
+
green: "#91ca8c",
|
|
199
|
+
purple: "#e69d87",
|
|
200
|
+
blue: "#73b9bc",
|
|
201
|
+
red: "#dd6b66"
|
|
202
|
+
};
|
|
203
|
+
delete l[i], delete n[i];
|
|
204
|
+
const p = [d($theme("primary"))];
|
|
205
|
+
if ($store.dark) {
|
|
206
|
+
for (const f in l)
|
|
207
|
+
p.push(d(l[f]));
|
|
208
|
+
for (const f in n)
|
|
209
|
+
p.push(d(n[f]));
|
|
210
|
+
} else {
|
|
211
|
+
for (const f in n)
|
|
212
|
+
p.push(d(n[f]));
|
|
213
|
+
for (const f in l)
|
|
214
|
+
p.push(d(l[f]));
|
|
215
|
+
}
|
|
216
|
+
b[o] = p;
|
|
217
|
+
}
|
|
218
|
+
return t > -1 ? b[o][t] : b[o];
|
|
219
|
+
}, V = { class: "echarts" }, F = { class: "chart-slot" }, Z = /* @__PURE__ */ W({
|
|
220
|
+
__name: "chart",
|
|
221
|
+
props: {
|
|
222
|
+
init: {
|
|
223
|
+
type: Object,
|
|
224
|
+
default: () => ({})
|
|
225
|
+
},
|
|
226
|
+
data: {
|
|
227
|
+
type: [Boolean, Object],
|
|
228
|
+
default: !1
|
|
229
|
+
},
|
|
230
|
+
type: String,
|
|
231
|
+
asyncData: {
|
|
232
|
+
type: [Function, String]
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
setup(t) {
|
|
236
|
+
const o = t, i = h(null), n = h(!0), l = h(null), p = () => {
|
|
237
|
+
const r = $store.dark ? P : {};
|
|
238
|
+
return r.color = q(), r;
|
|
239
|
+
}, f = {
|
|
240
|
+
type: "bar",
|
|
241
|
+
yAxisIndex: 0,
|
|
242
|
+
itemStyle: {
|
|
243
|
+
borderRadius: [4, 4, 0, 0]
|
|
244
|
+
}
|
|
245
|
+
}, C = {
|
|
246
|
+
yAxisIndex: 0,
|
|
247
|
+
type: "line",
|
|
248
|
+
smooth: !1
|
|
249
|
+
}, g = h({}), _ = (r, s) => {
|
|
250
|
+
s?.[0] && typeof s?.[0] == "object" && !Array.isArray(s[0]) && (r = { ...r, ...s[0] });
|
|
251
|
+
const { type: c = "line" } = r;
|
|
252
|
+
let e = r || {};
|
|
253
|
+
if (e.tooltip === void 0 && (e.tooltip = { trigger: "axis" }), e.mini)
|
|
254
|
+
return e.grid = { left: 10, right: 10, bottom: 0, top: 10 }, e.xAxis = {
|
|
255
|
+
show: !1,
|
|
256
|
+
data: Array.isArray(s) ? s.slice(1).map((a) => a[0]) : Object.keys(s)
|
|
257
|
+
}, typeof e.color == "string" ? e.color = [e.color] : typeof e.color == "number" && (e.color = [p().color[e.color]]), e.yAxis = { type: "value", show: !1 }, c == "line" ? e.series = {
|
|
258
|
+
type: "line",
|
|
259
|
+
areaStyle: {},
|
|
260
|
+
smooth: !0
|
|
261
|
+
} : e.series = {
|
|
262
|
+
type: "bar"
|
|
263
|
+
}, delete e.mini, e.series.data = Array.isArray(s) ? s.slice(1).map((a) => a[1]) : Object.values(s), e;
|
|
264
|
+
if (e.grid === void 0 && (e.grid = { top: 0, left: 0, right: 0, bottom: 80 }), e.legend === void 0 && (e.legend = {}), e.xAxis === void 0 && (e.xAxis = { type: "category" }), e.yAxis === void 0 && (e.yAxis = {}), e.series === void 0) {
|
|
265
|
+
const a = [];
|
|
266
|
+
s[0].forEach((y, u) => {
|
|
267
|
+
if (u > 0) {
|
|
268
|
+
const O = (typeof y == "object" ? y.type : Array.isArray(c) ? c[u - 1] : c) === "bar" ? f : C;
|
|
269
|
+
y?.yAxisIndex && (e.yAxis = [{}, {}]), a.push({ ...O, ...typeof y == "object" ? y : {} });
|
|
270
|
+
}
|
|
271
|
+
}), e.series = a;
|
|
272
|
+
}
|
|
273
|
+
return typeof s == "object" && (s[0] = s[0].map((a) => typeof a == "object" ? a.name : a), e.dataset = {
|
|
274
|
+
source: s
|
|
275
|
+
}), console.log("series", e), e;
|
|
276
|
+
}, v = (r) => {
|
|
277
|
+
o.init.type == "pie" ? x(r) : o.init.type == "map" ? j(r) : I(r);
|
|
278
|
+
}, x = (r) => {
|
|
279
|
+
let s = o.init;
|
|
280
|
+
delete s.type, r?.[0] && typeof r?.[0] == "object" && !Array.isArray(r[0]) && (s = { ...o.init, ...r[0] }), s.tooltip === void 0 && (s.tooltip = {});
|
|
281
|
+
const c = s.legend ? "60%" : "80%";
|
|
282
|
+
if (r) {
|
|
283
|
+
if (s.series = {
|
|
284
|
+
type: "pie",
|
|
285
|
+
radius: c,
|
|
286
|
+
// radius: ['40%', '70%'],
|
|
287
|
+
// center: ['50%', '70%'],
|
|
288
|
+
// startAngle: -180,
|
|
289
|
+
// endAngle: 0,
|
|
290
|
+
// label:false,
|
|
291
|
+
// label: {
|
|
292
|
+
// alignTo: 'edge',
|
|
293
|
+
// formatter: '{b}\n{c}',
|
|
294
|
+
// minMargin: 5,
|
|
295
|
+
// edgeDistance: 10,
|
|
296
|
+
// lineHeight: 15
|
|
297
|
+
// },
|
|
298
|
+
// labelLine: {
|
|
299
|
+
// length: 15,
|
|
300
|
+
// length2: 0,
|
|
301
|
+
// maxSurfaceAngle: 80
|
|
302
|
+
// },
|
|
303
|
+
// labelLayout: (params) => {
|
|
304
|
+
// const isLeft = params.labelRect.x < client.value?.getWidth() / 2;
|
|
305
|
+
// const points = params.labelLinePoints;
|
|
306
|
+
// points[2][0] = isLeft
|
|
307
|
+
// ? params.labelRect.x
|
|
308
|
+
// : params.labelRect.x + params.labelRect.width;
|
|
309
|
+
// return {
|
|
310
|
+
// labelLinePoints: points
|
|
311
|
+
// };
|
|
312
|
+
// },
|
|
313
|
+
data: [],
|
|
314
|
+
...s.series
|
|
315
|
+
}, !s.series.data.length && Array.isArray(r))
|
|
316
|
+
s.series.data = r.filter((e) => Array.isArray(e)).map((e) => ({ name: e[0], value: e[1] }));
|
|
317
|
+
else if (!s.series.data.length && typeof r == "object") {
|
|
318
|
+
for (const e in r)
|
|
319
|
+
if (Object.prototype.hasOwnProperty.call(r, e)) {
|
|
320
|
+
const a = r[e];
|
|
321
|
+
s.series.data.push({ value: a, name: e });
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
g.value = s, A();
|
|
326
|
+
}, j = async (r) => {
|
|
327
|
+
let s = 0;
|
|
328
|
+
r && (s = r[0].value);
|
|
329
|
+
let c = o.init, e = c.adcode || 1e5, a = { 1e5: "china" }[e] || "map";
|
|
330
|
+
const y = await $req.query(
|
|
331
|
+
`https://geo.datav.aliyun.com/areas_v3/bound/${e}_full.json`
|
|
332
|
+
), u = m.init(l.value);
|
|
333
|
+
c.visualMap = {
|
|
334
|
+
text: ["高", "低"],
|
|
335
|
+
min: 0,
|
|
336
|
+
max: s,
|
|
337
|
+
calculable: !0,
|
|
338
|
+
orient: "horizontal",
|
|
339
|
+
bottom: 20,
|
|
340
|
+
inRange: {
|
|
341
|
+
color: ["#ebf5ff", "#409eff"]
|
|
342
|
+
}
|
|
343
|
+
}, c.series = {
|
|
344
|
+
type: "map",
|
|
345
|
+
map: a,
|
|
346
|
+
label: {
|
|
347
|
+
show: !0,
|
|
348
|
+
color: "#999",
|
|
349
|
+
fontSize: 10
|
|
350
|
+
},
|
|
351
|
+
itemStyle: {
|
|
352
|
+
areaColor: "#ecf5ff",
|
|
353
|
+
borderColor: "#dddddd"
|
|
354
|
+
}
|
|
355
|
+
}, c.series.data = r, m.registerMap(a, y), u.setOption(c), i.value = u, n.value = !1;
|
|
356
|
+
}, I = (r) => {
|
|
357
|
+
if (r[0] === "pie" || r?.[0]?.type === "pie")
|
|
358
|
+
return x(r);
|
|
359
|
+
g.value = o.type === "native" ? o.init : _(o.init, r);
|
|
360
|
+
try {
|
|
361
|
+
A();
|
|
362
|
+
} catch {
|
|
363
|
+
}
|
|
364
|
+
}, A = () => {
|
|
365
|
+
const r = m.init(l.value, p(), { renderer: "svg" });
|
|
366
|
+
r.setOption(g.value), i.value = r, n.value = !1;
|
|
367
|
+
};
|
|
368
|
+
L(() => [$store.dark, $store.theme], () => {
|
|
369
|
+
i.value && i.value.setTheme(p());
|
|
370
|
+
}), z(() => {
|
|
371
|
+
o.asyncData && typeof o.asyncData == "function" ? o.asyncData(v) : v(o.data);
|
|
372
|
+
}), D(() => {
|
|
373
|
+
i.value && i.value.dispose(), window.removeEventListener("resize", $);
|
|
374
|
+
});
|
|
375
|
+
const $ = () => {
|
|
376
|
+
i.value && i.value.resize();
|
|
377
|
+
};
|
|
378
|
+
return window.addEventListener("resize", $), (r, s) => {
|
|
379
|
+
const c = E("loading");
|
|
380
|
+
return S(), k("div", V, [
|
|
381
|
+
M((S(), k("div", F, [
|
|
382
|
+
w(n) ? T("", !0) : R(r.$slots, "default", { key: 0 })
|
|
383
|
+
])), [
|
|
384
|
+
[c, w(n)]
|
|
385
|
+
]),
|
|
386
|
+
B("div", {
|
|
387
|
+
class: "chart-box",
|
|
388
|
+
ref_key: "echartsRef",
|
|
389
|
+
ref: l
|
|
390
|
+
}, null, 512)
|
|
391
|
+
]);
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
export {
|
|
396
|
+
Z as default
|
|
397
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { resolveComponent as
|
|
2
|
-
import { _ as j } from "./index-
|
|
1
|
+
import { resolveComponent as k, openBlock as s, createElementBlock as n, normalizeClass as h, createBlock as p, resolveDynamicComponent as v, normalizeProps as x, guardReactiveProps as V, withCtx as z, Fragment as f, renderList as g, createElementVNode as o, createCommentVNode as d, normalizeStyle as b, toDisplayString as u, createTextVNode as C, defineAsyncComponent as T } from "vue";
|
|
2
|
+
import { _ as j } from "./index-AHjtm1MH.js";
|
|
3
3
|
const O = {
|
|
4
4
|
name: "form-group",
|
|
5
5
|
components: {
|
|
6
|
-
inputItem:
|
|
6
|
+
inputItem: T(() => import("./index-AHjtm1MH.js").then((t) => t.c))
|
|
7
7
|
},
|
|
8
8
|
emits: ["change", "update:modelValue"],
|
|
9
9
|
props: {
|
|
@@ -26,8 +26,8 @@ const O = {
|
|
|
26
26
|
};
|
|
27
27
|
},
|
|
28
28
|
created() {
|
|
29
|
-
this.cols = this.init.cols, this.init.size && this.cols.forEach((t) => {
|
|
30
|
-
t.size = this.init.size;
|
|
29
|
+
this.cols = this.init.cols, (this.init.size || this.size) && this.cols.forEach((t) => {
|
|
30
|
+
t.size = this.init.size || this.size;
|
|
31
31
|
}), this.init.alignTop && (this.alignTop = !0), this.init.config && (this.config = this.init.config), this.init.limit > 1 && (this.limit = this.init.limit), this.modelValue && this.modelValue.constructor.name === "Object" ? (this.dataType = "Object", this.list = [this.modelValue]) : this.modelValue && this.modelValue.constructor.name === "Array" && (this.list = this.modelValue), this.limit === 1 && (this.dataType = "Object", this.modelValue || (this.list = [{}])), this.$watch(
|
|
32
32
|
"list",
|
|
33
33
|
function(t, e) {
|
|
@@ -42,8 +42,8 @@ const O = {
|
|
|
42
42
|
change() {
|
|
43
43
|
this.key++;
|
|
44
44
|
},
|
|
45
|
-
change2(t, e) {
|
|
46
|
-
this.list[e][
|
|
45
|
+
change2(t, e, r) {
|
|
46
|
+
r.field ? this.list[e][r.field] = t : this.list[e] = t;
|
|
47
47
|
},
|
|
48
48
|
del(t) {
|
|
49
49
|
this.list.splice(t, 1), this.key++;
|
|
@@ -58,23 +58,23 @@ const O = {
|
|
|
58
58
|
title: "拖动排序"
|
|
59
59
|
}, I = { class: "item" }, B = { class: "input w-full" }, E = {
|
|
60
60
|
key: 0,
|
|
61
|
-
class: "input-item-title"
|
|
61
|
+
class: "input-item-title break-all"
|
|
62
62
|
}, N = { class: "input-item-input" }, S = {
|
|
63
63
|
key: 0,
|
|
64
64
|
class: "input-item-info text-3 op-70 pt-xs",
|
|
65
65
|
style: { "line-height": "1.5" }
|
|
66
66
|
}, D = ["onClick"], P = { class: "text-3 op-70 pl-sm" };
|
|
67
|
-
function U(t, e,
|
|
68
|
-
const
|
|
67
|
+
function U(t, e, r, W, i, c) {
|
|
68
|
+
const y = k("inputItem");
|
|
69
69
|
return s(), n("div", {
|
|
70
|
-
class:
|
|
70
|
+
class: h(["input-group", i.limit == 1 ? "input-group-one" : ""])
|
|
71
71
|
}, [
|
|
72
|
-
(s(),
|
|
73
|
-
default:
|
|
74
|
-
(s(!0), n(f, null, g(i.list, (
|
|
72
|
+
(s(), p(v(i.limit > 1 ? "a-draggable" : "span"), x(V(i.limit > 1 ? { filter: ".del", handle: ".sort", list: i.list, onChange: c.change } : {})), {
|
|
73
|
+
default: z(() => [
|
|
74
|
+
(s(!0), n(f, null, g(i.list, (a, m) => (s(), n("div", w, [
|
|
75
75
|
i.limit != 1 ? (s(), n("div", A, [...e[1] || (e[1] = [
|
|
76
76
|
o("i", { class: "i-ri-menu-line" }, null, -1)
|
|
77
|
-
])])) :
|
|
77
|
+
])])) : d("", !0),
|
|
78
78
|
o("div", I, [
|
|
79
79
|
o("div", B, [
|
|
80
80
|
(s(!0), n(f, null, g(i.cols, (l) => (s(), n("div", {
|
|
@@ -82,34 +82,34 @@ function U(t, e, y, W, i, r) {
|
|
|
82
82
|
style: b({ width: l.inputWidth ? l.inputWidth : "100%" })
|
|
83
83
|
}, [
|
|
84
84
|
o("div", {
|
|
85
|
-
class:
|
|
85
|
+
class: h(["input-item-box", { "input-item-box-h": i.alignTop }])
|
|
86
86
|
}, [
|
|
87
|
-
l.title ? (s(), n("div", E,
|
|
87
|
+
l.title ? (s(), n("div", E, u(l.title) + ": ", 1)) : d("", !0),
|
|
88
88
|
o("div", N, [
|
|
89
|
-
(s(),
|
|
89
|
+
(s(), p(y, {
|
|
90
|
+
size: r.size,
|
|
90
91
|
cols: i.cols,
|
|
91
|
-
index:
|
|
92
|
+
index: m,
|
|
92
93
|
key: i.key,
|
|
93
94
|
prop: l,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}, null, 8, ["cols", "index", "prop", "onChange", "modelValue", "onUpdate:modelValue"]))
|
|
95
|
+
"onUpdate:modelValue": (_) => c.change2(_, m, l),
|
|
96
|
+
"model-value": l.field ? a[l.field] : a
|
|
97
|
+
}, null, 8, ["size", "cols", "index", "prop", "onUpdate:modelValue", "model-value"]))
|
|
98
98
|
])
|
|
99
99
|
], 2),
|
|
100
100
|
l.info ? (s(), n("div", S, [
|
|
101
101
|
e[2] || (e[2] = o("i", { class: "i-ri-error-warning-line" }, null, -1)),
|
|
102
|
-
|
|
103
|
-
])) :
|
|
102
|
+
C(" " + u(l.info), 1)
|
|
103
|
+
])) : d("", !0)
|
|
104
104
|
], 4))), 256))
|
|
105
105
|
]),
|
|
106
106
|
i.limit != 1 ? (s(), n("div", {
|
|
107
107
|
key: 0,
|
|
108
108
|
class: "del",
|
|
109
|
-
onClick: (l) =>
|
|
109
|
+
onClick: (l) => c.del(m)
|
|
110
110
|
}, [...e[3] || (e[3] = [
|
|
111
111
|
o("i", { class: "i-ri-close-line" }, null, -1)
|
|
112
|
-
])], 8, D)) :
|
|
112
|
+
])], 8, D)) : d("", !0)
|
|
113
113
|
])
|
|
114
114
|
]))), 256))
|
|
115
115
|
]),
|
|
@@ -117,16 +117,16 @@ function U(t, e, y, W, i, r) {
|
|
|
117
117
|
}, 16)),
|
|
118
118
|
i.limit != 1 && i.list.length < i.limit ? (s(), n("div", {
|
|
119
119
|
key: 0,
|
|
120
|
-
class:
|
|
121
|
-
onClick: e[0] || (e[0] = (...
|
|
120
|
+
class: h(["add flex justify-center items-center", { "add-small": r.init.size === "small" }]),
|
|
121
|
+
onClick: e[0] || (e[0] = (...a) => c.add && c.add(...a))
|
|
122
122
|
}, [
|
|
123
123
|
e[4] || (e[4] = o("i", { class: "i-ri-add-line font-xl" }, null, -1)),
|
|
124
|
-
o("span", null,
|
|
125
|
-
o("span", P, "(" +
|
|
126
|
-
], 2)) :
|
|
124
|
+
o("span", null, u(i.config.text), 1),
|
|
125
|
+
o("span", P, "(" + u(i.list.length) + "/" + u(i.limit) + ")", 1)
|
|
126
|
+
], 2)) : d("", !0)
|
|
127
127
|
], 2);
|
|
128
128
|
}
|
|
129
|
-
const R = /* @__PURE__ */ j(O, [["render", U], ["__scopeId", "data-v-
|
|
129
|
+
const R = /* @__PURE__ */ j(O, [["render", U], ["__scopeId", "data-v-8ced8189"]]);
|
|
130
130
|
export {
|
|
131
131
|
R as default
|
|
132
132
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { resolveComponent as f, openBlock as n, createElementBlock as
|
|
2
|
-
import { _ as O } from "./index-
|
|
1
|
+
import { resolveComponent as f, openBlock as n, createElementBlock as r, createElementVNode as l, Fragment as a, renderList as c, normalizeStyle as w, createTextVNode as C, toDisplayString as h, createBlock as p, withCtx as g, createCommentVNode as y, resolveDynamicComponent as v, mergeProps as _, normalizeClass as j, defineAsyncComponent as z } from "vue";
|
|
2
|
+
import { _ as O } from "./index-AHjtm1MH.js";
|
|
3
3
|
const T = {
|
|
4
4
|
name: "form-group",
|
|
5
5
|
components: {
|
|
6
|
-
inputItem:
|
|
6
|
+
inputItem: z(() => import("./index-AHjtm1MH.js").then((s) => s.c))
|
|
7
7
|
},
|
|
8
8
|
emits: ["change", "update:modelValue"],
|
|
9
9
|
props: {
|
|
@@ -25,10 +25,8 @@ const T = {
|
|
|
25
25
|
},
|
|
26
26
|
created() {
|
|
27
27
|
this.cols = this.init.cols;
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const t = `calc(${(100 / r).toFixed(1) + "%"} - ${(80 / r).toFixed(1) + "px"})`;
|
|
31
|
-
console.log(t), this.init.size && this.cols.forEach((e) => {
|
|
28
|
+
const s = this.cols.filter((e) => !e.width).length, t = `calc(${(100 / s).toFixed(1) + "%"} - ${(80 / s).toFixed(1) + "px"})`;
|
|
29
|
+
this.init.size && this.cols.forEach((e) => {
|
|
32
30
|
e.size = this.init.size, e.width || (e.width = t);
|
|
33
31
|
}), this.init.limit > 1 && (this.limit = this.init.limit), this.modelValue && this.modelValue.constructor.name === "Object" ? (this.dataType = "Object", this.list = [this.modelValue]) : this.modelValue && this.modelValue.constructor.name === "Array" ? this.list = this.modelValue : this.limit === 1 && (this.dataType = "Object"), this.$watch(
|
|
34
32
|
"list",
|
|
@@ -44,34 +42,37 @@ const T = {
|
|
|
44
42
|
change() {
|
|
45
43
|
this.key++;
|
|
46
44
|
},
|
|
47
|
-
|
|
48
|
-
this.list.
|
|
45
|
+
change2(s, t, e) {
|
|
46
|
+
e.field ? this.list[t][e.field] = s : this.list[t] = s;
|
|
47
|
+
},
|
|
48
|
+
del(s) {
|
|
49
|
+
this.list.splice(s, 1), this.key++;
|
|
49
50
|
},
|
|
50
51
|
add() {
|
|
51
52
|
this.list.push({});
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
}, A = { class: "input-group-table" }, I = { align: "left" }, B = { style: { "line-height": "1.2" } }, E = ["onClick"], F = { class: "text-3 op-70 pl-sm" };
|
|
55
|
-
function N(
|
|
56
|
-
const V = f("el-tooltip"),
|
|
57
|
-
return n(),
|
|
56
|
+
function N(s, t, e, b, i, u) {
|
|
57
|
+
const V = f("el-tooltip"), k = f("inputItem");
|
|
58
|
+
return n(), r("div", A, [
|
|
58
59
|
l("table", null, [
|
|
59
60
|
l("colgroup", null, [
|
|
60
61
|
t[1] || (t[1] = l("col", { width: 40 }, null, -1)),
|
|
61
|
-
(n(!0),
|
|
62
|
-
style: w({ width:
|
|
62
|
+
(n(!0), r(a, null, c(i.cols, (o) => (n(), r("col", {
|
|
63
|
+
style: w({ width: o.width })
|
|
63
64
|
}, null, 4))), 256)),
|
|
64
65
|
t[2] || (t[2] = l("col", { width: 40 }, null, -1))
|
|
65
66
|
]),
|
|
66
67
|
l("thead", null, [
|
|
67
68
|
l("tr", null, [
|
|
68
69
|
t[4] || (t[4] = l("th", null, null, -1)),
|
|
69
|
-
(n(!0),
|
|
70
|
+
(n(!0), r(a, null, c(i.cols, (o) => (n(), r("th", I, [
|
|
70
71
|
l("div", B, [
|
|
71
|
-
C(
|
|
72
|
-
|
|
72
|
+
C(h(o.title) + " ", 1),
|
|
73
|
+
o.info ? (n(), p(V, {
|
|
73
74
|
key: 0,
|
|
74
|
-
content:
|
|
75
|
+
content: o.info,
|
|
75
76
|
placement: "bottom",
|
|
76
77
|
effect: "light"
|
|
77
78
|
}, {
|
|
@@ -85,9 +86,9 @@ function N(r, t, e, b, i, u) {
|
|
|
85
86
|
t[5] || (t[5] = l("th", { align: "right" }, null, -1))
|
|
86
87
|
])
|
|
87
88
|
]),
|
|
88
|
-
(n(), p(
|
|
89
|
+
(n(), p(v(i.limit > 1 ? "a-draggable" : "span"), _({ tag: "tbody" }, i.limit > 1 ? { filter: ".del", handle: ".sort", list: i.list, onChange: u.change } : {}), {
|
|
89
90
|
default: g(() => [
|
|
90
|
-
(n(!0),
|
|
91
|
+
(n(!0), r(a, null, c(i.list, (o, m) => (n(), r("tr", null, [
|
|
91
92
|
t[7] || (t[7] = l("td", null, [
|
|
92
93
|
l("div", {
|
|
93
94
|
class: "sort op-70",
|
|
@@ -96,22 +97,22 @@ function N(r, t, e, b, i, u) {
|
|
|
96
97
|
l("i", { class: "i-ri-menu-line" })
|
|
97
98
|
])
|
|
98
99
|
], -1)),
|
|
99
|
-
(n(!0),
|
|
100
|
-
(n(), p(
|
|
100
|
+
(n(!0), r(a, null, c(i.cols, (d) => (n(), r("td", null, [
|
|
101
|
+
(n(), p(k, {
|
|
101
102
|
clearable: d.clearable ?? e.init.clearable ?? !1,
|
|
102
103
|
cols: i.cols,
|
|
103
|
-
index:
|
|
104
|
+
index: m,
|
|
104
105
|
key: i.key,
|
|
105
106
|
prop: d,
|
|
106
|
-
modelValue:
|
|
107
|
-
"
|
|
108
|
-
}, null, 8, ["clearable", "cols", "index", "prop", "modelValue", "
|
|
107
|
+
"onUpdate:modelValue": (x) => u.change2(x, m, d),
|
|
108
|
+
"model-value": d.field ? o[d.field] : o
|
|
109
|
+
}, null, 8, ["clearable", "cols", "index", "prop", "onUpdate:modelValue", "model-value"]))
|
|
109
110
|
]))), 256)),
|
|
110
111
|
l("td", null, [
|
|
111
112
|
l("div", {
|
|
112
113
|
title: "删除",
|
|
113
114
|
class: "del op-70 flex",
|
|
114
|
-
onClick: (d) => u.del(
|
|
115
|
+
onClick: (d) => u.del(m)
|
|
115
116
|
}, [...t[6] || (t[6] = [
|
|
116
117
|
l("i", { class: "i-ri-delete-bin-line" }, null, -1)
|
|
117
118
|
])], 8, E)
|
|
@@ -121,18 +122,18 @@ function N(r, t, e, b, i, u) {
|
|
|
121
122
|
_: 1
|
|
122
123
|
}, 16))
|
|
123
124
|
]),
|
|
124
|
-
i.list.length < i.limit ? (n(),
|
|
125
|
+
i.list.length < i.limit ? (n(), r("div", {
|
|
125
126
|
key: 0,
|
|
126
|
-
class:
|
|
127
|
-
onClick: t[0] || (t[0] = (...
|
|
127
|
+
class: j(["add flex justify-center items-center info-hide", { "add-small": e.init.size === "small" }]),
|
|
128
|
+
onClick: t[0] || (t[0] = (...o) => u.add && u.add(...o))
|
|
128
129
|
}, [
|
|
129
130
|
t[8] || (t[8] = l("i", { class: "i-ri-add-line font-xl" }, null, -1)),
|
|
130
131
|
t[9] || (t[9] = l("span", null, "添加数据", -1)),
|
|
131
|
-
l("span", F, "(" +
|
|
132
|
+
l("span", F, "(" + h(i.list.length) + "/" + h(i.limit) + ")", 1)
|
|
132
133
|
], 2)) : y("", !0)
|
|
133
134
|
]);
|
|
134
135
|
}
|
|
135
|
-
const U = /* @__PURE__ */ O(T, [["render", N], ["__scopeId", "data-v-
|
|
136
|
+
const U = /* @__PURE__ */ O(T, [["render", N], ["__scopeId", "data-v-ffa2bfb0"]]);
|
|
136
137
|
export {
|
|
137
138
|
U as default
|
|
138
139
|
};
|