@fangzhongya/vue-archive 0.0.42 → 0.0.44

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 +1 @@
1
- "use strict";const e=require("vue"),_=require("../use/index.cjs"),d=require("./info.vue.cjs"),k=require("./props.vue.cjs"),f=require("../../config.cjs"),g=require("../md/index.vue.cjs");require("./index.cjs");const v=require("../../utils/glob.cjs"),B={class:"compo"},y={key:0,class:"compo-md"},q={key:0,class:"compo-md-list"},C={key:1,class:"compo-use"},h=e.defineComponent({__name:"index",props:{value:Object},setup(c){const t=c,m=f.getConfig("useparam"),l=e.ref(""),u=e.reactive({md:!0}),o=e.ref([]),r=e.ref();function p(n){r.value=n}e.watch(()=>t.value,()=>{a()});function a(){t.value?.key&&(v.getLocalTextComponents(t.value?.key).then(n=>{l.value=n}),o.value=v.getKeyMds(t.value?.key)||[])}return a(),(n,s)=>(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(d,{value:c.value},null,8,["value"]),e.createVNode(k,{onChange:p,value:l.value},null,8,["value"]),o.value&&o.value.length?(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",{onClick:s[0]||(s[0]=i=>u.md=!u.md),class:"compo-md-name"},"说明文档"),u.md?(e.openBlock(),e.createElementBlock("div",q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,i=>(e.openBlock(),e.createBlock(g,{value:i},null,8,["value"]))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(m)?(e.openBlock(),e.createElementBlock("div",C,[e.createVNode(e.unref(_),{value:t.value,param:r.value},null,8,["value","param"])])):e.createCommentVNode("",!0)]))}});module.exports=h;
1
+ "use strict";const e=require("vue"),d=require("../use/index.cjs"),_=require("./props.vue.cjs"),k=require("../../config.cjs"),f=require("../md/index.vue.cjs");require("./index.cjs");const m=require("../../utils/glob.cjs"),g={class:"compo"},B={key:0,class:"compo-md"},y={key:0,class:"compo-md-list"},C={key:1,class:"compo-use"},h=e.defineComponent({__name:"index",props:{value:Object},setup(i){const t=i,p=k.getConfig("useparam"),r=e.ref(""),c=e.reactive({md:!0}),o=e.ref([]),a=e.ref();function v(n){a.value=n}e.watch(()=>t.value,()=>{l()});function l(){t.value?.key&&(m.getLocalTextComponents(t.value?.key).then(n=>{r.value=n}),o.value=m.getKeyMds(t.value?.key)||[])}return l(),(n,u)=>(e.openBlock(),e.createElementBlock("div",g,[o.value&&o.value.length?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",{onClick:u[0]||(u[0]=s=>c.md=!c.md),class:"compo-md-name"},"说明文档"),c.md?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,s=>(e.openBlock(),e.createBlock(f,{value:s},null,8,["value"]))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createVNode(_,{onChange:v,value:r.value},null,8,["value"]),e.unref(p)?(e.openBlock(),e.createElementBlock("div",C,[e.createVNode(e.unref(d),{value:t.value,param:a.value},null,8,["value","param"])])):e.createCommentVNode("",!0)]))}});module.exports=h;
@@ -1,67 +1,65 @@
1
- import { defineComponent as g, ref as m, reactive as h, watch as y, createElementBlock as o, openBlock as e, createVNode as r, createCommentVNode as s, createElementVNode as C, Fragment as x, renderList as $, createBlock as B, unref as f } from "vue";
2
- import N from "../use/index.js";
3
- import V from "./info.vue.js";
4
- import E from "./props.vue.js";
5
- import { getConfig as L } from "../../config.js";
6
- import b from "../md/index.vue.js";
1
+ import { defineComponent as g, ref as l, reactive as h, watch as y, createElementBlock as o, openBlock as e, createCommentVNode as m, createVNode as p, createElementVNode as C, Fragment as x, renderList as B, createBlock as N, unref as d } from "vue";
2
+ import V from "../use/index.js";
3
+ import $ from "./props.vue.js";
4
+ import { getConfig as E } from "../../config.js";
5
+ import L from "../md/index.vue.js";
7
6
  import "./index.js";
8
- import { getLocalTextComponents as j, getKeyMds as w } from "../../utils/glob.js";
9
- const D = { class: "compo" }, F = {
7
+ import { getLocalTextComponents as b, getKeyMds as j } from "../../utils/glob.js";
8
+ const w = { class: "compo" }, D = {
10
9
  key: 0,
11
10
  class: "compo-md"
12
- }, K = {
11
+ }, F = {
13
12
  key: 0,
14
13
  class: "compo-md-list"
15
- }, M = {
14
+ }, K = {
16
15
  key: 1,
17
16
  class: "compo-use"
18
- }, I = /* @__PURE__ */ g({
17
+ }, G = /* @__PURE__ */ g({
19
18
  __name: "index",
20
19
  props: {
21
20
  value: Object
22
21
  },
23
- setup(u) {
24
- const t = u, _ = L("useparam"), c = m(""), l = h({
22
+ setup(f) {
23
+ const t = f, _ = E("useparam"), r = l(""), s = h({
25
24
  md: !0
26
- }), a = m([]), i = m();
25
+ }), a = l([]), u = l();
27
26
  function k(n) {
28
- i.value = n;
27
+ u.value = n;
29
28
  }
30
29
  y(
31
30
  () => t.value,
32
31
  () => {
33
- v();
32
+ c();
34
33
  }
35
34
  );
36
- function v() {
37
- t.value?.key && (j(t.value?.key).then((n) => {
38
- c.value = n;
39
- }), a.value = w(t.value?.key) || []);
35
+ function c() {
36
+ t.value?.key && (b(t.value?.key).then((n) => {
37
+ r.value = n;
38
+ }), a.value = j(t.value?.key) || []);
40
39
  }
41
- return v(), (n, d) => (e(), o("div", D, [
42
- r(V, { value: u.value }, null, 8, ["value"]),
43
- r(E, {
44
- onChange: k,
45
- value: c.value
46
- }, null, 8, ["value"]),
47
- a.value && a.value.length ? (e(), o("div", F, [
40
+ return c(), (n, i) => (e(), o("div", w, [
41
+ a.value && a.value.length ? (e(), o("div", D, [
48
42
  C("div", {
49
- onClick: d[0] || (d[0] = (p) => l.md = !l.md),
43
+ onClick: i[0] || (i[0] = (v) => s.md = !s.md),
50
44
  class: "compo-md-name"
51
45
  }, "说明文档"),
52
- l.md ? (e(), o("div", K, [
53
- (e(!0), o(x, null, $(a.value, (p) => (e(), B(b, { value: p }, null, 8, ["value"]))), 256))
54
- ])) : s("", !0)
55
- ])) : s("", !0),
56
- f(_) ? (e(), o("div", M, [
57
- r(f(N), {
46
+ s.md ? (e(), o("div", F, [
47
+ (e(!0), o(x, null, B(a.value, (v) => (e(), N(L, { value: v }, null, 8, ["value"]))), 256))
48
+ ])) : m("", !0)
49
+ ])) : m("", !0),
50
+ p($, {
51
+ onChange: k,
52
+ value: r.value
53
+ }, null, 8, ["value"]),
54
+ d(_) ? (e(), o("div", K, [
55
+ p(d(V), {
58
56
  value: t.value,
59
- param: i.value
57
+ param: u.value
60
58
  }, null, 8, ["value", "param"])
61
- ])) : s("", !0)
59
+ ])) : m("", !0)
62
60
  ]));
63
61
  }
64
62
  });
65
63
  export {
66
- I as default
64
+ G as default
67
65
  };
@@ -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("../test/index.vue.cjs"),p=require("../../utils/glob.cjs"),m={class:"main"},k={class:"main-but"},f={class:"main-test"},E={class:"main-top"},N=e.defineComponent({__name:"index",props:{value:Object},setup(a){const l=v.useRouter(),t=a,i=e.ref([]);e.watch(()=>t.value,()=>{c()});function c(){i.value=p.getTestName(t.value?.key)}c();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",m,[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(i.value,s=>(e.openBlock(),e.createElementBlock("div",f,[e.createVNode(_,{value:s},null,8,["value"])]))),256)),e.createElementVNode("div",E,[e.createVNode(d,{value:t.value},null,8,["value"])])]))}});module.exports=N;
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,31 +1,35 @@
1
- import { defineComponent as d, ref as f, watch as p, createElementBlock as r, openBlock as a, createElementVNode as o, Fragment as _, renderList as C, createVNode as m } from "vue";
2
- import { useRouter as b } from "vue-router";
3
- import { toCompon as k, toTests as $, toDevelop as g } from "../../router/index.js";
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";
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
- import N from "../test/index.vue.js";
6
- import { getTestName as B } from "../../utils/glob.js";
7
- const E = { class: "main" }, T = { class: "main-but" }, V = { class: "main-test" }, j = { class: "main-top" }, h = /* @__PURE__ */ d({
5
+ import N from "../compo/info.vue.js";
6
+ import B from "../test/index.vue.js";
7
+ 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({
8
9
  __name: "index",
9
10
  props: {
10
11
  value: Object
11
12
  },
12
- setup(c) {
13
- const i = b(), e = c, u = f([]);
13
+ setup(m) {
14
+ const i = $(), e = m, v = f([]);
14
15
  p(
15
16
  () => e.value,
16
17
  () => {
17
- v();
18
+ c();
18
19
  }
19
20
  );
20
- function v() {
21
- u.value = B(e.value?.key);
21
+ function c() {
22
+ v.value = E(e.value?.key);
22
23
  }
23
- v();
24
+ c();
24
25
  function l(s) {
25
- s == 1 ? k(i, e.value) : s == 2 ? $(i, e.value) : s == 3 && g(i, e.value);
26
+ s == 1 ? b(i, e.value) : s == 2 ? k(i, e.value) : s == 3 && g(i, e.value);
26
27
  }
27
- return (s, t) => (a(), r("div", E, [
28
- o("div", T, [
28
+ return (s, t) => (u(), a("div", T, [
29
+ o("div", V, [
30
+ r(N, { value: m.value }, null, 8, ["value"])
31
+ ]),
32
+ o("div", h, [
29
33
  o("div", {
30
34
  class: "but-div",
31
35
  onClick: t[0] || (t[0] = (n) => l(1))
@@ -39,11 +43,11 @@ const E = { class: "main" }, T = { class: "main-but" }, V = { class: "main-test"
39
43
  onClick: t[2] || (t[2] = (n) => l(3))
40
44
  }, "开发")
41
45
  ]),
42
- (a(!0), r(_, null, C(u.value, (n) => (a(), r("div", V, [
43
- m(N, { value: n }, null, 8, ["value"])
46
+ (u(!0), a(_, null, C(v.value, (n) => (u(), a("div", j, [
47
+ r(B, { value: n }, null, 8, ["value"])
44
48
  ]))), 256)),
45
- o("div", j, [
46
- m(x, {
49
+ o("div", w, [
50
+ r(x, {
47
51
  value: e.value
48
52
  }, null, 8, ["value"])
49
53
  ])
@@ -51,5 +55,5 @@ const E = { class: "main" }, T = { class: "main-but" }, V = { class: "main-test"
51
55
  }
52
56
  });
53
57
  export {
54
- h as default
58
+ A as default
55
59
  };
@@ -1 +1 @@
1
- "use strict";const s=require("vue"),V=require("./retrie/index.vue.cjs");;/* empty css */const T=require("./code.cjs"),k={key:0,class:"set-props"},q=s.defineComponent({__name:"set-props",props:{name:String,list:Array},emits:["change"],setup(o,{emit:i}){const l=o,p=i,u=s.ref({}),m=s.ref(0),c=s.ref({}),n=s.ref([]);function f(){c.value={};const r=[];l.list?.forEach(t=>{let e=t.name;if(e.includes(".")?e="":e=(e.split("/")[0]||"").trim(),e){c.value[e]=(t.default||"").trim();const{arr:y,type:v,dataType:b}=T.getSpecType(t);u.value[e]=y;let g={label:d(e,t),prop:e,type:v,dataType:b,select:e};r.push(g)}}),n.value=r}function d(r,t){let e=r+": { "+(t.type||"any")+" } "+t.description;return t.default&&(e+=" 默认值="+t.default),t.selectable&&(e+=" 可选值="+t.selectable),e}function _(r,t){let e=Object.assign({},r);p("change",e,t)}let a;function h(){clearTimeout(a),a=setTimeout(()=>{f()},400)}return s.watch(()=>l.name,()=>{n.value=[],s.nextTick(()=>{h()})},{immediate:!0}),(r,t)=>n.value&&n.value.length>0?(s.openBlock(),s.createElementBlock("div",k,[s.createVNode(V,{refresh:m.value,modelValue:c.value,selects:u.value,list:n.value,name:l.name,onQuery:_},null,8,["refresh","modelValue","selects","list","name"])])):s.createCommentVNode("",!0)}});module.exports=q;
1
+ "use strict";const s=require("vue"),T=require("./retrie/index.vue.cjs");;/* empty css */const o=require("./code.cjs"),k={key:0,class:"set-props"},q=s.defineComponent({__name:"set-props",props:{name:String,list:Array},emits:["change"],setup(i,{emit:p}){const l=i,m=p,u=s.ref({}),f=s.ref(0),c=s.ref({}),r=s.ref([]);function d(){c.value={};const n=[];l.list?.forEach(t=>{let e=t.name;if(!e.includes(".")&&(e=(e.split("/")[0]||"").trim(),e)){c.value[e]=o.getDefaultValue(t);const{arr:g,type:v,dataType:b}=o.getSpecType(t);u.value[e]=g;let V={label:_(e,t),prop:e,type:v,dataType:b,select:e};n.push(V)}}),r.value=n}function _(n,t){let e=n+": { "+(t.type||"any")+" } "+t.description;return t.default&&(e+=" 默认值="+t.default),t.selectable&&(e+=" 可选值="+t.selectable),e}function h(n,t){let e=Object.assign({},n);m("change",e,t)}let a;function y(){clearTimeout(a),a=setTimeout(()=>{d()},400)}return s.watch(()=>l.name,()=>{r.value=[],s.nextTick(()=>{y()})},{immediate:!0}),(n,t)=>r.value&&r.value.length>0?(s.openBlock(),s.createElementBlock("div",k,[s.createVNode(T,{refresh:f.value,modelValue:c.value,selects:u.value,list:r.value,name:l.name,onQuery:h},null,8,["refresh","modelValue","selects","list","name"])])):s.createCommentVNode("",!0)}});module.exports=q;
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as v, ref as n, watch as T, nextTick as k, createElementBlock as x, createCommentVNode as j, openBlock as B, createVNode as C } from "vue";
2
2
  import E from "./retrie/index.vue.js";
3
3
  /* empty css */
4
- import { getSpecType as N } from "./code.js";
5
- const S = {
4
+ import { getDefaultValue as N, getSpecType as S } from "./code.js";
5
+ const w = {
6
6
  key: 0,
7
7
  class: "set-props"
8
8
  }, R = /* @__PURE__ */ v({
@@ -13,16 +13,16 @@ const S = {
13
13
  },
14
14
  emits: ["change"],
15
15
  setup(i, { emit: u }) {
16
- const r = i, m = u, o = n({}), p = n(0), a = n({}), l = n([]);
16
+ const a = i, m = u, r = n({}), p = n(0), o = n({}), l = n([]);
17
17
  function f() {
18
- a.value = {};
18
+ o.value = {};
19
19
  const s = [];
20
- r.list?.forEach((t) => {
20
+ a.list?.forEach((t) => {
21
21
  let e = t.name;
22
- if (e.includes(".") ? e = "" : e = (e.split("/")[0] || "").trim(), e) {
23
- a.value[e] = (t.default || "").trim();
24
- const { arr: y, type: b, dataType: g } = N(t);
25
- o.value[e] = y;
22
+ if (!e.includes(".") && (e = (e.split("/")[0] || "").trim(), e)) {
23
+ o.value[e] = N(t);
24
+ const { arr: y, type: b, dataType: g } = S(t);
25
+ r.value[e] = y;
26
26
  let V = {
27
27
  label: d(e, t),
28
28
  prop: e,
@@ -49,7 +49,7 @@ const S = {
49
49
  }, 400);
50
50
  }
51
51
  return T(
52
- () => r.name,
52
+ () => a.name,
53
53
  () => {
54
54
  l.value = [], k(() => {
55
55
  _();
@@ -58,13 +58,13 @@ const S = {
58
58
  {
59
59
  immediate: !0
60
60
  }
61
- ), (s, t) => l.value && l.value.length > 0 ? (B(), x("div", S, [
61
+ ), (s, t) => l.value && l.value.length > 0 ? (B(), x("div", w, [
62
62
  C(E, {
63
63
  refresh: p.value,
64
- modelValue: a.value,
65
- selects: o.value,
64
+ modelValue: o.value,
65
+ selects: r.value,
66
66
  list: l.value,
67
- name: r.name,
67
+ name: a.name,
68
68
  onQuery: h
69
69
  }, null, 8, ["refresh", "modelValue", "selects", "list", "name"])
70
70
  ])) : j("", !0);
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),_=require("../../components/compo/index.vue.cjs"),n=require("../../components/choice/index.vue.cjs"),u={class:"__document-compon"},c=e.defineComponent({__name:"index",setup(r){return(o,s)=>(e.openBlock(),e.createElementBlock("div",u,[e.createVNode(n,null,{default:e.withCtx(t=>[e.createVNode(_,{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(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,13 +1,17 @@
1
- import { defineComponent as t, createElementBlock as n, openBlock as _, createVNode as e, withCtx as c } from "vue";
2
- import a from "../../components/compo/index.vue.js";
3
- import m from "../../components/choice/index.vue.js";
4
- const r = { class: "__document-compon" }, d = /* @__PURE__ */ t({
1
+ import { defineComponent as t, createElementBlock as n, openBlock as _, createVNode as e, withCtx as a } from "vue";
2
+ import l from "../../components/compo/info.vue.js";
3
+ import m from "../../components/compo/index.vue.js";
4
+ import r from "../../components/choice/index.vue.js";
5
+ const c = { class: "__document-compon" }, x = /* @__PURE__ */ t({
5
6
  __name: "index",
6
- setup(l) {
7
- return (i, s) => (_(), n("div", r, [
8
- e(m, null, {
9
- default: c((o) => [
10
- e(a, {
7
+ setup(u) {
8
+ return (i, f) => (_(), n("div", c, [
9
+ e(r, null, {
10
+ default: a((o) => [
11
+ e(l, {
12
+ value: o.value
13
+ }, null, 8, ["value"]),
14
+ e(m, {
11
15
  value: o.value
12
16
  }, null, 8, ["value"])
13
17
  ]),
@@ -17,5 +21,5 @@ const r = { class: "__document-compon" }, d = /* @__PURE__ */ t({
17
21
  }
18
22
  });
19
23
  export {
20
- d as default
24
+ x as default
21
25
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/vue-archive",
3
3
  "private": false,
4
- "version": "0.0.42",
4
+ "version": "0.0.44",
5
5
  "type": "module",
6
6
  "description ": "vue 组件注释生成文档",
7
7
  "author": "fangzhongya ",