@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.
@@ -1,78 +1,82 @@
1
- import { defineComponent as g, ref as i, reactive as y, watch as $, createElementBlock as B, openBlock as l, createElementVNode as t, createBlock as p, createCommentVNode as n, unref as u } from "vue";
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 = { class: "compo-top" }, 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({
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(x, { emit: h }) {
12
- const v = x, C = h, c = i([]), e = y({
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
- }), m = i([]), d = i([]), f = i([]), k = i([]);
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
- c.value = s.titles, m.value = s.propss, k.value = s.slots, d.value = s.emitss, f.value = s.exposes, C("change", s);
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, o) => (l(), B("div", w, [
31
- t("div", D, [
32
- e.top ? (l(), p(u(N), {
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: c.value
35
- }, null, 8, ["value"])) : n("", !0)
36
- ]),
37
- t("div", S, [
38
- t("h4", {
39
- onClick: o[0] || (o[0] = (a) => e.props = !e.props)
40
- }, " 组件属性 "),
41
- e.props ? (l(), p(r, {
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: m.value
45
- }, null, 8, ["list", "value"])) : n("", !0)
48
+ value: d.value
49
+ }, null, 8, ["list", "value"])) : i("", !0)
46
50
  ]),
47
- t("div", q, [
48
- t("h4", {
49
- onClick: o[1] || (o[1] = (a) => e.emits = !e.emits)
50
- }, " 组件事件 "),
51
- e.emits ? (l(), p(r, {
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: d.value
55
- }, null, 8, ["list", "value"])) : n("", !0)
58
+ value: k.value
59
+ }, null, 8, ["list", "value"])) : i("", !0)
56
60
  ]),
57
- t("div", z, [
58
- t("h4", {
59
- onClick: o[2] || (o[2] = (a) => e.expose = !e.expose)
60
- }, " 组件方法 "),
61
- e.expose ? (l(), p(r, {
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"])) : n("", !0)
69
+ }, null, 8, ["list", "value"])) : i("", !0)
66
70
  ]),
