@fangzhongya/vue-archive 0.0.45 → 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.
Files changed (29) hide show
  1. package/dist/node/index.cjs +184 -112
  2. package/dist/node/index.js +184 -112
  3. package/dist/packages/components/compo/index.cjs +1 -1
  4. package/dist/packages/components/compo/index.js +98 -85
  5. package/dist/packages/components/compo/index.vue.cjs +1 -1
  6. package/dist/packages/components/compo/index.vue.js +18 -16
  7. package/dist/packages/components/compo/info-top.vue.cjs +1 -0
  8. package/dist/packages/components/compo/info-top.vue.js +32 -0
  9. package/dist/packages/components/compo/info-top.vue2.cjs +1 -0
  10. package/dist/packages/components/compo/info-top.vue2.js +4 -0
  11. package/dist/packages/components/compo/props.vue.cjs +1 -1
  12. package/dist/packages/components/compo/props.vue.js +44 -40
  13. package/dist/packages/components/compo/top.cjs +1 -1
  14. package/dist/packages/components/compo/top.js +69 -48
  15. package/dist/packages/components/main/index.vue.cjs +1 -1
  16. package/dist/packages/components/main/index.vue.js +30 -25
  17. package/dist/packages/components/test/index.cjs +1 -1
  18. package/dist/packages/components/test/index.js +24 -22
  19. package/dist/packages/components/test/top.cjs +1 -1
  20. package/dist/packages/components/test/top.js +69 -84
  21. package/dist/packages/components/use/code.cjs +6 -6
  22. package/dist/packages/components/use/code.js +74 -66
  23. package/dist/packages/components/use/retrie/array/index.vue.cjs +2 -2
  24. package/dist/packages/components/use/retrie/array/index.vue.js +16 -16
  25. package/dist/packages/components/use/retrie/object/index.vue.cjs +2 -2
  26. package/dist/packages/components/use/retrie/object/index.vue.js +17 -17
  27. package/dist/packages/page/develop/index.vue2.cjs +1 -1
  28. package/dist/packages/page/develop/index.vue2.js +2 -1
  29. package/package.json +1 -1
@@ -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;
@@ -1,32 +1,32 @@
1
- import { defineComponent as m, h as f } from "vue";
1
+ import { defineComponent as y, h } from "vue";
2
2
  import "@fangzhongya/utils/html/htmlEscape";
