hlrender 0.0.108 → 0.0.109
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/package.json +3 -2
- package/render.es.js +834 -834
- package/render.umd.js +128 -163
- package/sfcview-71a208d6.js +65 -0
- package/sfcview-b9f25000.js +0 -91
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { D as d, B as s } from "./baseImp-26b9c04a.js";
|
|
2
|
+
import { c as l } from "./enum-type-bb2bfafa.js";
|
|
3
|
+
import { f as O, n as k, o as E } from "./index-a7d766e7.js";
|
|
4
|
+
import { l as W } from "./expression-490b4335.js";
|
|
5
|
+
import "./enum-type-4a798b1a.js";
|
|
6
|
+
import "vue";
|
|
7
|
+
import "./icon-a0e0cdb0.js";
|
|
8
|
+
import "./dialog-c4706078.js";
|
|
9
|
+
import "./_commonjsHelpers-e7ea1525.js";
|
|
10
|
+
import "./uuid-4999945f.js";
|
|
11
|
+
import "element-plus";
|
|
12
|
+
import "./source-map-b04aec4a.js";
|
|
13
|
+
import "./esprima-e8d15055.js";
|
|
14
|
+
const z = (h, i) => {
|
|
15
|
+
const b = (m, n) => {
|
|
16
|
+
const r = [], o = (e) => !!e.dynamicItemFlag;
|
|
17
|
+
k(m, r, !1, o);
|
|
18
|
+
var c = r == null ? void 0 : r.filter((e) => e == null ? void 0 : e.formItemFlag);
|
|
19
|
+
return c == null || c.forEach((e) => {
|
|
20
|
+
if (!(e != null && e.dynamicItemFlag))
|
|
21
|
+
n.push({ widget: y(e) });
|
|
22
|
+
else {
|
|
23
|
+
const u = [];
|
|
24
|
+
E(e, u, !1, o);
|
|
25
|
+
const _ = [];
|
|
26
|
+
b(u, _), n.push({ widget: y(e), children: _, multirow: !0 });
|
|
27
|
+
}
|
|
28
|
+
}), n;
|
|
29
|
+
}, p = (m) => s.getOptions(m, "name"), F = () => {
|
|
30
|
+
const m = [];
|
|
31
|
+
var n = i ? O(h, (o) => p(o) === (i == null ? void 0 : i.fName) || (o == null ? void 0 : o.type) == (i == null ? void 0 : i.wdt), !1) : h;
|
|
32
|
+
return b(n, m);
|
|
33
|
+
}, y = (m) => {
|
|
34
|
+
var I;
|
|
35
|
+
const n = {}, r = (t, a) => {
|
|
36
|
+
n[t] = a;
|
|
37
|
+
}, o = (t) => {
|
|
38
|
+
const a = s.getOptions(t, "content"), f = s.getOptions(t, "label"), g = s.getOptions(t, "name");
|
|
39
|
+
return f || a || g;
|
|
40
|
+
}, c = (t) => ({ label: o(t), key: p(t) }), e = (t) => {
|
|
41
|
+
let a = s.getOptions(t, "textName"), f = s.getOptions(t, "multiple");
|
|
42
|
+
const g = a || `${p(t)}${W.optionText}`;
|
|
43
|
+
return { label: o(t), key: `${g}`, multiple: f };
|
|
44
|
+
}, u = (t) => ({ label: o(t), key: p(t) });
|
|
45
|
+
return (() => {
|
|
46
|
+
d(l).forEach((t) => {
|
|
47
|
+
r(t.label, c);
|
|
48
|
+
}), [
|
|
49
|
+
l.select,
|
|
50
|
+
l.radio,
|
|
51
|
+
l.checkbox,
|
|
52
|
+
l.cascader,
|
|
53
|
+
l.autoComplete
|
|
54
|
+
].forEach((t) => {
|
|
55
|
+
r(t, e);
|
|
56
|
+
}), r(l.multirow, u);
|
|
57
|
+
})(), (I = n[m.type]) == null ? void 0 : I.call(n, m);
|
|
58
|
+
};
|
|
59
|
+
return {
|
|
60
|
+
filterFieldItems: F
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
z as useGenFieldItemList
|
|
65
|
+
};
|
package/sfcview-b9f25000.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { D as S, B as b } from "./baseImp-26b9c04a.js";
|
|
2
|
-
import { e as $, j as w } from "./enum-type-4a798b1a.js";
|
|
3
|
-
import { c as h } from "./enum-type-bb2bfafa.js";
|
|
4
|
-
import { n as T, o as F } from "./index-a7d766e7.js";
|
|
5
|
-
import { g as j } from "./uuid-4999945f.js";
|
|
6
|
-
import "./expression-490b4335.js";
|
|
7
|
-
import "./source-map-b04aec4a.js";
|
|
8
|
-
import "./_commonjsHelpers-e7ea1525.js";
|
|
9
|
-
import "./esprima-e8d15055.js";
|
|
10
|
-
import "./icon-a0e0cdb0.js";
|
|
11
|
-
import "vue";
|
|
12
|
-
import "./dialog-c4706078.js";
|
|
13
|
-
import "element-plus";
|
|
14
|
-
const M = (o) => `
|
|
15
|
-
${I(o)}
|
|
16
|
-
${O()}
|
|
17
|
-
${C()}
|
|
18
|
-
`, I = (o) => {
|
|
19
|
-
const { buildTmpl: r } = W(), e = E(o);
|
|
20
|
-
var m = e == null ? void 0 : e.map((c) => r(c, v));
|
|
21
|
-
return `<template>
|
|
22
|
-
${((c) => {
|
|
23
|
-
var a;
|
|
24
|
-
var u = (a = c == null ? void 0 : c.map((t) => t ? `
|
|
25
|
-
<tr>
|
|
26
|
-
<td class="label">${t.label}</td>
|
|
27
|
-
<td class="content">${t.content}</td>
|
|
28
|
-
</tr>
|
|
29
|
-
` : "")) == null ? void 0 : a.join(`
|
|
30
|
-
`);
|
|
31
|
-
return `
|
|
32
|
-
<table class="hl-view-table">
|
|
33
|
-
<tr>
|
|
34
|
-
<th class="title">${$.i18nt("designer.hint.title")}</th>
|
|
35
|
-
<th class="title">${$.i18nt("designer.hint.value")}</th>
|
|
36
|
-
</tr>
|
|
37
|
-
${u}
|
|
38
|
-
</table>
|
|
39
|
-
`;
|
|
40
|
-
})(m)}
|
|
41
|
-
</template>`;
|
|
42
|
-
}, v = "formData", O = () => `<script>
|
|
43
|
-
${`export default {
|
|
44
|
-
${[` props: {${v}:Object}`].filter((e) => !w(e)).join(",")}
|
|
45
|
-
}`}
|
|
46
|
-
<\/script>`, C = () => `<style scoped>
|
|
47
|
-
.hl-view-table{width:100%;color:gray;}
|
|
48
|
-
.hl-view-table th.title{background-color:#e2e2e2;}
|
|
49
|
-
.hl-view-table td.label{background-color:#eeeeee;}
|
|
50
|
-
.hl-view-table td,.hl-view-table th{border:1px solid #cccccc;border-collapse:collapse;padding:5px;}
|
|
51
|
-
.hl-view-table .hl-row{border:1px solid #eeeeee;}
|
|
52
|
-
</style>`, E = (o) => {
|
|
53
|
-
const r = [];
|
|
54
|
-
return T(o, r, !1, (e) => !!e.dynamicItemFlag), r == null ? void 0 : r.filter((e) => e == null ? void 0 : e.formItemFlag);
|
|
55
|
-
};
|
|
56
|
-
function W() {
|
|
57
|
-
const o = {}, r = (t, n) => {
|
|
58
|
-
o[t] = n;
|
|
59
|
-
}, e = (t) => {
|
|
60
|
-
const n = b.getOptions(t, "content"), l = b.getOptions(t, "label"), i = b.getOptions(t, "name");
|
|
61
|
-
return l || n || i;
|
|
62
|
-
}, m = (t) => b.getOptions(t, "name"), _ = (t, n) => {
|
|
63
|
-
const l = e(t), i = m(t);
|
|
64
|
-
return { label: l, content: `{{${n ? n + "." : ""}${i}}}` };
|
|
65
|
-
}, c = (t, n) => {
|
|
66
|
-
const l = e(t), i = m(t), p = [];
|
|
67
|
-
F(t, p);
|
|
68
|
-
const g = `item_${j()}`, f = `${n ? n + "." : ""}${i}`;
|
|
69
|
-
var d = p == null ? void 0 : p.map((s) => a(s, g));
|
|
70
|
-
const y = `
|
|
71
|
-
<div v-for="${g} in ${f}" class="hl-row">
|
|
72
|
-
${d == null ? void 0 : d.map((s) => `<div>${s == null ? void 0 : s.label}:${s == null ? void 0 : s.content}</div>`).join(`
|
|
73
|
-
`)}
|
|
74
|
-
</div>
|
|
75
|
-
`;
|
|
76
|
-
return { label: l, content: y };
|
|
77
|
-
}, u = () => {
|
|
78
|
-
S(h).forEach((t) => {
|
|
79
|
-
r(t.label, _);
|
|
80
|
-
}), r(h.multirow, c);
|
|
81
|
-
}, a = (t, n) => {
|
|
82
|
-
var l;
|
|
83
|
-
return (l = o[t.type]) == null ? void 0 : l.call(o, t, n);
|
|
84
|
-
};
|
|
85
|
-
return u(), {
|
|
86
|
-
buildTmpl: a
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
export {
|
|
90
|
-
M as genSFCView
|
|
91
|
-
};
|