67
- t("div", A, [
68
- t("h4", {
69
- onClick: o[3] || (o[3] = (a) => e.slot = !e.slot)
71
+ o("div", A, [
72
+ o("h4", {
73
+ onClick: t[3] || (t[3] = (a) => e.slot = !e.slot)
70
74
  }, "组件插槽"),
71
- e.slot ? (l(), p(r, {
75
+ e.slot ? (l(), n(r, {
72
76
  key: 0,
73
77
  list: u(b),
74
- value: k.value
75
- }, null, 8, ["list", "value"])) : n("", !0)
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 c=require("vue");require("@fangzhongya/utils/html/htmlEscape");function f(u,e,d){let s=[],m=[],i=[];const p=t=>t,n=()=>{i.length>0&&(s.push(e("div",{class:"compo-top-list"},i)),i=[])},a=()=>{s.length>0&&(m.push(e("div",{class:"compo-top-division"},s)),s=[])};return u?.forEach(t=>{const l=[];let o=!1;if(t.date&&(o=!0,l.push(e("div",{class:"compo-top-date"},[e("span",{},"更新时间:"),e("span",{},[p(t.date.name+" "+t.date.description)])]))),t.author&&(o=!0,l.push(e("div",{class:"compo-top-author"},[e("span",{},"作者:"),e("span",{},[p(t.author.name+" "+t.author.description)])]))),t.title&&(t.title.type||t.title.name||t.title.description)){n(),o&&a();let r=t.title.type||"div";s.push(e(r,{class:"compo-top-title"},[e("span",{},[p(t.title.name+" "+t.title.description)])]))}if(o&&(i.length>0&&(n(),a()),s.push(e("div",{class:"compo-top-info"},l))),t.text){let r=t.text.type||"div";i.push(e(r,{class:"compo-top-text"},[e("span",{},[p(t.text.name+" "+t.text.description)])]))}}),n(),a(),m}const v=c.defineComponent({props:{value:Array},render(u,e,d){const s=f(d.value,c.h);return c.h("div",{class:"compo-top"},s)}});exports.default=v;exports.getTopDom=f;
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 f, h as u } from "vue";
1
+ import { defineComponent as y, h } from "vue";
2
2
  import "@fangzhongya/utils/html/htmlEscape";
3
- function v(r, e, d) {
4
- let s = [], m = [], i = [];
5
- const p = (t) => t, n = () => {
6
- i.length > 0 && (s.push(
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
- i
12
+ l
13
13
  )
14
- ), i = []);
15
- }, a = () => {
16
- s.length > 0 && (m.push(
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
- s
22
+ i
23
23
  )
24
- ), s = []);
24
+ ), i = []);
25
25
  };
26
- return r?.forEach((t) => {
27
- const l = [];
26
+ return m?.forEach((t) => {
27
+ const r = [];
28
28
  let o = !1;
29
- if (t.date && (o = !0, l.push(
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
- p(
38
+ n(
39
39
  t.date.name + " " + t.date.description
40
40
  )
41
41
  ])
42
42
  ]
43
43
  )
44
- )), t.author && (o = !0, l.push(
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
- p(
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
- n(), o && a();
61
- let c = t.title.type || "div";
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
- c,
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
- p(
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 && (i.length > 0 && (n(), a()), s.push(
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
- l
89
+ r
85
90
  )
86
- )), t.text) {
87
- let c = t.text.type || "div";
88
- i.push(
89
- e(
90
- c,
91
- {
92
- class: "compo-top-text"
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
- }), n(), a(), m;
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 g = f({
127
+ const H = y({
107
128
  /**
108
129
  * @props {Stinrg} value 插入数据
109
130
  */
110
131
  props: {
111
132
  value: Array
112
133
  },
113
- render(r, e, d) {
114
- const s = v(d.value, u);
115
- return u(
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
- s
141
+ i
121
142
  );
122
143
  }
123
144
  });
124
145
  export {
125
- g as default,
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"),d=require("../compo/index.vue.cjs"),_=require("../compo/info.vue.cjs"),m=require("../test/index.vue.cjs"),p=require("../../utils/glob.cjs"),N={class:"main"},f={class:"main-top"},k={class:"main-but"},E={class:"main-test"},V={class:"main-compo"},g=e.defineComponent({__name:"index",props:{value:Object},setup(i){const l=v.useRouter(),t=i,c=e.ref([]);e.watch(()=>t.value,()=>{a()});function a(){c.value=p.getTestName(t.value?.key)}a();function u(o){o==1?r.toCompon(l,t.value):o==2?r.toTests(l,t.value):o==3&&r.toDevelop(l,t.value)}return(o,n)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("div",f,[e.createVNode(_,{value:i.value},null,8,["value"])]),e.createElementVNode("div",k,[e.createElementVNode("div",{class:"but-div",onClick:n[0]||(n[0]=s=>u(1))},"当前"),e.createElementVNode("div",{class:"but-div",onClick:n[1]||(n[1]=s=>u(2))},"更多"),e.createElementVNode("div",{class:"but-div",onClick:n[2]||(n[2]=s=>u(3))},"开发")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,s=>(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(m,{value:s},null,8,["value"])]))),256)),e.createElementVNode("div",V,[e.createVNode(d,{value:t.value},null,8,["value"])])]))}});module.exports=g;
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 a, openBlock as u, createElementVNode as o, createVNode as r, Fragment as _, renderList as C } from "vue";
2
- import { useRouter as $ } from "vue-router";
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" }, h = { class: "main-but" }, j = { class: "main-test" }, w = { class: "main-compo" }, A = /* @__PURE__ */ d({
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(m) {
14
- const i = $(), e = m, v = f([]);
14
+ setup(i) {
15
+ const a = C(), t = i, r = f([]);
15
16
  p(
16
- () => e.value,
17
+ () => t.value,
17
18
  () => {
18
19
  c();
19
20
  }
20
21
  );
21
22
  function c() {
22
- v.value = E(e.value?.key);
23
+ r.value = E(t.value?.key);
23
24
  }
24
25
  c();
25
- function l(s) {
26
- s == 1 ? b(i, e.value) : s == 2 ? k(i, e.value) : s == 3 && g(i, e.value);
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, t) => (u(), a("div", T, [
29
- o("div", V, [
30
- r(N, { value: m.value }, null, 8, ["value"])
29
+ return (s, o) => (v(), m("div", T, [
30
+ e("div", V, [
31
+ n(N, { value: i.value }, null, 8, ["value"])
31
32
  ]),
32
- o("div", h, [
33
- o("div", {
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: t[0] || (t[0] = (n) => l(1))
39
+ onClick: o[0] || (o[0] = (l) => u(1))
36
40
  }, "当前"),
37
- o("div", {
41
+ e("div", {
38
42
  class: "but-div",
39
- onClick: t[1] || (t[1] = (n) => l(2))
43
+ onClick: o[1] || (o[1] = (l) => u(2))
40
44
  }, "更多"),
41
- o("div", {
45
+ e("div", {
42
46
  class: "but-div",
43
- onClick: t[2] || (t[2] = (n) => l(3))
47
+ onClick: o[2] || (o[2] = (l) => u(3))
44
48
  }, "开发")
45
49
  ]),
46
- (u(!0), a(_, null, C(v.value, (n) => (u(), a("div", j, [
47
- r(B, { value: n }, null, 8, ["value"])
50
+ (v(!0), m(_, null, $(r.value, (l) => (v(), m("div", D, [
51
+ n(B, { value: l }, null, 8, ["value"])
48
52
  ]))), 256)),
49
- o("div", w, [
50
- r(x, {
51
- value: e.value
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
- A as default
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,c=E(r);if(!s.hasOwnProperty(n)&&e.includes(n))s[n]=c;else{let f={};f[n]=c,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]}),l(a),s.arr.forEach(r=>{h(r.key,r.value)})}let i=[];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 l(t){u.push(t)}function y(t){u.push(t)}function x(t){u.push(t)}function g(t){i.push(t)}function h(t,e){switch(t){case"title":return l(e),!0;case"proposal":return y(e),!0;case"error":return x(e),!0;case"state":return g(e),!0;case"text":return l(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 b(t){return u=[],i=[],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:i}}exports.getNotes=b;
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, u) => {
10
- let n = r.tag, c = E(r);
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] = c;
12
+ s[n] = l;
13
13
  else {
14
14
  let f = {};
15
- f[n] = c, a.push({
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 o = [];
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
- }), l(a), s.arr.forEach((r) => {
30
+ }), c(a), s.arr.forEach((r) => {
31
31
  g(r.key, r.value);
32
32
  });
33
33
  }
34
34
  let i = [];
35
- function v(t) {
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 l(t) {
44
- o.push(t);
43
+ function c(t) {
44
+ u.push(t);
45
45
  }
46
- function x(t) {
47
- o.push(t);
46
+ function v(t) {
47
+ u.push(t);
48
48
  }
49
- function m(t) {
50
- o.push(t);
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 l(e), !0;
58
+ return c(e), !0;
59
59
  case "proposal":
60
- return x(e), !0;
60
+ return v(e), !0;
61
61
  case "error":
62
- return m(e), !0;
62
+ return x(e), !0;
63
63
  case "state":
64
64
  return h(e), !0;
65
65
  case "text":
66
- return l(e), !0;
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 v(e), !0;
84
+ return m(e), !0;
83
85
  default:
84
86
  return !1;
85
87
  }
86
88
  }
87
89
  function k(t) {
88
- return o = [], i = [], p(t)?.forEach((s) => {
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 u = 0; u < r; u++) {
92
- const n = a[u] || {};
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: o,
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 u=require("vue");require("@fangzhongya/utils/html/htmlEscape");function v(d,e,c){let s=[],f=[],i=[];const r=t=>t,l=()=>{i.length>0&&(s.push(e("div",{class:"test-top-list"},i)),i=[])},n=()=>{s.length>0&&(f.push(e("div",{class:"test-top-division"},s)),s=[])};return d.forEach(t=>{const o=[];let a=!1;if(t.date&&(a=!0,o.push(e("div",{class:"test-top-date"},[e("span",{},"更新时间:"),e("span",{},[r(t.date.name+" "+t.date.description)])]))),t.author&&(a=!0,o.push(e("div",{class:"test-top-author"},[e("span",{},"作者:"),e("span",{},[r(t.author.name+" "+t.author.description)])]))),t.title&&(t.title.type||t.title.name||t.title.description)){l(),a&&n();let p=t.title.type||"div";s.push(e(p,{class:"test-top-title"},[e("span",{},[r(t.title.name+" "+t.title.description)])]))}if(a&&(i.length>0&&(l(),n()),s.push(e("div",{class:"test-top-info"},o))),t.text){let p=t.text.type||"div";i.push(e(p,{class:"test-top-text"},[e("span",{},[r(t.text.name+" "+t.text.description)])]))}if(t.proposal){let p=t.proposal.type||"div";i.push(e(p,{class:"test-top-proposal"},[e("span",{},[r(t.proposal.name+" "+t.proposal.description)])]))}if(t.error){let p=t.error.type||"div";i.push(e(p,{class:"test-top-error"},[e("span",{},[r(t.error.name+" "+t.error.description)])]))}}),l(),n(),f}const m=u.defineComponent({props:{value:Array},render(d,e,c){const s=v(c.value,u.h);return u.h("div",{class:"test-top"},s)}});exports.default=m;exports.getTestTopDom=v;
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;