hlrender 0.0.107 → 0.0.108
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 +2 -3
- package/render.es.js +4 -4
- package/render.umd.js +80 -83
- package/sfcview-b9f25000.js +91 -0
- package/sfcview-ccbbde59.js +0 -94
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
};
|
package/sfcview-ccbbde59.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { D as S, B as d } from "./baseImp-26b9c04a.js";
|
|
2
|
-
import { T, h as w, e as $, j as F } from "./enum-type-4a798b1a.js";
|
|
3
|
-
import { c as h } from "./enum-type-bb2bfafa.js";
|
|
4
|
-
import { n as j, o as I } from "./index-a7d766e7.js";
|
|
5
|
-
import { g as O } 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 Q = (e, o = {}) => `
|
|
15
|
-
${E(e)}
|
|
16
|
-
${C(o)}
|
|
17
|
-
${J()}
|
|
18
|
-
`, E = (e) => {
|
|
19
|
-
const { buildTmpl: o } = k(), n = W(e);
|
|
20
|
-
var c = n == null ? void 0 : n.map((a) => o(a, v));
|
|
21
|
-
return `<template>
|
|
22
|
-
${((a) => {
|
|
23
|
-
var i;
|
|
24
|
-
var u = (i = a == null ? void 0 : a.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 : i.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
|
-
})(c)}
|
|
41
|
-
</template>`;
|
|
42
|
-
}, v = "formData", C = (e = {}) => `<script>
|
|
43
|
-
${`export default {
|
|
44
|
-
${[T(e) ? void 0 : `
|
|
45
|
-
data() {
|
|
46
|
-
return ${w({ [v]: e })};
|
|
47
|
-
}`].filter((c) => !F(c)).join(",")}
|
|
48
|
-
}`}
|
|
49
|
-
<\/script>`, J = () => `<style scoped>
|
|
50
|
-
.hl-view-table{width:100%;color:gray;}
|
|
51
|
-
.hl-view-table th.title{background-color:#e2e2e2;}
|
|
52
|
-
.hl-view-table td.label{background-color:#eeeeee;}
|
|
53
|
-
.hl-view-table td,.hl-view-table th{border:1px solid #cccccc;border-collapse:collapse;padding:5px;}
|
|
54
|
-
.hl-view-table .hl-row{border:1px solid #eeeeee;}
|
|
55
|
-
</style>`, W = (e) => {
|
|
56
|
-
const o = [];
|
|
57
|
-
return j(e, o, !1, (n) => !!n.dynamicItemFlag), o == null ? void 0 : o.filter((n) => n == null ? void 0 : n.formItemFlag);
|
|
58
|
-
};
|
|
59
|
-
function k() {
|
|
60
|
-
const e = {}, o = (t, r) => {
|
|
61
|
-
e[t] = r;
|
|
62
|
-
}, n = (t) => {
|
|
63
|
-
const r = d.getOptions(t, "content"), l = d.getOptions(t, "label"), m = d.getOptions(t, "name");
|
|
64
|
-
return l || r || m;
|
|
65
|
-
}, c = (t) => d.getOptions(t, "name"), _ = (t, r) => {
|
|
66
|
-
const l = n(t), m = c(t);
|
|
67
|
-
return { label: l, content: `{{${r ? r + "." : ""}${m}}}` };
|
|
68
|
-
}, a = (t, r) => {
|
|
69
|
-
const l = n(t), m = c(t), p = [];
|
|
70
|
-
I(t, p);
|
|
71
|
-
const g = `item_${O()}`, f = `${r ? r + "." : ""}${m}`;
|
|
72
|
-
var b = p == null ? void 0 : p.map((s) => i(s, g));
|
|
73
|
-
const y = `
|
|
74
|
-
<div v-for="${g} in ${f}" class="hl-row">
|
|
75
|
-
${b == null ? void 0 : b.map((s) => `<div>${s == null ? void 0 : s.label}:${s == null ? void 0 : s.content}</div>`).join(`
|
|
76
|
-
`)}
|
|
77
|
-
</div>
|
|
78
|
-
`;
|
|
79
|
-
return { label: l, content: y };
|
|
80
|
-
}, u = () => {
|
|
81
|
-
S(h).forEach((t) => {
|
|
82
|
-
o(t.label, _);
|
|
83
|
-
}), o(h.multirow, a);
|
|
84
|
-
}, i = (t, r) => {
|
|
85
|
-
var l;
|
|
86
|
-
return (l = e[t.type]) == null ? void 0 : l.call(e, t, r);
|
|
87
|
-
};
|
|
88
|
-
return u(), {
|
|
89
|
-
buildTmpl: i
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
export {
|
|
93
|
-
Q as genSFCView
|
|
94
|
-
};
|