@fangzhongya/vue-archive 0.0.46 → 0.0.48

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 (40) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/node/index.cjs +166 -134
  3. package/dist/node/index.d.cts +4 -0
  4. package/dist/node/index.d.ts +4 -0
  5. package/dist/node/index.js +166 -134
  6. package/dist/packages/components/boxurl/index.vue.cjs +1 -1
  7. package/dist/packages/components/boxurl/index.vue.js +37 -27
  8. package/dist/packages/components/code/index.vue.cjs +1 -1
  9. package/dist/packages/components/code/index.vue.js +67 -57
  10. package/dist/packages/components/compo/index.vue.cjs +1 -1
  11. package/dist/packages/components/compo/index.vue.js +18 -16
  12. package/dist/packages/components/compo/info-top.vue.cjs +1 -0
  13. package/dist/packages/components/compo/info-top.vue.js +32 -0
  14. package/dist/packages/components/compo/info-top.vue2.cjs +1 -0
  15. package/dist/packages/components/compo/info-top.vue2.js +4 -0
  16. package/dist/packages/components/compo/props.vue.cjs +1 -1
  17. package/dist/packages/components/compo/props.vue.js +44 -40
  18. package/dist/packages/components/compo/top.cjs +1 -1
  19. package/dist/packages/components/compo/top.js +69 -48
  20. package/dist/packages/components/main/index.vue.cjs +1 -1
  21. package/dist/packages/components/main/index.vue.js +30 -25
  22. package/dist/packages/components/test/index.cjs +1 -1
  23. package/dist/packages/components/test/index.js +24 -22
  24. package/dist/packages/components/test/top.cjs +1 -1
  25. package/dist/packages/components/test/top.js +69 -84
  26. package/dist/packages/components/use/set-code.vue.cjs +1 -1
  27. package/dist/packages/components/use/set-code.vue.js +31 -36
  28. package/dist/packages/config.d.ts +3 -0
  29. package/dist/packages/page/develop/index.vue2.cjs +1 -1
  30. package/dist/packages/page/develop/index.vue2.js +2 -1
  31. package/dist/packages/utils/common.cjs +1 -1
  32. package/dist/packages/utils/common.d.ts +2 -0
  33. package/dist/packages/utils/common.js +13 -12
  34. package/dist/packages/utils/glob.cjs +2 -2
  35. package/dist/packages/utils/glob.d.ts +1 -1
  36. package/dist/packages/utils/glob.js +226 -235
  37. package/dist/packages/utils/util.cjs +1 -0
  38. package/dist/packages/utils/util.d.ts +4 -0
  39. package/dist/packages/utils/util.js +46 -0
  40. package/package.json +2 -2
