@fangzhongya/vue-archive 0.0.3-20 → 0.0.3-22

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.
@@ -66995,9 +66995,13 @@ function setTestUrl(obj, test) {
66995
66995
  "/" + obj.value + "/index.md"
66996
66996
  );
66997
66997
  const url = getImportUrl(sc, tu);
66998
- arr.push(`:::preview ${test.name}`);
66999
- arr.push(`demo-preview=${url}`);
67000
- arr.push(`:::`);
66998
+ if (configObj.setTest) {
66999
+ arr.push(...configObj.setTest(url, test, obj));
67000
+ } else {
67001
+ arr.push(`:::preview ${test.name} || `);
67002
+ arr.push(`demo-preview=${url}`);
67003
+ arr.push(`:::`);
67004
+ }
67001
67005
  return arr;
67002
67006
  }
67003
67007
  function setDom(dom) {
@@ -66995,9 +66995,13 @@ function setTestUrl(obj, test) {
66995
66995
  "/" + obj.value + "/index.md"
66996
66996
  );
66997
66997
  const url = getImportUrl(sc, tu);
66998
- arr.push(`:::preview ${test.name}`);
66999
- arr.push(`demo-preview=${url}`);
67000
- arr.push(`:::`);
66998
+ if (configObj.setTest) {
66999
+ arr.push(...configObj.setTest(url, test, obj));
67000
+ } else {
67001
+ arr.push(`:::preview ${test.name} || `);
67002
+ arr.push(`demo-preview=${url}`);
67003
+ arr.push(`:::`);
67004
+ }
67001
67005
  return arr;
67002
67006
  }
67003
67007
  function setDom(dom) {
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),m=require("../../components/boxurl/index.vue.cjs"),p=require("../../components/compo/props.vue.cjs"),h=require("../../components/header/index.vue.cjs"),x=require("../../config.cjs"),f=require("../../utils/common.cjs"),d=require("../../utils/glob.cjs"),g={class:"__document-index"},E={class:"index-aside"},N={class:"index-aside-div"},k={class:"choice aside"},V=["onClick"],C={class:"aside-li-name"},y={class:"aside-li-name-name"},q={class:"index-body"},B={class:"index-div"},w={class:"index-header"},b={class:"index-main"},D={class:"index-main-div"},O=e.defineComponent({__name:"index",setup(P){const c=x.getConfig("components").map(t=>t.comprops),_=Object.values(d.getComponentPropsObjs()).filter(t=>{for(let s=0;s<c.length;s++){const n=c[s]||"";if(n&&f.isComprops(t.key,n))return!0}});function u(t){const n=new RegExp(t.comprops+"(.+)$").exec("/"+t.value);return n?n[1]:t.value}const i=e.ref(_),o=e.ref(i.value[0]),r=e.ref("");function v(t){o.value=t,a()}function a(){d.getPropsRaws([o.value]).then(t=>{const s=t[0];r.value=s.raw})}return a(),(t,s)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",E,[e.createElementVNode("div",N,[e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(n,R)=>{var l;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["aside-li",{on:n.key==((l=e.unref(o))==null?void 0:l.key)}]),onClick:$=>v(n)},[e.createVNode(m,{value:n},{default:e.withCtx(()=>[e.createElementVNode("div",C,[e.createElementVNode("div",y,e.toDisplayString(u(n)),1)])]),_:2},1032,["value"])],10,V)}),256))])])]),e.createElementVNode("div",q,[e.createElementVNode("div",B,[e.createElementVNode("div",w,[e.createVNode(h)]),e.createElementVNode("div",b,[e.createElementVNode("div",D,[e.createVNode(p,{value:r.value},null,8,["value"])])])])])]))}});module.exports=O;
1
+ "use strict";const e=require("vue"),_=require("../../components/boxurl/index.vue.cjs"),v=require("../../components/compo/props.vue.cjs"),h=require("../../components/header/index.vue.cjs"),f=require("../../config.cjs"),N=require("../../utils/common.cjs"),u=require("../../utils/glob.cjs"),x={class:"__document-index"},E={class:"index-aside"},V={class:"index-aside-div"},g={class:"choice aside"},k=["onClick"],y={class:"aside-li-name"},C={class:"aside-li-name-name"},q={class:"index-body"},B={class:"index-div"},w={class:"index-header"},D={class:"index-main"},b={class:"index-main-top"},S={class:"aside-li-name"},O={class:"aside-li-name-name"},P={class:"compo-info-name-li"},R=e.createElementVNode("span",{class:"compo-info-name-li-span"}," 文件路径 ",-1),$={class:"compo-info-name-li-span"},j={class:"index-main-div"},z=e.defineComponent({__name:"index",setup(F){const c=f.getConfig("components").map(n=>n.comprops),m=Object.values(u.getComponentPropsObjs()).filter(n=>{for(let s=0;s<c.length;s++){const t=c[s]||"";if(t&&N.isComprops(n.key,t))return!0}});function i(n){const t=new RegExp(n.comprops+"(.+)$").exec("/"+n.value);return t?t[1]:n.value}const a=e.ref(m),o=e.ref(a.value[0]),l=e.ref("");function p(n){o.value=n,r()}function r(){u.getPropsRaws([o.value]).then(n=>{const s=n[0];l.value=s.raw})}return r(),(n,s)=>(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("div",E,[e.createElementVNode("div",V,[e.createElementVNode("div",g,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(t,L)=>{var d;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["aside-li",{on:t.key==((d=e.unref(o))==null?void 0:d.key)}]),onClick:A=>p(t)},[e.createVNode(_,{value:t},{default:e.withCtx(()=>[e.createElementVNode("div",y,[e.createElementVNode("div",C,e.toDisplayString(i(t)),1)])]),_:2},1032,["value"])],10,k)}),256))])])]),e.createElementVNode("div",q,[e.createElementVNode("div",B,[e.createElementVNode("div",w,[e.createVNode(h)]),e.createElementVNode("div",D,[e.createElementVNode("div",b,[e.createVNode(_,{value:e.unref(o)},{default:e.withCtx(()=>{var t;return[e.createElementVNode("div",S,[e.createElementVNode("h2",O,e.toDisplayString(i(e.unref(o))),1)]),e.createElementVNode("div",P,[R,e.createElementVNode("span",$,e.toDisplayString((t=e.unref(o))==null?void 0:t.key),1)])]}),_:1},8,["value"])]),e.createElementVNode("div",j,[e.createVNode(v,{value:l.value},null,8,["value"])])])])])]))}});module.exports=z;
@@ -1,54 +1,54 @@
1
- import { defineComponent as h, ref as i, openBlock as c, createElementBlock as a, createElementVNode as t, Fragment as x, renderList as g, normalizeClass as k, unref as C, createVNode as d, withCtx as y, toDisplayString as w } from "vue";
2
- import $ from "../../components/boxurl/index.vue.js";
1
+ import { defineComponent as C, ref as c, openBlock as d, createElementBlock as l, createElementVNode as e, Fragment as y, renderList as w, normalizeClass as $, unref as i, createVNode as a, withCtx as h, toDisplayString as r } from "vue";
2
+ import x from "../../components/boxurl/index.vue.js";
3
3
  import E from "../../components/compo/props.vue.js";
