@fangzhongya/vue-archive 0.0.46 → 0.0.47
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/node/index.cjs +129 -98
- package/dist/node/index.js +129 -98
- package/dist/packages/components/compo/index.vue.cjs +1 -1
- package/dist/packages/components/compo/index.vue.js +18 -16
- package/dist/packages/components/compo/info-top.vue.cjs +1 -0
- package/dist/packages/components/compo/info-top.vue.js +32 -0
- package/dist/packages/components/compo/info-top.vue2.cjs +1 -0
- package/dist/packages/components/compo/info-top.vue2.js +4 -0
- package/dist/packages/components/compo/props.vue.cjs +1 -1
- package/dist/packages/components/compo/props.vue.js +44 -40
- package/dist/packages/components/compo/top.cjs +1 -1
- package/dist/packages/components/compo/top.js +69 -48
- package/dist/packages/components/main/index.vue.cjs +1 -1
- package/dist/packages/components/main/index.vue.js +30 -25
- package/dist/packages/components/test/index.cjs +1 -1
- package/dist/packages/components/test/index.js +24 -22
- package/dist/packages/components/test/top.cjs +1 -1
- package/dist/packages/components/test/top.js +69 -84
- package/dist/packages/page/develop/index.vue2.cjs +1 -1
- package/dist/packages/page/develop/index.vue2.js +2 -1
- package/package.json +1 -1
|
@@ -1,78 +1,82 @@
|
|
|
1
|
-
import { defineComponent as g, ref as
|
|
1
|
+
import { defineComponent as g, ref as p, reactive as $, watch as B, createElementBlock as h, openBlock as l, createCommentVNode as i, createElementVNode as o, createBlock as n, unref as u } from "vue";
|
|
2
2
|
import N from "./top.js";
|
|
3
3
|
import r from "./ftable.vue.js";
|
|
4
4
|
import { tprops as E, temits as T, texpose as V, tslot as b, getNotesText as j } from "./index.js";
|
|
5
|
-
const w = { class: "compo" }, D = {
|
|
5
|
+
const w = { class: "compo" }, D = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "compo-top"
|
|
8
|
+
}, S = { class: "compo-li compo-props" }, q = { class: "compo-li compo-emits" }, z = { class: "compo-li compo-expose" }, A = { class: "compo-li compo-slot" }, J = /* @__PURE__ */ g({
|
|
6
9
|
__name: "props",
|
|
7
10
|
props: {
|
|
8
|
-
value: String
|
|
11
|
+
value: String,
|
|
12
|
+
istop: Boolean
|
|
9
13
|
},
|
|
10
14
|
emits: ["change"],
|
|
11
|
-
setup(
|
|
12
|
-
const v =
|
|
15
|
+
setup(c, { emit: y }) {
|
|
16
|
+
const v = c, C = y, m = p([]), e = $({
|
|
13
17
|
props: !0,
|
|
14
18
|
expose: !0,
|
|
15
19
|
emits: !0,
|
|
16
20
|
slot: !0,
|
|
17
21
|
top: !0
|
|
18
|
-
}),
|
|
22
|
+
}), d = p([]), k = p([]), f = p([]), x = p([]);
|
|
19
23
|
function _() {
|
|
20
24
|
if (v.value) {
|
|
21
25
|
const s = j(v.value);
|
|
22
|
-
|
|
26
|
+
m.value = s.titles, d.value = s.propss, x.value = s.slots, k.value = s.emitss, f.value = s.exposes, C("change", s);
|
|
23
27
|
}
|
|
24
28
|
}
|
|
25
|
-
return
|
|
29
|
+
return B(
|
|
26
30
|
() => v.value,
|
|
27
31
|
() => {
|
|
28
32
|
_();
|
|
29
33
|
}
|
|
30
|
-
), _(), (s,
|
|
31
|
-
|
|
32
|
-
e.top ? (l(),
|
|
34
|
+
), _(), (s, t) => (l(), h("div", w, [
|
|
35
|
+
c.istop ? (l(), h("div", D, [
|
|
36
|
+
e.top ? (l(), n(u(N), {
|
|
33
37
|
key: 0,
|
|
34
|
-
value:
|
|
35
|
-
}, null, 8, ["value"])) :
|
|
36
|
-
]),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
onClick:
|
|
40
|
-
}, "
|
|
41
|
-
e.props ? (l(),
|
|
38
|
+
value: m.value
|
|
39
|
+
}, null, 8, ["value"])) : i("", !0)
|
|
40
|
+
])) : i("", !0),
|
|
41
|
+
o("div", S, [
|
|
42
|
+
o("h4", {
|
|
43
|
+
onClick: t[0] || (t[0] = (a) => e.props = !e.props)
|
|
44
|
+
}, "组件属性"),
|
|
45
|
+
e.props ? (l(), n(r, {
|
|
42
46
|
key: 0,
|
|
43
47
|
list: u(E),
|
|
44
|
-
value:
|
|
45
|
-
}, null, 8, ["list", "value"])) :
|
|
48
|
+
value: d.value
|
|
49
|
+
}, null, 8, ["list", "value"])) : i("", !0)
|
|
46
50
|
]),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
onClick:
|
|
50
|
-
}, "
|
|
51
|
-
e.emits ? (l(),
|
|
51
|
+
o("div", q, [
|
|
52
|
+
o("h4", {
|
|
53
|
+
onClick: t[1] || (t[1] = (a) => e.emits = !e.emits)
|
|
54
|
+
}, "组件事件"),
|
|
55
|
+
e.emits ? (l(), n(r, {
|
|
52
56
|
key: 0,
|
|
53
57
|
list: u(T),
|
|
54
|
-
value:
|
|
55
|
-
}, null, 8, ["list", "value"])) :
|
|
58
|
+
value: k.value
|
|
59
|
+
}, null, 8, ["list", "value"])) : i("", !0)
|
|
56
60
|
]),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
onClick:
|
|
60
|
-
}, "
|
|
61
|
-
e.expose ? (l(),
|
|
61
|
+
o("div", z, [
|
|
62
|
+
o("h4", {
|
|
63
|
+
onClick: t[2] || (t[2] = (a) => e.expose = !e.expose)
|
|
64
|
+
}, "组件方法"),
|
|
65
|
+
e.expose ? (l(), n(r, {
|
|
62
66
|
key: 0,
|
|
63
67
|
list: u(V),
|
|
64
68
|
value: f.value
|
|
65
|
-
}, null, 8, ["list", "value"])) :
|
|
69
|
+
}, null, 8, ["list", "value"])) : i("", !0)
|
|
66
70
|
]),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
onClick:
|
|
71
|
+
o("div", A, [
|
|
72
|
+
o("h4", {
|
|
73
|
+
onClick: t[3] || (t[3] = (a) => e.slot = !e.slot)
|
|
70
74
|
}, "组件插槽"),
|
|
71
|
-
e.slot ? (l(),
|
|
75
|
+
e.slot ? (l(), n(r, {
|
|
72
76
|
key: 0,
|
|
73
77
|
list: u(b),
|
|
74
|
-
value:
|
|
75
|
-
}, null, 8, ["list", "value"])) :
|
|
78
|
+
value: x.value
|
|
79
|
+
}, null, 8, ["list", "value"])) : i("", !0)
|
|
76
80
|
])
|
|
77
81
|
]));
|
|
78
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("@fangzhongya/utils/html/htmlEscape");function v(m,e,u){let i=[],f=[],l=[];const n=t=>t,a=()=>{l.length>0&&(i.push(e("div",{class:"compo-top-list"},l)),l=[])},c=()=>{i.length>0&&(f.push(e("div",{class:"compo-top-division"},i)),i=[])};return m?.forEach(t=>{const r=[];let o=!1;if(t.date&&(o=!0,r.push(e("div",{class:"compo-top-date"},[e("span",{},"更新时间:"),e("span",{},[n(t.date.name+" "+t.date.description)])]))),t.author&&(o=!0,r.push(e("div",{class:"compo-top-author"},[e("span",{},"作者:"),e("span",{},[n(t.author.name+" "+t.author.description)])]))),t.title&&(t.title.type||t.title.name||t.title.description)){a(),o&&c();let s=(t.title.type||"div").split("."),p=s[1]||"";s[0]=="html"?i.push(e("div",{class:"compo-top-title "+p,innerHTML:t.title.name+" "+t.title.description})):i.push(e(s[0],{class:"compo-top-title "+p},[e("span",{},[n(t.title.name+" "+t.title.description)])]))}if(o&&(l.length>0&&(a(),c()),i.push(e("div",{class:"compo-top-info"},r))),t.html){let s=(t.html.type||"div").split("."),p=s[1]||"";l.push(e(s[0],{class:"compo-top-html "+p,innerHTML:t.html.name+" "+t.html.description}))}["text"].forEach(s=>{if(t[s]){let p=(t[s].type||"div").split("."),h=p[1]||"";p[0]=="html"?l.push(e("div",{class:"compo-top-"+s+" "+h,innerHTML:t[s].name+" "+t[s].description})):l.push(e(p[0],{class:"compo-top-"+s+" "+h},[e("span",{},[n(t[s].name+" "+t[s].description)])]))}})}),a(),c(),f}const y=d.defineComponent({props:{value:Array},render(m,e,u){const i=v(u.value,d.h);return d.h("div",{class:"compo-top"},i)}});exports.default=y;exports.getTopDom=v;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as y, h } from "vue";
|
|
2
2
|
import "@fangzhongya/utils/html/htmlEscape";
|
|
3
|
-
function v(
|
|
4
|
-
let
|
|
5
|
-
const
|
|
6
|
-
|
|
3
|
+
function v(m, e, d) {
|
|
4
|
+
let i = [], u = [], l = [];
|
|
5
|
+
const n = (t) => t, a = () => {
|
|
6
|
+
l.length > 0 && (i.push(
|
|
7
7
|
e(
|
|
8
8
|
"div",
|
|
9
9
|
{
|
|
10
10
|
class: "compo-top-list"
|
|
11
11
|
},
|
|
12
|
-
|
|
12
|
+
l
|
|
13
13
|
)
|
|
14
|
-
),
|
|
15
|
-
},
|
|
16
|
-
|
|
14
|
+
), l = []);
|
|
15
|
+
}, c = () => {
|
|
16
|
+
i.length > 0 && (u.push(
|
|
17
17
|
e(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
20
|
class: "compo-top-division"
|
|
21
21
|
},
|
|
22
|
-
|
|
22
|
+
i
|
|
23
23
|
)
|
|
24
|
-
),
|
|
24
|
+
), i = []);
|
|
25
25
|
};
|
|
26
|
-
return
|
|
27
|
-
const
|
|
26
|
+
return m?.forEach((t) => {
|
|
27
|
+
const r = [];
|
|
28
28
|
let o = !1;
|
|
29
|
-
if (t.date && (o = !0,
|
|
29
|
+
if (t.date && (o = !0, r.push(
|
|
30
30
|
e(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
@@ -35,13 +35,13 @@ function v(r, e, d) {
|
|
|
35
35
|
[
|
|
36
36
|
e("span", {}, "更新时间:"),
|
|
37
37
|
e("span", {}, [
|
|
38
|
-
|
|
38
|
+
n(
|
|
39
39
|
t.date.name + " " + t.date.description
|
|
40
40
|
)
|
|
41
41
|
])
|
|
42
42
|
]
|
|
43
43
|
)
|
|
44
|
-
)), t.author && (o = !0,
|
|
44
|
+
)), t.author && (o = !0, r.push(
|
|
45
45
|
e(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
@@ -50,24 +50,29 @@ function v(r, e, d) {
|
|
|
50
50
|
[
|
|
51
51
|
e("span", {}, "作者:"),
|
|
52
52
|
e("span", {}, [
|
|
53
|
-
|
|
53
|
+
n(
|
|
54
54
|
t.author.name + " " + t.author.description
|
|
55
55
|
)
|
|
56
56
|
])
|
|
57
57
|
]
|
|
58
58
|
)
|
|
59
59
|
)), t.title && (t.title.type || t.title.name || t.title.description)) {
|
|
60
|
-
|
|
61
|
-
let
|
|
62
|
-
s.push(
|
|
60
|
+
a(), o && c();
|
|
61
|
+
let s = (t.title.type || "div").split("."), p = s[1] || "";
|
|
62
|
+
s[0] == "html" ? i.push(
|
|
63
|
+
e("div", {
|
|
64
|
+
class: "compo-top-title " + p,
|
|
65
|
+
innerHTML: t.title.name + " " + t.title.description
|
|
66
|
+
})
|
|
67
|
+
) : i.push(
|
|
63
68
|
e(
|
|
64
|
-
|
|
69
|
+
s[0],
|
|
65
70
|
{
|
|
66
|
-
class: "compo-top-title"
|
|
71
|
+
class: "compo-top-title " + p
|
|
67
72
|
},
|
|
68
73
|
[
|
|
69
74
|
e("span", {}, [
|
|
70
|
-
|
|
75
|
+
n(
|
|
71
76
|
t.title.name + " " + t.title.description
|
|
72
77
|
)
|
|
73
78
|
])
|
|
@@ -75,53 +80,69 @@ function v(r, e, d) {
|
|
|
75
80
|
)
|
|
76
81
|
);
|
|
77
82
|
}
|
|
78
|
-
if (o && (
|
|
83
|
+
if (o && (l.length > 0 && (a(), c()), i.push(
|
|
79
84
|
e(
|
|
80
85
|
"div",
|
|
81
86
|
{
|
|
82
87
|
class: "compo-top-info"
|
|
83
88
|
},
|
|
84
|
-
|
|
89
|
+
r
|
|
85
90
|
)
|
|
86
|
-
)), t.
|
|
87
|
-
let
|
|
88
|
-
|
|
89
|
-
e(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
[
|
|
95
|
-
e("span", {}, [
|
|
96
|
-
p(
|
|
97
|
-
t.text.name + " " + t.text.description
|
|
98
|
-
)
|
|
99
|
-
])
|
|
100
|
-
]
|
|
101
|
-
)
|
|
91
|
+
)), t.html) {
|
|
92
|
+
let s = (t.html.type || "div").split("."), p = s[1] || "";
|
|
93
|
+
l.push(
|
|
94
|
+
e(s[0], {
|
|
95
|
+
class: "compo-top-html " + p,
|
|
96
|
+
innerHTML: t.html.name + " " + t.html.description
|
|
97
|
+
})
|
|
102
98
|
);
|
|
103
99
|
}
|
|
104
|
-
|
|
100
|
+
["text"].forEach((s) => {
|
|
101
|
+
if (t[s]) {
|
|
102
|
+
let p = (t[s].type || "div").split("."), f = p[1] || "";
|
|
103
|
+
p[0] == "html" ? l.push(
|
|
104
|
+
e("div", {
|
|
105
|
+
class: "compo-top-" + s + " " + f,
|
|
106
|
+
innerHTML: t[s].name + " " + t[s].description
|
|
107
|
+
})
|
|
108
|
+
) : l.push(
|
|
109
|
+
e(
|
|
110
|
+
p[0],
|
|
111
|
+
{
|
|
112
|
+
class: "compo-top-" + s + " " + f
|
|
113
|
+
},
|
|
114
|
+
[
|
|
115
|
+
e("span", {}, [
|
|
116
|
+
n(
|
|
117
|
+
t[s].name + " " + t[s].description
|
|
118
|
+
)
|
|
119
|
+
])
|
|
120
|
+
]
|
|
121
|
+
)
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}), a(), c(), u;
|
|
105
126
|
}
|
|
106
|
-
const
|
|
127
|
+
const H = y({
|
|
107
128
|
/**
|
|
108
129
|
* @props {Stinrg} value 插入数据
|
|
109
130
|
*/
|
|
110
131
|
props: {
|
|
111
132
|
value: Array
|
|
112
133
|
},
|
|
113
|
-
render(
|
|
114
|
-
const
|
|
115
|
-
return
|
|
134
|
+
render(m, e, d) {
|
|
135
|
+
const i = v(d.value, h);
|
|
136
|
+
return h(
|
|
116
137
|
"div",
|
|
117
138
|
{
|
|
118
139
|
class: "compo-top"
|
|
119
140
|
},
|
|
120
|
-
|
|
141
|
+
i
|
|
121
142
|
);
|
|
122
143
|
}
|
|
123
144
|
});
|
|
124
145
|
export {
|
|
125
|
-
|
|
146
|
+
H as default,
|
|
126
147
|
v as getTopDom
|
|
127
148
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),v=require("vue-router"),r=require("../../router/index.cjs"),
|
|
1
|
+
"use strict";const e=require("vue"),v=require("vue-router"),r=require("../../router/index.cjs"),_=require("../compo/index.vue.cjs"),d=require("../compo/info.vue.cjs"),p=require("../compo/info-top.vue.cjs"),m=require("../test/index.vue.cjs"),N=require("../../utils/glob.cjs"),f={class:"main"},V={class:"main-top"},E={class:"main-compo-top"},k={class:"main-but"},g={class:"main-test"},q={class:"main-compo"},b=e.defineComponent({__name:"index",props:{value:Object},setup(l){const u=v.useRouter(),t=l,c=e.ref([]);e.watch(()=>t.value,()=>{a()});function a(){c.value=N.getTestName(t.value?.key)}a();function i(o){o==1?r.toCompon(u,t.value):o==2?r.toTests(u,t.value):o==3&&r.toDevelop(u,t.value)}return(o,n)=>(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",V,[e.createVNode(d,{value:l.value},null,8,["value"])]),e.createElementVNode("div",E,[e.createVNode(p,{value:l.value},null,8,["value"])]),e.createElementVNode("div",k,[e.createElementVNode("div",{class:"but-div",onClick:n[0]||(n[0]=s=>i(1))},"当前"),e.createElementVNode("div",{class:"but-div",onClick:n[1]||(n[1]=s=>i(2))},"更多"),e.createElementVNode("div",{class:"but-div",onClick:n[2]||(n[2]=s=>i(3))},"开发")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,s=>(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(m,{value:s},null,8,["value"])]))),256)),e.createElementVNode("div",q,[e.createVNode(_,{istop:!1,value:t.value},null,8,["value"])])]))}});module.exports=b;
|
|
@@ -1,59 +1,64 @@
|
|
|
1
|
-
import { defineComponent as d, ref as f, watch as p, createElementBlock as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as d, ref as f, watch as p, createElementBlock as m, openBlock as v, createElementVNode as e, createVNode as n, Fragment as _, renderList as $ } from "vue";
|
|
2
|
+
import { useRouter as C } from "vue-router";
|
|
3
3
|
import { toCompon as b, toTests as k, toDevelop as g } from "../../router/index.js";
|
|
4
4
|
import x from "../compo/index.vue.js";
|
|
5
5
|
import N from "../compo/info.vue.js";
|
|
6
|
+
import h from "../compo/info-top.vue.js";
|
|
6
7
|
import B from "../test/index.vue.js";
|
|
7
8
|
import { getTestName as E } from "../../utils/glob.js";
|
|
8
|
-
const T = { class: "main" }, V = { class: "main-top" },
|
|
9
|
+
const T = { class: "main" }, V = { class: "main-top" }, j = { class: "main-compo-top" }, w = { class: "main-but" }, D = { class: "main-test" }, F = { class: "main-compo" }, I = /* @__PURE__ */ d({
|
|
9
10
|
__name: "index",
|
|
10
11
|
props: {
|
|
11
12
|
value: Object
|
|
12
13
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
14
|
+
setup(i) {
|
|
15
|
+
const a = C(), t = i, r = f([]);
|
|
15
16
|
p(
|
|
16
|
-
() =>
|
|
17
|
+
() => t.value,
|
|
17
18
|
() => {
|
|
18
19
|
c();
|
|
19
20
|
}
|
|
20
21
|
);
|
|
21
22
|
function c() {
|
|
22
|
-
|
|
23
|
+
r.value = E(t.value?.key);
|
|
23
24
|
}
|
|
24
25
|
c();
|
|
25
|
-
function
|
|
26
|
-
s == 1 ? b(
|
|
26
|
+
function u(s) {
|
|
27
|
+
s == 1 ? b(a, t.value) : s == 2 ? k(a, t.value) : s == 3 && g(a, t.value);
|
|
27
28
|
}
|
|
28
|
-
return (s,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
return (s, o) => (v(), m("div", T, [
|
|
30
|
+
e("div", V, [
|
|
31
|
+
n(N, { value: i.value }, null, 8, ["value"])
|
|
31
32
|
]),
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
e("div", j, [
|
|
34
|
+
n(h, { value: i.value }, null, 8, ["value"])
|
|
35
|
+
]),
|
|
36
|
+
e("div", w, [
|
|
37
|
+
e("div", {
|
|
34
38
|
class: "but-div",
|
|
35
|
-
onClick:
|
|
39
|
+
onClick: o[0] || (o[0] = (l) => u(1))
|
|
36
40
|
}, "当前"),
|
|
37
|
-
|
|
41
|
+
e("div", {
|
|
38
42
|
class: "but-div",
|
|
39
|
-
onClick:
|
|
43
|
+
onClick: o[1] || (o[1] = (l) => u(2))
|
|
40
44
|
}, "更多"),
|
|
41
|
-
|
|
45
|
+
e("div", {
|
|
42
46
|
class: "but-div",
|
|
43
|
-
onClick:
|
|
47
|
+
onClick: o[2] || (o[2] = (l) => u(3))
|
|
44
48
|
}, "开发")
|
|
45
49
|
]),
|
|
46
|
-
(
|
|
47
|
-
|
|
50
|
+
(v(!0), m(_, null, $(r.value, (l) => (v(), m("div", D, [
|
|
51
|
+
n(B, { value: l }, null, 8, ["value"])
|
|
48
52
|
]))), 256)),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
e("div", F, [
|
|
54
|
+
n(x, {
|
|
55
|
+
istop: !1,
|
|
56
|
+
value: t.value
|
|
52
57
|
}, null, 8, ["value"])
|
|
53
58
|
])
|
|
54
59
|
]));
|
|
55
60
|
}
|
|
56
61
|
});
|
|
57
62
|
export {
|
|
58
|
-
|
|
63
|
+
I as default
|
|
59
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../utils/index.cjs");function E(t){return delete t.problems,delete t.source,t}function d(t,e){const s={descriptions:t?.description||""},a=[];return t?.tags&&t?.tags?.forEach((r,o)=>{let n=r.tag,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../utils/index.cjs");function E(t){return delete t.problems,delete t.source,t}function d(t,e){const s={descriptions:t?.description||""},a=[];return t?.tags&&t?.tags?.forEach((r,o)=>{let n=r.tag,i=E(r);if(!s.hasOwnProperty(n)&&e.includes(n))s[n]=i;else{let f={};f[n]=i,a.push({key:n,value:f})}}),{arr:a,obj:s}}let u=[];function T(t){const e=["title","author","date"],s=d(t,e),a={};e.forEach(r=>{a[r]=s.obj[r]}),c(a),s.arr.forEach(r=>{h(r.key,r.value)})}let l=[];function v(t){const e=["state","type"],s=d(t,e),a={};e.forEach(r=>{a[r]=s.obj[r]}),g(a),s.arr.forEach(r=>{h(r.key,r.value)})}function c(t){u.push(t)}function y(t){u.push(t)}function x(t){u.push(t)}function g(t){l.push(t)}function h(t,e){switch(t){case"title":return c(e),!0;case"proposal":return y(e),!0;case"error":return x(e),!0;case"state":return g(e),!0;case"text":return c(e),!0;case"html":return c(e),!0;default:return!1}}function S(t,e){switch(t){case"title":return T(e),!0;case"state":return v(e),!0;default:return!1}}function m(t){return u=[],l=[],p.getTextNotes(t)?.forEach(s=>{let a=s?.tags||[],r=a?.length||0;if(r>0)for(let o=0;o<r;o++){const n=a[o]||{};if(S(n.tag,s))break}}),{titles:u,states:l}}exports.getNotes=m;
|
|
@@ -6,13 +6,13 @@ function d(t, e) {
|
|
|
6
6
|
const s = {
|
|
7
7
|
descriptions: t?.description || ""
|
|
8
8
|
}, a = [];
|
|
9
|
-
return t?.tags && t?.tags?.forEach((r,
|
|
10
|
-
let n = r.tag,
|
|
9
|
+
return t?.tags && t?.tags?.forEach((r, o) => {
|
|
10
|
+
let n = r.tag, l = E(r);
|
|
11
11
|
if (!s.hasOwnProperty(n) && e.includes(n))
|
|
12
|
-
s[n] =
|
|
12
|
+
s[n] = l;
|
|
13
13
|
else {
|
|
14
14
|
let f = {};
|
|
15
|
-
f[n] =
|
|
15
|
+
f[n] = l, a.push({
|
|
16
16
|
key: n,
|
|
17
17
|
value: f
|
|
18
18
|
});
|
|
@@ -22,17 +22,17 @@ function d(t, e) {
|
|
|
22
22
|
obj: s
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
let
|
|
25
|
+
let u = [];
|
|
26
26
|
function T(t) {
|
|
27
27
|
const e = ["title", "author", "date"], s = d(t, e), a = {};
|
|
28
28
|
e.forEach((r) => {
|
|
29
29
|
a[r] = s.obj[r];
|
|
30
|
-
}),
|
|
30
|
+
}), c(a), s.arr.forEach((r) => {
|
|
31
31
|
g(r.key, r.value);
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
let i = [];
|
|
35
|
-
function
|
|
35
|
+
function m(t) {
|
|
36
36
|
const e = ["state", "type"], s = d(t, e), a = {};
|
|
37
37
|
e.forEach((r) => {
|
|
38
38
|
a[r] = s.obj[r];
|
|
@@ -40,14 +40,14 @@ function v(t) {
|
|
|
40
40
|
g(r.key, r.value);
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
43
|
+
function c(t) {
|
|
44
|
+
u.push(t);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
46
|
+
function v(t) {
|
|
47
|
+
u.push(t);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
49
|
+
function x(t) {
|
|
50
|
+
u.push(t);
|
|
51
51
|
}
|
|
52
52
|
function h(t) {
|
|
53
53
|
i.push(t);
|
|
@@ -55,15 +55,17 @@ function h(t) {
|
|
|
55
55
|
function g(t, e) {
|
|
56
56
|
switch (t) {
|
|
57
57
|
case "title":
|
|
58
|
-
return
|
|
58
|
+
return c(e), !0;
|
|
59
59
|
case "proposal":
|
|
60
|
-
return
|
|
60
|
+
return v(e), !0;
|
|
61
61
|
case "error":
|
|
62
|
-
return
|
|
62
|
+
return x(e), !0;
|
|
63
63
|
case "state":
|
|
64
64
|
return h(e), !0;
|
|
65
65
|
case "text":
|
|
66
|
-
return
|
|
66
|
+
return c(e), !0;
|
|
67
|
+
case "html":
|
|
68
|
+
return c(e), !0;
|
|
67
69
|
default:
|
|
68
70
|
return !1;
|
|
69
71
|
}
|
|
@@ -79,22 +81,22 @@ function w(t, e) {
|
|
|
79
81
|
// setError(obj);
|
|
80
82
|
// return true;
|
|
81
83
|
case "state":
|
|
82
|
-
return
|
|
84
|
+
return m(e), !0;
|
|
83
85
|
default:
|
|
84
86
|
return !1;
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
function k(t) {
|
|
88
|
-
return
|
|
90
|
+
return u = [], i = [], p(t)?.forEach((s) => {
|
|
89
91
|
let a = s?.tags || [], r = a?.length || 0;
|
|
90
92
|
if (r > 0)
|
|
91
|
-
for (let
|
|
92
|
-
const n = a[
|
|
93
|
+
for (let o = 0; o < r; o++) {
|
|
94
|
+
const n = a[o] || {};
|
|
93
95
|
if (w(n.tag, s))
|
|
94
96
|
break;
|
|
95
97
|
}
|
|
96
98
|
}), {
|
|
97
|
-
titles:
|
|
99
|
+
titles: u,
|
|
98
100
|
states: i
|
|
99
101
|
};
|
|
100
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue");require("@fangzhongya/utils/html/htmlEscape");function v(u,e,m){let i=[],f=[],p=[];const n=t=>t,r=()=>{p.length>0&&(i.push(e("div",{class:"test-top-list"},p)),p=[])},c=()=>{i.length>0&&(f.push(e("div",{class:"test-top-division"},i)),i=[])};return u.forEach(t=>{const d=[];let a=!1;if(t.date&&(a=!0,d.push(e("div",{class:"test-top-date"},[e("span",{},"更新时间:"),e("span",{},[n(t.date.name+" "+t.date.description)])]))),t.author&&(a=!0,d.push(e("div",{class:"test-top-author"},[e("span",{},"作者:"),e("span",{},[n(t.author.name+" "+t.author.description)])]))),t.title&&(t.title.type||t.title.name||t.title.description)){r(),a&&c();let s=(t.title.type||"div").split("."),l=s[1]||"";s[0]=="html"?i.push(e("div",{class:"test-top-title "+l,innerHTML:t.title.name+" "+t.title.description})):i.push(e(s[0],{class:"test-top-title "+l},[e("span",{},[n(t.title.name+" "+t.title.description)])]))}if(a&&(p.length>0&&(r(),c()),i.push(e("div",{class:"test-top-info"},d))),t.html){let s=(t.html.type||"div").split("."),l=s[1]||"";p.push(e(s[0],{class:"test-top-html "+l,innerHTML:t.html.name+" "+t.html.description}))}["text","proposal","error"].forEach(s=>{if(t[s]){let l=(t[s].type||"div").split("."),h=l[1]||"";l[0]=="html"?p.push(e("div",{class:"test-top-"+s+" "+h,innerHTML:t[s].name+" "+t[s].description})):p.push(e(l[0],{class:"test-top-"+s+" "+h},[e("span",{},[n(t[s].name+" "+t[s].description)])]))}})}),r(),c(),f}const y=o.defineComponent({props:{value:Array},render(u,e,m){const i=v(m.value,o.h);return o.h("div",{class:"test-top"},i)}});exports.default=y;exports.getTestTopDom=v;
|