3
- function v(d, e, c) {
4
- let s = [], u = [], p = [];
5
- const r = (t) => t, n = () => {
6
- p.length > 0 && (s.push(
3
+ function v(o, e, u) {
4
+ let i = [], m = [], l = [];
5
+ const n = (t) => t, r = () => {
6
+ l.length > 0 && (i.push(
7
7
  e(
8
8
  "div",
9
9
  {
10
10
  class: "test-top-list"
11
11
  },
12
- p
12
+ l
13
13
  )
14
- ), p = []);
15
- }, l = () => {
16
- s.length > 0 && (u.push(
14
+ ), l = []);
15
+ }, c = () => {
16
+ i.length > 0 && (m.push(
17
17
  e(
18
18
  "div",
19
19
  {
20
20
  class: "test-top-division"
21
21
  },
22
- s
22
+ i
23
23
  )
24
- ), s = []);
24
+ ), i = []);
25
25
  };
26
- return d.forEach((t) => {
27
- const o = [];
26
+ return o.forEach((t) => {
27
+ const d = [];
28
28
  let a = !1;
29
- if (t.date && (a = !0, o.push(
29
+ if (t.date && (a = !0, d.push(
30
30
  e(
31
31
  "div",
32
32
  {
@@ -35,13 +35,13 @@ function v(d, e, c) {
35
35
  [
36
36
  e("span", {}, "更新时间:"),
37
37
  e("span", {}, [
38
- r(
38
+ n(
39
39
  t.date.name + " " + t.date.description
40
40
  )
41
41
  ])
42
42
  ]
43
43
  )
44
- )), t.author && (a = !0, o.push(
44
+ )), t.author && (a = !0, d.push(
45
45
  e(
46
46
  "div",
47
47
  {
@@ -50,24 +50,29 @@ function v(d, e, c) {
50
50
  [
51
51
  e("span", {}, "作者:"),
52
52
  e("span", {}, [
53
- r(
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(), a && l();
61
- let i = t.title.type || "div";
62
- s.push(
60
+ r(), a && c();
61
+ let s = (t.title.type || "div").split("."), p = s[1] || "";
62
+ s[0] == "html" ? i.push(
63
+ e("div", {
64
+ class: "test-top-title " + p,
65
+ innerHTML: t.title.name + " " + t.title.description
66
+ })
67
+ ) : i.push(
63
68
  e(
64
- i,
69
+ s[0],
65
70
  {
66
- class: "test-top-title"
71
+ class: "test-top-title " + p
67
72
  },
68
73
  [
69
74
  e("span", {}, [
70
- r(
75
+ n(
71
76
  t.title.name + " " + t.title.description
72
77
  )
73
78
  ])
@@ -75,89 +80,69 @@ function v(d, e, c) {
75
80
  )
76
81
  );
77
82
  }
78
- if (a && (p.length > 0 && (n(), l()), s.push(
83
+ if (a && (l.length > 0 && (r(), c()), i.push(
79
84
  e(
80
85
  "div",
81
86
  {
82
87
  class: "test-top-info"
83
88
  },
84
- o
89
+ d
85
90
  )
86
- )), t.text) {
87
- let i = t.text.type || "div";
88
- p.push(
89
- e(
90
- i,
91
- {
92
- class: "test-top-text"
93
- },
94
- [
95
- e("span", {}, [
96
- r(
97
- t.text.name + " " + t.text.description
98
- )
99
- ])
100
- ]
101
- )
102
- );
103
- }
104
- if (t.proposal) {
105
- let i = t.proposal.type || "div";
106
- p.push(
107
- e(
108
- i,
109
- {
110
- class: "test-top-proposal"
111
- },
112
- [
113
- e("span", {}, [
114
- r(
115
- t.proposal.name + " " + t.proposal.description
116
- )
117
- ])
118
- ]
119
- )
120
- );
121
- }
122
- if (t.error) {
123
- let i = t.error.type || "div";
124
- p.push(
125
- e(
126
- i,
127
- {
128
- class: "test-top-error"
129
- },
130
- [
131
- e("span", {}, [
132
- r(
133
- t.error.name + " " + t.error.description
134
- )
135
- ])
136
- ]
137
- )
91
+ )), t.html) {
92
+ let s = (t.html.type || "div").split("."), p = s[1] || "";
93
+ l.push(
94
+ e(s[0], {
95
+ class: "test-top-html " + p,
96
+ innerHTML: t.html.name + " " + t.html.description
97
+ })
138
98
  );
139
99
  }
140
- }), n(), l(), u;
100
+ ["text", "proposal", "error"].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: "test-top-" + s + " " + f,
106
+ innerHTML: t[s].name + " " + t[s].description
107
+ })
108
+ ) : l.push(
109
+ e(
110
+ p[0],
111
+ {
112
+ class: "test-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
+ }), r(), c(), m;
141
126
  }
142
- const g = m({
127
+ const H = y({
143
128
  /**
144
129
  * @props {Stinrg} value 插入数据
145
130
  */
146
131
  props: {
147
132
  value: Array
148
133
  },
149
- render(d, e, c) {
150
- const s = v(c.value, f);
151
- return f(
134
+ render(o, e, u) {
135
+ const i = v(u.value, h);
136
+ return h(
152
137
  "div",
153
138
  {
154
139
  class: "test-top"
155
140
  },
156
- s
141
+ i
157
142
  );
158
143
  }
159
144
  });
160
145
  export {
161
- g as default,
146
+ H as default,
162
147
  v as getTestTopDom
163
148
  };