@@ -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
  };
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),x=require("../code/highlight.vue.cjs"),f=require("../../utils/index.cjs"),a=require("./code.cjs"),y={class:"set-code"},C={class:"but-div set-code-but"},V={class:"set-code-html"},k=e.defineComponent({__name:"set-code",props:{name:{type:String},param:{type:Object},value:{type:Object},slotValue:{type:Object},propsText:{type:Object},exposeText:{type:Object}},setup(d){const t=d,c=e.ref("");e.watch([()=>t.name,()=>t.param,()=>t.value,()=>t.slotValue,()=>t.propsText,()=>t.exposeText],()=>{c.value=a.getHmtl(t.name||"",t.param||{},t.value||{},t.slotValue,t.propsText,t.exposeText)},{deep:!0});const s=e.ref(!1);function r(){c.value=a.getHmtl(t.name||"",t.param||{},t.value||{},t.slotValue,t.propsText,t.exposeText)}function u(){s.value=!s.value}function p(){f.copyCode(c.value)}function v(n,l,b="text/plain"){const h=new Blob([n],{type:b}),i=URL.createObjectURL(h),o=document.createElement("a");o.href=i,o.download=l,o.style.display="none",document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o),URL.revokeObjectURL(i)},100)}function m(){v(c.value,t.name+".vue")}return(n,l)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",{onClick:u,class:"set-code-buts"},[l[0]||(l[0]=e.createElementVNode("div",null,"代码",-1)),e.createElementVNode("div",C,e.toDisplayString(s.value?"显示":"隐藏"),1),e.createElementVNode("div",{onClick:e.withModifiers(p,["stop"]),class:"but-div set-code-but"}," 复制 "),e.createElementVNode("div",{onClick:e.withModifiers(m,["stop"]),class:"but-div set-code-but"}," 导出 "),e.createElementVNode("div",{onClick:e.withModifiers(r,["stop"]),class:"but-div set-code-but"}," 刷新 ")]),e.withDirectives(e.createElementVNode("div",V,[e.createVNode(x,{language:"html",code:c.value},null,8,["code"])],512),[[e.vShow,s.value]])]))}});module.exports=k;
1
+ "use strict";const e=require("vue"),d=require("../code/highlight.vue.cjs"),p=require("../../utils/index.cjs"),l=require("./code.cjs"),v=require("../../utils/util.cjs"),m={class:"set-code"},h={class:"but-div set-code-but"},x={class:"set-code-html"},b=e.defineComponent({__name:"set-code",props:{name:{type:String},param:{type:Object},value:{type:Object},slotValue:{type:Object},propsText:{type:Object},exposeText:{type:Object}},setup(i){const t=i,o=e.ref("");e.watch([()=>t.name,()=>t.param,()=>t.value,()=>t.slotValue,()=>t.propsText,()=>t.exposeText],()=>{o.value=l.getHmtl(t.name||"",t.param||{},t.value||{},t.slotValue,t.propsText,t.exposeText)},{deep:!0});const s=e.ref(!1);function n(){o.value=l.getHmtl(t.name||"",t.param||{},t.value||{},t.slotValue,t.propsText,t.exposeText)}function a(){s.value=!s.value}function r(){p.copyCode(o.value)}function u(){v.exportStringToFile(o.value,t.name+".vue")}return(f,c)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("div",{onClick:a,class:"set-code-buts"},[c[0]||(c[0]=e.createElementVNode("div",null,"代码",-1)),e.createElementVNode("div",h,e.toDisplayString(s.value?"显示":"隐藏"),1),e.createElementVNode("div",{onClick:e.withModifiers(r,["stop"]),class:"but-div set-code-but"}," 复制 "),e.createElementVNode("div",{onClick:e.withModifiers(u,["stop"]),class:"but-div set-code-but"}," 下载 "),e.createElementVNode("div",{onClick:e.withModifiers(n,["stop"]),class:"but-div set-code-but"}," 刷新 ")]),e.withDirectives(e.createElementVNode("div",x,[e.createVNode(d,{language:"html",code:o.value},null,8,["code"])],512),[[e.vShow,s.value]])]))}});module.exports=b;
@@ -1,8 +1,9 @@
1
- import { defineComponent as y, ref as p, watch as C, createElementBlock as k, openBlock as T, createElementVNode as t, withDirectives as _, toDisplayString as g, withModifiers as n, createVNode as j, vShow as w } from "vue";
2
- import O from "../code/highlight.vue.js";
3
- import { copyCode as V } from "../../utils/index.js";
4
- import { getHmtl as u } from "./code.js";
5
- const R = { class: "set-code" }, S = { class: "but-div set-code-but" }, L = { class: "set-code-html" }, H = /* @__PURE__ */ y({
1
+ import { defineComponent as v, ref as c, watch as m, createElementBlock as f, openBlock as x, createElementVNode as t, withDirectives as b, toDisplayString as h, withModifiers as l, createVNode as C, vShow as _ } from "vue";
2
+ import k from "../code/highlight.vue.js";
3
+ import { copyCode as y } from "../../utils/index.js";
4
+ import { getHmtl as i } from "./code.js";
5
+ import { exportStringToFile as T } from "../../utils/util.js";
6
+ const g = { class: "set-code" }, V = { class: "but-div set-code-but" }, j = { class: "set-code-html" }, H = /* @__PURE__ */ v({
6
7
  __name: "set-code",
7
8
  props: {
8
9
  name: {
@@ -24,9 +25,9 @@ const R = { class: "set-code" }, S = { class: "but-div set-code-but" }, L = { cl
24
25
  type: Object
25
26
  }
26
27
  },
27
- setup(d) {
28
- const e = d, s = p("");
29
- C(
28
+ setup(n) {
29
+ const e = n, o = c("");
30
+ m(
30
31
  [
31
32
  () => e.name,
32
33
  () => e.param,
@@ -36,7 +37,7 @@ const R = { class: "set-code" }, S = { class: "but-div set-code-but" }, L = { cl
36
37
  () => e.exposeText
37
38
  ],
38
39
  () => {
39
- s.value = u(
40
+ o.value = i(
40
41
  e.name || "",
41
42
  e.param || {},
42
43
  e.value || {},
@@ -47,9 +48,9 @@ const R = { class: "set-code" }, S = { class: "but-div set-code-but" }, L = { cl
47
48
  },
48
49
  { deep: !0 }
49
50
  );
50
- const l = p(!1);
51
- function r() {
52
- s.value = u(
51
+ const s = c(!1);
52
+ function p() {
53
+ o.value = i(
53
54
  e.name || "",
54
55
  e.param || {},
55
56
  e.value || {},
@@ -58,48 +59,42 @@ const R = { class: "set-code" }, S = { class: "but-div set-code-but" }, L = { cl
58
59
  e.exposeText
59
60
  );
60
61
  }
61
- function m() {
62
- l.value = !l.value;
63
- }
64
- function v() {
65
- V(s.value);
62
+ function u() {
63
+ s.value = !s.value;
66
64
  }
67
- function b(a, c, h = "text/plain") {
68
- const x = new Blob([a], { type: h }), i = URL.createObjectURL(x), o = document.createElement("a");
69
- o.href = i, o.download = c, o.style.display = "none", document.body.appendChild(o), o.click(), setTimeout(() => {
70
- document.body.removeChild(o), URL.revokeObjectURL(i);
71
- }, 100);
65
+ function r() {
66
+ y(o.value);
72
67
  }
73
- function f() {
74
- b(s.value, e.name + ".vue");
68
+ function d() {
69
+ T(o.value, e.name + ".vue");
75
70
  }
76
- return (a, c) => (T(), k("div", R, [
71
+ return (w, a) => (x(), f("div", g, [
77
72
  t("div", {
78
- onClick: m,
73
+ onClick: u,
79
74
  class: "set-code-buts"
80
75
  }, [
81
- c[0] || (c[0] = t("div", null, "代码", -1)),
82
- t("div", S, g(l.value ? "显示" : "隐藏"), 1),
76
+ a[0] || (a[0] = t("div", null, "代码", -1)),
77
+ t("div", V, h(s.value ? "显示" : "隐藏"), 1),
83
78
  t("div", {
84
- onClick: n(v, ["stop"]),
79
+ onClick: l(r, ["stop"]),
85
80
  class: "but-div set-code-but"
86
81
  }, " 复制 "),
87
82
  t("div", {
88
- onClick: n(f, ["stop"]),
83
+ onClick: l(d, ["stop"]),
89
84
  class: "but-div set-code-but"
90
- }, " 导出 "),
85
+ }, " 下载 "),
91
86
  t("div", {
92
- onClick: n(r, ["stop"]),
87
+ onClick: l(p, ["stop"]),
93
88
  class: "but-div set-code-but"
94
89
  }, " 刷新 ")
95
90
  ]),
96
- _(t("div", L, [
97
- j(O, {
91
+ b(t("div", j, [
92
+ C(k, {
98
93
  language: "html",
99
- code: s.value
94
+ code: o.value
100
95
  }, null, 8, ["code"])
101
96
  ], 512), [
102
- [w, l.value]
97
+ [_, s.value]
103
98
  ])
104
99
  ]));
105
100
  }
@@ -12,6 +12,7 @@ export interface GlobComs {
12
12
  }
13
13
  export interface Component {
14
14
  dir: string;
15
+ cwd?: string;
15
16
  extensions?: Array<string>;
16
17
  alias?: string;
17
18
  aliass?: ObjStr;
@@ -34,6 +35,7 @@ export interface ExampleObj {
34
35
  tests?: boolean;
35
36
  testsNanme?: string;
36
37
  dir?: string;
38
+ cwd?: string;
37
39
  /**
38
40
  * 0 : url 下面就是组件
39
41
  * 1 : dir 名称开始
@@ -73,6 +75,7 @@ export interface Config {
73
75
  redirect?: boolean;
74
76
  useparam?: boolean;
75
77
  resolve?: Resolve[];
78
+ directory?: string;
76
79
  components: Array<Components>;
77
80
  example?: ExampleObj;
78
81
  }
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),_=require("../../components/compo/info.vue.cjs"),u=require("../../components/compo/index.vue.cjs"),n=require("../../components/choice/index.vue.cjs"),r={class:"__document-compon"},c=e.defineComponent({__name:"index",setup(l){return(o,s)=>(e.openBlock(),e.createElementBlock("div",r,[e.createVNode(n,null,{default:e.withCtx(t=>[e.createVNode(_,{value:t.value},null,8,["value"]),e.createVNode(u,{value:t.value},null,8,["value"])]),_:1})]))}});module.exports=c;
1
+ "use strict";const e=require("vue"),_=require("../../components/compo/info.vue.cjs"),u=require("../../components/compo/index.vue.cjs"),n=require("../../components/choice/index.vue.cjs"),r={class:"__document-compon"},c=e.defineComponent({__name:"index",setup(o){return(s,l)=>(e.openBlock(),e.createElementBlock("div",r,[e.createVNode(n,null,{default:e.withCtx(t=>[e.createVNode(_,{value:t.value},null,8,["value"]),e.createVNode(u,{istop:"",value:t.value},null,8,["value"])]),_:1})]))}});module.exports=c;
@@ -5,13 +5,14 @@ import r from "../../components/choice/index.vue.js";
5
5
  const c = { class: "__document-compon" }, x = /* @__PURE__ */ t({
6
6
  __name: "index",
7
7
  setup(u) {
8
- return (i, f) => (_(), n("div", c, [
8
+ return (i, s) => (_(), n("div", c, [
9
9
  e(r, null, {
10
10
  default: a((o) => [
11
11
  e(l, {
12
12
  value: o.value
13
13
  }, null, 8, ["value"]),
14
14
  e(m, {
15
+ istop: "",
15
16
  value: o.value
16
17
  }, null, 8, ["value"])
17
18
  ]),