4
4
  import N from "../../components/header/index.vue.js";
5
5
  import { getConfig as b } from "../../config.js";
6
6
  import { isComprops as B } from "../../utils/common.js";
7
7
  import { getComponentPropsObjs as D, getPropsRaws as O } from "../../utils/glob.js";
8
- const P = { class: "__document-index" }, R = { class: "index-aside" }, V = { class: "index-aside-div" }, j = { class: "choice aside" }, z = ["onClick"], F = { class: "aside-li-name" }, H = { class: "aside-li-name-name" }, L = { class: "index-body" }, S = { class: "index-div" }, q = { class: "index-header" }, A = { class: "index-main" }, G = { class: "index-main-div" }, Z = /* @__PURE__ */ h({
8
+ const P = { class: "__document-index" }, R = { class: "index-aside" }, V = { class: "index-aside-div" }, j = { class: "choice aside" }, z = ["onClick"], F = { class: "aside-li-name" }, H = { class: "aside-li-name-name" }, L = { class: "index-body" }, S = { class: "index-div" }, q = { class: "index-header" }, A = { class: "index-main" }, G = { class: "index-main-top" }, I = { class: "aside-li-name" }, J = { class: "aside-li-name-name" }, K = { class: "compo-info-name-li" }, M = /* @__PURE__ */ e("span", { class: "compo-info-name-li-span" }, " 文件路径 ", -1), Q = { class: "compo-info-name-li-span" }, T = { class: "index-main-div" }, ie = /* @__PURE__ */ C({
9
9
  __name: "index",
10
- setup(I) {
11
- const r = b("components").map((e) => e.comprops), v = Object.values(D()).filter(
12
- (e) => {
13
- for (let o = 0; o < r.length; o++) {
14
- const s = r[o] || "";
15
- if (s && B(e.key, s))
10
+ setup(U) {
11
+ const _ = b("components").map((o) => o.comprops), g = Object.values(D()).filter(
12
+ (o) => {
13
+ for (let n = 0; n < _.length; n++) {
14
+ const s = _[n] || "";
15
+ if (s && B(o.key, s))
16
16
  return !0;
17
17
  }
18
18
  }
19
19
  );
20
- function p(e) {
21
- const s = new RegExp(e.comprops + "(.+)$").exec("/" + e.value);
22
- return s ? s[1] : e.value;
20
+ function m(o) {
21
+ const s = new RegExp(o.comprops + "(.+)$").exec("/" + o.value);
22
+ return s ? s[1] : o.value;
23
23
  }
24
- const l = i(v), n = i(l.value[0]), _ = i("");
25
- function f(e) {
26
- n.value = e, m();
24
+ const p = c(g), t = c(p.value[0]), u = c("");
25
+ function k(o) {
26
+ t.value = o, v();
27
27
  }
28
- function m() {
29
- O([n.value]).then(
30
- (e) => {
31
- const o = e[0];
32
- _.value = o.raw;
28
+ function v() {
29
+ O([t.value]).then(
30
+ (o) => {
31
+ const n = o[0];
32
+ u.value = n.raw;
33
33
  }
34
34
  );
35
35
  }
36
- return m(), (e, o) => (c(), a("div", P, [
37
- t("div", R, [
38
- t("div", V, [
39
- t("div", j, [
40
- (c(!0), a(x, null, g(l.value, (s, J) => {
41
- var u;
42
- return c(), a("div", {
43
- class: k(["aside-li", {
44
- on: s.key == ((u = C(n)) == null ? void 0 : u.key)
36
+ return v(), (o, n) => (d(), l("div", P, [
37
+ e("div", R, [
38
+ e("div", V, [
39
+ e("div", j, [
40
+ (d(!0), l(y, null, w(p.value, (s, W) => {
41
+ var f;
42
+ return d(), l("div", {
43
+ class: $(["aside-li", {
44
+ on: s.key == ((f = i(t)) == null ? void 0 : f.key)
45
45
  }]),
46
- onClick: (K) => f(s)
46
+ onClick: (X) => k(s)
47
47
  }, [
48
- d($, { value: s }, {
49
- default: y(() => [
50
- t("div", F, [
51
- t("div", H, w(p(s)), 1)
48
+ a(x, { value: s }, {
49
+ default: h(() => [
50
+ e("div", F, [
51
+ e("div", H, r(m(s)), 1)
52
52
  ])
53
53
  ]),
54
54
  _: 2
@@ -58,14 +58,31 @@ const P = { class: "__document-index" }, R = { class: "index-aside" }, V = { cla
58
58
  ])
59
59
  ])
60
60
  ]),
61
- t("div", L, [
62
- t("div", S, [
63
- t("div", q, [
64
- d(N)
61
+ e("div", L, [
62
+ e("div", S, [
63
+ e("div", q, [
64
+ a(N)
65
65
  ]),
66
- t("div", A, [
67
- t("div", G, [
68
- d(E, { value: _.value }, null, 8, ["value"])
66
+ e("div", A, [
67
+ e("div", G, [
68
+ a(x, { value: i(t) }, {
69
+ default: h(() => {
70
+ var s;
71
+ return [
72
+ e("div", I, [
73
+ e("h2", J, r(m(i(t))), 1)
74
+ ]),
75
+ e("div", K, [
76
+ M,
77
+ e("span", Q, r((s = i(t)) == null ? void 0 : s.key), 1)
78
+ ])
79
+ ];
80
+ }),
81
+ _: 1
82
+ }, 8, ["value"])
83
+ ]),
84
+ e("div", T, [
85
+ a(E, { value: u.value }, null, 8, ["value"])
69
86
  ])
70
87
  ])
71
88
  ])
@@ -74,5 +91,5 @@ const P = { class: "__document-index" }, R = { class: "index-aside" }, V = { cla
74
91
  }
75
92
  });
76
93
  export {
77
- Z as default
94
+ ie as default
78
95
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/vue-archive",
3
3
  "private": false,
4
- "version": "0.0.3-20",
4
+ "version": "0.0.3-22",
5
5
  "type": "module",
6
6
  "description ": "vue 组件注释生成文档",
7
7
  "author": "fangzhongya ",