@fangzhongya/vue-archive 0.0.3-3 → 0.0.3-5

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.
@@ -66527,22 +66527,75 @@ ${vueFormat(getFunBody(st.body), " ")}
66527
66527
  }
66528
66528
  }
66529
66529
  function getChange(str) {
66530
- return new Function(
66531
- "",
66532
- `{
66533
- var a = ${str};
66534
- return a;
66535
- }`
66536
- );
66530
+ const tr = str.trim();
66531
+ if (/^\(/.test(tr)) {
66532
+ return new Function("", str);
66533
+ } else {
66534
+ return new Function(
66535
+ "",
66536
+ `{
66537
+ return ${str}
66538
+ }`
66539
+ );
66540
+ }
66537
66541
  }
66538
66542
  function setValStringify(v, key, propsText) {
66539
66543
  const text = propsText ? propsText[key] : "";
66540
66544
  if (text) {
66541
66545
  return text;
66542
66546
  } else {
66543
- return JSON.stringify(getChange(v + ""));
66547
+ if (typeof v == "string") {
66548
+ return JSON.stringify(getChange(v + ""));
66549
+ } else {
66550
+ return JSON.stringify(v);
66551
+ }
66544
66552
  }
66545
66553
  }
66554
+ function getSpecType(val) {
66555
+ let tarr = getType2(val.type);
66556
+ let type = "any";
66557
+ if (tarr.length == 1) {
66558
+ type = tarr[0].split("<")[0];
66559
+ }
66560
+ const zdtype = type;
66561
+ let selectable = (val.selectable || "").trim();
66562
+ let arr = [];
66563
+ if (selectable && type != "boolean") {
66564
+ selectable.split(",").forEach((v) => {
66565
+ if (v) {
66566
+ let z = v.split(":");
66567
+ arr.push({
66568
+ label: v,
66569
+ prop: z[0].trim()
66570
+ });
66571
+ }
66572
+ });
66573
+ if (type == "function") {
66574
+ type = "function";
66575
+ } else if (type == "array") {
66576
+ type = "choice";
66577
+ } else {
66578
+ type = "select";
66579
+ }
66580
+ }
66581
+ return {
66582
+ arr,
66583
+ zdtype,
66584
+ type,
66585
+ dataType: tarr
66586
+ };
66587
+ }
66588
+ function getType2(value) {
66589
+ let arr = [];
66590
+ let str = (value || "").trim().toLowerCase();
66591
+ str.split(",").forEach((v) => {
66592
+ v = v.trim();
66593
+ if (v) {
66594
+ arr.push(v);
66595
+ }
66596
+ });
66597
+ return [...new Set(arr)].sort();
66598
+ }
66546
66599
 
66547
66600
  // packages/node/index.ts
66548
66601
  var Fang;
@@ -66610,6 +66663,20 @@ function gettests(obj, arr, n) {
66610
66663
  setMd(obj, arr);
66611
66664
  }
66612
66665
  }
66666
+ function getDefaultValue(obj) {
66667
+ const vo = getSpecType(obj).zdtype;
66668
+ const d = (obj.default || "").trim();
66669
+ if (vo == "function") {
66670
+ return new Function("", d);
66671
+ } else {
66672
+ return new Function(
66673
+ "",
66674
+ `{
66675
+ return ${d}
66676
+ }`
66677
+ );
66678
+ }
66679
+ }
66613
66680
  function setVue(propsname, param, url) {
66614
66681
  const ps = getPropsValue(param.propss);
66615
66682
  const es = getEmitsValue(param.emitss);
@@ -66620,7 +66687,7 @@ function setVue(propsname, param, url) {
66620
66687
  let arr = name.split("/");
66621
66688
  name = (arr[0] || "").trim();
66622
66689
  if (name) {
66623
- propsObj[name] = val.default;
66690
+ propsObj[name] = getDefaultValue(val);
66624
66691
  if (arr && arr.length > 1) {
66625
66692
  es.push({
66626
66693
  name: "update:" + name,
@@ -66527,22 +66527,75 @@ ${vueFormat(getFunBody(st.body), " ")}
66527
66527
  }
66528
66528
  }
66529
66529
  function getChange(str) {
66530
- return new Function(
66531
- "",
66532
- `{
66533
- var a = ${str};
66534
- return a;
66535
- }`
66536
- );
66530
+ const tr = str.trim();
66531
+ if (/^\(/.test(tr)) {
66532
+ return new Function("", str);
66533
+ } else {
66534
+ return new Function(
66535
+ "",
66536
+ `{
66537
+ return ${str}
66538
+ }`
66539
+ );
66540
+ }
66537
66541
  }
66538
66542
  function setValStringify(v, key, propsText) {
66539
66543
  const text = propsText ? propsText[key] : "";
66540
66544
  if (text) {
66541
66545
  return text;
66542
66546
  } else {
66543
- return JSON.stringify(getChange(v + ""));
66547
+ if (typeof v == "string") {
66548
+ return JSON.stringify(getChange(v + ""));
66549
+ } else {
66550
+ return JSON.stringify(v);
66551
+ }
66544
66552
  }
66545
66553
  }
66554
+ function getSpecType(val) {
66555
+ let tarr = getType2(val.type);
66556
+ let type = "any";
66557
+ if (tarr.length == 1) {
66558
+ type = tarr[0].split("<")[0];
66559
+ }
66560
+ const zdtype = type;
66561
+ let selectable = (val.selectable || "").trim();
66562
+ let arr = [];
66563
+ if (selectable && type != "boolean") {
66564
+ selectable.split(",").forEach((v) => {
66565
+ if (v) {
66566
+ let z = v.split(":");
66567
+ arr.push({
66568
+ label: v,
66569
+ prop: z[0].trim()
66570
+ });
66571
+ }
66572
+ });
66573
+ if (type == "function") {
66574
+ type = "function";
66575
+ } else if (type == "array") {
66576
+ type = "choice";
66577
+ } else {
66578
+ type = "select";
66579
+ }
66580
+ }
66581
+ return {
66582
+ arr,
66583
+ zdtype,
66584
+ type,
66585
+ dataType: tarr
66586
+ };
66587
+ }
66588
+ function getType2(value) {
66589
+ let arr = [];
66590
+ let str = (value || "").trim().toLowerCase();
66591
+ str.split(",").forEach((v) => {
66592
+ v = v.trim();
66593
+ if (v) {
66594
+ arr.push(v);
66595
+ }
66596
+ });
66597
+ return [...new Set(arr)].sort();
66598
+ }
66546
66599
 
66547
66600
  // packages/node/index.ts
66548
66601
  var Fang;
@@ -66610,6 +66663,20 @@ function gettests(obj, arr, n) {
66610
66663
  setMd(obj, arr);
66611
66664
  }
66612
66665
  }
66666
+ function getDefaultValue(obj) {
66667
+ const vo = getSpecType(obj).zdtype;
66668
+ const d = (obj.default || "").trim();
66669
+ if (vo == "function") {
66670
+ return new Function("", d);
66671
+ } else {
66672
+ return new Function(
66673
+ "",
66674
+ `{
66675
+ return ${d}
66676
+ }`
66677
+ );
66678
+ }
66679
+ }
66613
66680
  function setVue(propsname, param, url) {
66614
66681
  const ps = getPropsValue(param.propss);
66615
66682
  const es = getEmitsValue(param.emitss);
@@ -66620,7 +66687,7 @@ function setVue(propsname, param, url) {
66620
66687
  let arr = name.split("/");
66621
66688
  name = (arr[0] || "").trim();
66622
66689
  if (name) {
66623
- propsObj[name] = val.default;
66690
+ propsObj[name] = getDefaultValue(val);
66624
66691
  if (arr && arr.length > 1) {
66625
66692
  es.push({
66626
66693
  name: "update:" + name,
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),d=require("../use/index.cjs"),k=require("./info.vue.cjs"),f=require("./props.vue.cjs"),g=require("../../config.cjs"),B=require("../md/index.vue.cjs");require("./index.cjs");const v=require("../../utils/glob.cjs"),y={class:"compo"},q={key:0,class:"compo-md"},C={key:0,class:"compo-md-list"},h={key:1,class:"compo-use"},x=e.defineComponent({__name:"index",props:{value:Object},setup(l){const t=l,m=g.getConfig("useparam"),a=e.ref(""),r=e.reactive({md:!0}),c=e.ref([]),s=e.ref({});function p(o){s.value=o}e.watch(()=>t.value,()=>{i()});function i(){var o,n,u;(o=t.value)!=null&&o.key&&(v.getLocalTextComponents((n=t.value)==null?void 0:n.key).then(_=>{a.value=_}),c.value=v.getKeyMds((u=t.value)==null?void 0:u.key)||[])}return i(),(o,n)=>(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(k,{value:l.value},null,8,["value"]),e.createVNode(f,{onChange:p,value:a.value},null,8,["value"]),c.value&&c.value.length?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",{onClick:n[0]||(n[0]=u=>r.md=!r.md),class:"compo-md-name"}," 说明文档 "),r.md?(e.openBlock(),e.createElementBlock("div",C,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,u=>(e.openBlock(),e.createBlock(B,{value:u},null,8,["value"]))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(m)?(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(e.unref(d),{value:t.value,param:e.unref(s)},null,8,["value","param"])])):e.createCommentVNode("",!0)]))}});module.exports=x;
1
+ "use strict";const e=require("vue"),B=require("../use/index.cjs"),x=require("./info.vue.cjs"),y=require("./props.vue.cjs"),q=require("../../config.cjs"),C=require("../md/index.vue.cjs");require("./index.cjs");const d=require("../../utils/glob.cjs"),h={class:"compo"},N={key:0,class:"compo-md"},V={key:0,class:"compo-md-list"},E={key:1,class:"compo-use"},b=e.defineComponent({__name:"index",props:{value:Object},setup(c){const n=c,k=q.getConfig("useparam"),a=e.ref(""),u=e.reactive({md:!0}),s=e.ref([]),v=e.ref([]),p=e.ref([]),i=e.ref([]),m=e.ref([]);function f(l){let{propss:t,slots:o,emitss:r,exposes:g}=l;v.value=t,m.value=o,p.value=r,i.value=g}e.watch(()=>n.value,()=>{_()});function _(){var l,t,o;(l=n.value)!=null&&l.key&&(d.getLocalTextComponents((t=n.value)==null?void 0:t.key).then(r=>{a.value=r}),s.value=d.getKeyMds((o=n.value)==null?void 0:o.key)||[])}return _(),(l,t)=>(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(x,{value:c.value},null,8,["value"]),e.createVNode(y,{onChange:f,value:a.value},null,8,["value"]),s.value&&s.value.length?(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("div",{onClick:t[0]||(t[0]=o=>u.md=!u.md),class:"compo-md-name"}," 说明文档 "),u.md?(e.openBlock(),e.createElementBlock("div",V,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,o=>(e.openBlock(),e.createBlock(C,{value:o},null,8,["value"]))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(e.unref(B),{value:n.value,param:{props:v.value,slot:m.value,emits:p.value,expose:i.value}},null,8,["value","param"])])):e.createCommentVNode("",!0)]))}});module.exports=b;
@@ -1,70 +1,76 @@
1
- import { defineComponent as h, ref as s, reactive as y, watch as C, openBlock as e, createElementBlock as l, createVNode as u, createElementVNode as x, Fragment as $, renderList as B, createBlock as N, createCommentVNode as c, unref as i } from "vue";
2
- import V from "../use/index.js";
3
- import b from "./info.vue.js";
4
- import j from "./props.vue.js";
5
- import { getConfig as E } from "../../config.js";
6
- import L from "../md/index.vue.js";
1
+ import { defineComponent as $, ref as o, reactive as B, watch as N, openBlock as s, createElementBlock as n, createVNode as c, createElementVNode as V, Fragment as E, renderList as L, createBlock as b, createCommentVNode as v, unref as x } from "vue";
2
+ import j from "../use/index.js";
3
+ import w from "./info.vue.js";
4
+ import D from "./props.vue.js";
5
+ import { getConfig as F } from "../../config.js";
6
+ import K from "../md/index.vue.js";
7
7
  import "./index.js";
8
- import { getLocalTextComponents as w, getKeyMds as D } from "../../utils/glob.js";
9
- const F = { class: "compo" }, K = {
8
+ import { getLocalTextComponents as M, getKeyMds as O } from "../../utils/glob.js";
9
+ const T = { class: "compo" }, U = {
10
10
  key: 0,
11
11
  class: "compo-md"
12
- }, M = {
12
+ }, q = {
13
13
  key: 0,
14
14
  class: "compo-md-list"
15
- }, O = {
15
+ }, z = {
16
16
  key: 1,
17
17
  class: "compo-use"
18
- }, J = /* @__PURE__ */ h({
18
+ }, S = /* @__PURE__ */ $({
19
19
  __name: "index",
20
20
  props: {
21
21
  value: Object
22
22
  },
23
- setup(v) {
24
- const t = v, _ = E("useparam"), p = s(""), r = y({
23
+ setup(i) {
24
+ const a = i, h = F("useparam"), p = o(""), m = B({
25
25
  md: !0
26
- }), m = s([]), d = s({});
27
- function k(o) {
28
- d.value = o;
26
+ }), u = o([]), d = o([]), f = o([]), _ = o([]), k = o([]);
27
+ function y(l) {
28
+ let { propss: e, slots: t, emitss: r, exposes: C } = l;
29
+ d.value = e, k.value = t, f.value = r, _.value = C;
29
30
  }
30
- C(
31
- () => t.value,
31
+ N(
32
+ () => a.value,
32
33
  () => {
33
- f();
34
+ g();
34
35
  }
35
36
  );
36
- function f() {
37
- var o, a, n;
38
- (o = t.value) != null && o.key && (w((a = t.value) == null ? void 0 : a.key).then(
39
- (g) => {
40
- p.value = g;
37
+ function g() {
38
+ var l, e, t;
39
+ (l = a.value) != null && l.key && (M((e = a.value) == null ? void 0 : e.key).then(
40
+ (r) => {
41
+ p.value = r;
41
42
  }
42
- ), m.value = D((n = t.value) == null ? void 0 : n.key) || []);
43
+ ), u.value = O((t = a.value) == null ? void 0 : t.key) || []);
43
44
  }
44
- return f(), (o, a) => (e(), l("div", F, [
45
- u(b, { value: v.value }, null, 8, ["value"]),
46
- u(j, {
47
- onChange: k,
45
+ return g(), (l, e) => (s(), n("div", T, [
46
+ c(w, { value: i.value }, null, 8, ["value"]),
47
+ c(D, {
48
+ onChange: y,
48
49
  value: p.value
49
50
  }, null, 8, ["value"]),
50
- m.value && m.value.length ? (e(), l("div", K, [
51
- x("div", {
52
- onClick: a[0] || (a[0] = (n) => r.md = !r.md),
51
+ u.value && u.value.length ? (s(), n("div", U, [
52
+ V("div", {
53
+ onClick: e[0] || (e[0] = (t) => m.md = !m.md),
53
54
  class: "compo-md-name"
54
55
  }, " 说明文档 "),
55
- r.md ? (e(), l("div", M, [
56
- (e(!0), l($, null, B(m.value, (n) => (e(), N(L, { value: n }, null, 8, ["value"]))), 256))
57
- ])) : c("", !0)
58
- ])) : c("", !0),
59
- i(_) ? (e(), l("div", O, [
60
- u(i(V), {
61
- value: t.value,
62
- param: i(d)
56
+ m.md ? (s(), n("div", q, [
57
+ (s(!0), n(E, null, L(u.value, (t) => (s(), b(K, { value: t }, null, 8, ["value"]))), 256))
58
+ ])) : v("", !0)
59
+ ])) : v("", !0),
60
+ x(h) ? (s(), n("div", z, [
61
+ c(x(j), {
62
+ value: a.value,
63
+ param: {
64
+ props: d.value,
65
+ slot: k.value,
66
+ emits: f.value,
67
+ expose: _.value
68
+ }
63
69
  }, null, 8, ["value", "param"])
64
- ])) : c("", !0)
70
+ ])) : v("", !0)
65
71
  ]));
66
72
  }
67
73
  });
68
74
  export {
69
- J as default
75
+ S as default
70
76
  };
@@ -1,21 +1,20 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),m=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs"),j=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs"),p=require("./util.cjs");function v(t,n,i,e){const r=[],o=[];let h=!0;Object.keys(n).forEach(s=>{let f=n[s];if(/^on[A-Z]/.test(s)&&typeof f=="function"){let u=s.substring(2);const l=s.split(":");let c;if(l.length>1?(c=l[0]+l.slice(1).map(a=>m.firstUpper(a)).join(""),u=j.firstLower(u)):(c=l[0],u=F.humpToLine(u)),l.includes("-")){let a=c.split("-");a=a.map((g,$)=>$!=0?m.firstUpper(g):g),c=a.join("")}r.push(" @"+u+'="'+c+'"'),o.push("function "+c+"(...arr) {"),o.push(" console.log('"+c+"', arr)"),o.push("}")}else if(r.push(" :"+s+'="'+s+'"'),typeof f=="function")o.push("const "+s+" = "+O(f,s,e));else if(h&&(h=!1,o.unshift("import { ref } from 'vue';")),typeof f>"u")o.push("const "+s+" = ref();");else{let u=J(f,s,e);o.push("const "+s+" = ref("+u+");")}}),r.length>0&&r.unshift("");const d=b(i);return`<!--${t}-->
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),d=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs"),b=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs"),h=require("./util.cjs");function S(t,e,n,r){const i=[],s=[];let l=!0;Object.keys(e).forEach(o=>{let f=e[o];if(/^on[A-Z]/.test(o)&&typeof f=="function"){let u=o.substring(2);const p=o.split(":");let c;if(p.length>1?(c=p[0]+p.slice(1).map(a=>d.firstUpper(a)).join(""),u=b.firstLower(u)):(c=p[0],u=$.humpToLine(u)),p.includes("-")){let a=c.split("-");a=a.map((m,y)=>y!=0?d.firstUpper(m):m),c=a.join("")}i.push(" @"+u+'="'+c+'"'),s.push("function "+c+"(...arr) {"),s.push(" console.log('"+c+"', arr)"),s.push("}")}else if(i.push(" :"+o+'="'+o+'"'),typeof f=="function")s.push("const "+o+" = "+j(f,o,r));else if(l&&(l=!1,s.unshift("import { ref } from 'vue';")),typeof f>"u")s.push("const "+o+" = ref();");else{let u=J(f,o,r);s.push("const "+o+" = ref("+u+");")}}),i.length>0&&i.unshift("");const g=F(n);return`<!--${t}-->
2
2
  <template>
3
3
  <div>
4
- <${t}${r.join(`
5
- `)}>${d.join(`
4
+ <${t}${i.join(`
5
+ `)}>${g.join(`
6
6
  `)}
7
7
  </${t}>
8
8
  </div>
9
9
  </template>
10
10
  <script lang="ts" setup>
11
- ${o.join(`
11
+ ${s.join(`
12
12
  `)}
13
13
  <\/script>
14
- `}function b(t={}){const n=[];return Object.keys(t).forEach(i=>{const e=t[i];if(e){const r=` <template #${i}="scope">
15
- ${p.vueFormat(e," ")}
16
- </template>`;n.push(r)}}),n&&n.length>0&&n.unshift(""),n}function O(t,n,i){const e=i?i[n]:"";if(e)return"function"+e;{const r=p.getFunctionFormat(p.prettierFormat(t.toString()));if(r){let o=`{
17
- ${p.vueFormat(p.getFunBody(r.body)," ")}
18
- }`;return`function${r.param}${o}`}else return"undefined"}}function S(t){return new Function("",`{
19
- var a = ${t};
20
- return a;
21
- }`)}function J(t,n,i){const e=i?i[n]:"";return e||JSON.stringify(S(t+""))}exports.getHmtl=v;
14
+ `}function F(t={}){const e=[];return Object.keys(t).forEach(n=>{const r=t[n];if(r){const i=` <template #${n}="scope">
15
+ ${h.vueFormat(r," ")}
16
+ </template>`;e.push(i)}}),e&&e.length>0&&e.unshift(""),e}function j(t,e,n){const r=n?n[e]:"";if(r)return"function"+r;{const i=h.getFunctionFormat(h.prettierFormat(t.toString()));if(i){let s=`{
17
+ ${h.vueFormat(h.getFunBody(i.body)," ")}
18
+ }`;return`function${i.param}${s}`}else return"undefined"}}function O(t){const e=t.trim();return/^\(/.test(e)?new Function("",t):new Function("",`{
19
+ return ${t}
20
+ }`)}function J(t,e,n){const r=n?n[e]:"";return r||JSON.stringify(typeof t=="string"?O(t+""):t)}function w(t){let e=E(t.type),n="any";e.length==1&&(n=e[0].split("<")[0]);const r=n;let i=(t.selectable||"").trim(),s=[];return i&&n!="boolean"&&(i.split(",").forEach(l=>{if(l){let g=l.split(":");s.push({label:l,prop:g[0].trim()})}}),n=="function"?n="function":n=="array"?n="choice":n="select"),{arr:s,zdtype:r,type:n,dataType:e}}function E(t){let e=[];return(t||"").trim().toLowerCase().split(",").forEach(r=>{r=r.trim(),r&&e.push(r)}),[...new Set(e)].sort()}exports.getHmtl=S;exports.getSpecType=w;
@@ -1,2 +1,14 @@
1
1
  import type { ObjStr, ObjUnk } from '../../config';
2
+ import type { Spec } from '../../utils/index';
2
3
  export declare function getHmtl(propsname: string, value: ObjUnk, slotValue?: ObjStr, propsText?: ObjStr): string;
4
+ type SelectsObj = {
5
+ label: string;
6
+ prop: unknown;
7
+ };
8
+ export declare function getSpecType(val: Spec): {
9
+ arr: SelectsObj[];
10
+ zdtype: string;
11
+ type: string;
12
+ dataType: string[];
13
+ };
14
+ export {};
@@ -1,108 +1,135 @@
1
- import { humpToLine as F } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
2
- import { firstUpper as h } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js";
3
- import { firstLower as j } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js";
4
- import { vueFormat as g, getFunctionFormat as v, prettierFormat as b, getFunBody as S } from "./util.js";
5
- function N(t, n, s, e) {
6
- const r = [], o = [];
7
- let p = !0;
8
- Object.keys(n).forEach((i) => {
9
- let c = n[i];
10
- if (/^on[A-Z]/.test(i) && typeof c == "function") {
11
- let f = i.substring(2);
12
- const l = i.split(":");
13
- let u;
14
- if (l.length > 1 ? (u = l[0] + l.slice(1).map((a) => h(a)).join(""), f = j(f)) : (u = l[0], f = F(f)), l.includes("-")) {
15
- let a = u.split("-");
16
- a = a.map((m, d) => d != 0 ? h(m) : m), u = a.join("");
1
+ import { humpToLine as y } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
2
+ import { firstUpper as g } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js";
3
+ import { firstLower as b } from "../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js";
4
+ import { vueFormat as d, getFunctionFormat as F, prettierFormat as S, getFunBody as j } from "./util.js";
5
+ function H(t, e, n, r) {
6
+ const i = [], s = [];
7
+ let u = !0;
8
+ Object.keys(e).forEach((o) => {
9
+ let c = e[o];
10
+ if (/^on[A-Z]/.test(o) && typeof c == "function") {
11
+ let f = o.substring(2);
12
+ const p = o.split(":");
13
+ let l;
14
+ if (p.length > 1 ? (l = p[0] + p.slice(1).map((a) => g(a)).join(""), f = b(f)) : (l = p[0], f = y(f)), p.includes("-")) {
15
+ let a = l.split("-");
16
+ a = a.map((h, $) => $ != 0 ? g(h) : h), l = a.join("");
17
17
  }
18
- r.push(
19
- " @" + f + '="' + u + '"'
20
- ), o.push("function " + u + "(...arr) {"), o.push(
21
- " console.log('" + u + "', arr)"
22
- ), o.push("}");
23
- } else if (r.push(
24
- " :" + i + '="' + i + '"'
18
+ i.push(
19
+ " @" + f + '="' + l + '"'
20
+ ), s.push("function " + l + "(...arr) {"), s.push(
21
+ " console.log('" + l + "', arr)"
22
+ ), s.push("}");
23
+ } else if (i.push(
24
+ " :" + o + '="' + o + '"'
25
25
  ), typeof c == "function")
26
- o.push(
27
- "const " + i + " = " + w(
26
+ s.push(
27
+ "const " + o + " = " + E(
28
28
  c,
29
- i,
30
- e
29
+ o,
30
+ r
31
31
  )
32
32
  );
33
- else if (p && (p = !1, o.unshift(
33
+ else if (u && (u = !1, s.unshift(
34
34
  "import { ref } from 'vue';"
35
35
  )), typeof c > "u")
36
- o.push("const " + i + " = ref();");
36
+ s.push("const " + o + " = ref();");
37
37
  else {
38
- let f = E(
38
+ let f = L(
39
39
  c,
40
- i,
41
- e
40
+ o,
41
+ r
42
42
  );
43
- o.push(
44
- "const " + i + " = ref(" + f + ");"
43
+ s.push(
44
+ "const " + o + " = ref(" + f + ");"
45
45
  );
46
46
  }
47
- }), r.length > 0 && r.unshift("");
48
- const $ = O(s);
47
+ }), i.length > 0 && i.unshift("");
48
+ const m = w(n);
49
49
  return `<!--${t}-->
50
50
  <template>
51
51
  <div>
52
- <${t}${r.join(`
53
- `)}>${$.join(`
52
+ <${t}${i.join(`
53
+ `)}>${m.join(`
54
54
  `)}
55
55
  </${t}>
56
56
  </div>
57
57
  </template>
58
58
  <script lang="ts" setup>
59
- ${o.join(`
59
+ ${s.join(`
60
60
  `)}
61
61
  <\/script>
62
62
  `;
63
63
  }
64
- function O(t = {}) {
65
- const n = [];
66
- return Object.keys(t).forEach((s) => {
67
- const e = t[s];
68
- if (e) {
69
- const r = ` <template #${s}="scope">
70
- ${g(e, " ")}
64
+ function w(t = {}) {
65
+ const e = [];
66
+ return Object.keys(t).forEach((n) => {
67
+ const r = t[n];
68
+ if (r) {
69
+ const i = ` <template #${n}="scope">
70
+ ${d(r, " ")}
71
71
  </template>`;
72
- n.push(r);
72
+ e.push(i);
73
73
  }
74
- }), n && n.length > 0 && n.unshift(""), n;
74
+ }), e && e.length > 0 && e.unshift(""), e;
75
75
  }
76
- function w(t, n, s) {
77
- const e = s ? s[n] : "";
78
- if (e)
79
- return "function" + e;
76
+ function E(t, e, n) {
77
+ const r = n ? n[e] : "";
78
+ if (r)
79
+ return "function" + r;
80
80
  {
81
- const r = v(
82
- b(t.toString())
81
+ const i = F(
82
+ S(t.toString())
83
83
  );
84
- if (r) {
85
- let o = `{
86
- ${g(S(r.body), " ")}
84
+ if (i) {
85
+ let s = `{
86
+ ${d(j(i.body), " ")}
87
87
  }`;
88
- return `function${r.param}${o}`;
88
+ return `function${i.param}${s}`;
89
89
  } else
90
90
  return "undefined";
91
91
  }
92
92
  }
93
- function B(t) {
94
- return new Function(
93
+ function O(t) {
94
+ const e = t.trim();
95
+ return /^\(/.test(e) ? new Function("", t) : new Function(
95
96
  "",
96
97
  `{
97
- var a = ${t};
98
- return a;
99
- }`
98
+ return ${t}
99
+ }`
100
100
  );
101
101
  }
102
- function E(t, n, s) {
103
- const e = s ? s[n] : "";
104
- return e || JSON.stringify(B(t + ""));
102
+ function L(t, e, n) {
103
+ const r = n ? n[e] : "";
104
+ return r || JSON.stringify(typeof t == "string" ? O(t + "") : t);
105
+ }
106
+ function T(t) {
107
+ let e = z(t.type), n = "any";
108
+ e.length == 1 && (n = e[0].split("<")[0]);
109
+ const r = n;
110
+ let i = (t.selectable || "").trim(), s = [];
111
+ return i && n != "boolean" && (i.split(",").forEach((u) => {
112
+ if (u) {
113
+ let m = u.split(":");
114
+ s.push({
115
+ label: u,
116
+ prop: m[0].trim()
117
+ });
118
+ }
119
+ }), n == "function" ? n = "function" : n == "array" ? n = "choice" : n = "select"), {
120
+ arr: s,
121
+ zdtype: r,
122
+ type: n,
123
+ dataType: e
124
+ };
125
+ }
126
+ function z(t) {
127
+ let e = [];
128
+ return (t || "").trim().toLowerCase().split(",").forEach((r) => {
129
+ r = r.trim(), r && e.push(r);
130
+ }), [...new Set(e)].sort();
105
131
  }
106
132
  export {
107
- N as getHmtl
133
+ H as getHmtl,
134
+ T as getSpecType
108
135
  };
@@ -1 +1 @@
1
- "use strict";const s=require("vue"),x=require("./set-props.vue.cjs"),q=require("./set-emit.vue.cjs"),E=require("./set-code.vue.cjs"),b=require("./set-expose.vue.cjs"),C=require("./set-slot.vue.cjs"),i=require("../../utils/props.cjs"),V=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs"),j=s.defineComponent({props:{value:{type:Object},param:{type:Object}},render(O,T,v,D,a){console.log("render",new Date().getTime());const r=s.reactive({emitValue:{},slotValue:{}}),n=v.value;let c="div";n.component?c=s.defineAsyncComponent(n.component):n.name&&(c=s.resolveComponent(n.name));const u=v.param,d=i.getPropsValue(u.propss||[]),m=i.getEmitsValue(u.emitss||[]),y=i.getExposeValue(u.exposes||[]),h=i.getSlotValue(u.slots||[]),l={},f={};d.forEach(t=>{let e=t.name;if(!e.includes(".")){let o=e.split("/");e=(o[0]||"").trim(),e&&(l[e]=a.propsValue[e],o&&o.length>1&&m.push({name:"update:"+e,description:t.description,selectable:"value:["+t.type+"]"}))}}),m.forEach(t=>{let e=t.name;if(e.includes("-")){let p=e.split("-");p=p.map((_,U)=>V.firstUpper(_)),e=p.join("")}else e=V.firstUpper(e);const o="on"+e;l[o]=(...p)=>{const _={arr:p,_date_:new Date().getTime()};r.emitValue[t.name]=_}});let g;return h.forEach(t=>{const e=t.name||"default";f[e]=o=>{if(r.slotValue[e])return s.h(s.defineComponent({props:{scope:{type:Object}},template:r.slotValue[e]}),{scope:o})}}),s.h("div",{class:"use"},[s.h("div",{class:"use-props"},s.h(x,{name:n.name,list:d,onChange:(t,e)=>{a.propsValue=t,a.propsText=e}})),s.h("div",{class:"use-component"},s.h(c,{...l,ref:t=>{g=t}},f)),s.h("div",{class:"use-code"},s.h(E,{name:n.name,value:l,propsText:a.propsText,slotValue:r.slotValue})),s.h("div",{class:"use-emit"},s.h(q,{name:n.name,list:m,value:r.emitValue})),s.h("div",{class:"use-expose"},s.h(b,{name:n.name,list:y,getRef:()=>g})),s.h("div",{class:"use-slot"},s.h(C,{name:n.name,list:h,onChange:(t,e)=>{r.slotValue[t]=e}}))])},data(){return{propsValue:{},propsText:{}}}});module.exports=j;
1
+ "use strict";const t=require("vue"),x=require("./set-props.vue.cjs"),q=require("./set-emit.vue.cjs"),E=require("./set-code.vue.cjs"),b=require("./set-expose.vue.cjs"),C=require("./set-slot.vue.cjs"),i=require("../../utils/props.cjs"),V=require("../../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-18/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs"),j=t.defineComponent({props:{value:{type:Object},param:{type:Object}},render(O,T,v,D,a){console.log("render",new Date().getTime());const r=t.reactive({emitValue:{},slotValue:{}}),n=v.value;let c="div";n.component?c=t.defineAsyncComponent(n.component):n.name&&(c=t.resolveComponent(n.name));const u=v.param,d=i.getPropsValue(u.props),m=i.getEmitsValue(u.emits),y=i.getExposeValue(u.expose),h=i.getSlotValue(u.slot),l={},f={};d.forEach(s=>{let e=s.name;if(!e.includes(".")){let o=e.split("/");e=(o[0]||"").trim(),e&&(l[e]=a.propsValue[e],o&&o.length>1&&m.push({name:"update:"+e,description:s.description,selectable:"value:["+s.type+"]"}))}}),m.forEach(s=>{let e=s.name;if(e.includes("-")){let p=e.split("-");p=p.map((_,U)=>V.firstUpper(_)),e=p.join("")}else e=V.firstUpper(e);const o="on"+e;l[o]=(...p)=>{const _={arr:p,_date_:new Date().getTime()};r.emitValue[s.name]=_}});let g;return h.forEach(s=>{const e=s.name||"default";f[e]=o=>{if(r.slotValue[e])return t.h(t.defineComponent({props:{scope:{type:Object}},template:r.slotValue[e]}),{scope:o})}}),t.h("div",{class:"use"},[t.h("div",{class:"use-props"},t.h(x,{name:n.name,list:d,onChange:(s,e)=>{a.propsValue=s,a.propsText=e}})),t.h("div",{class:"use-component"},t.h(c,{...l,ref:s=>{g=s}},f)),t.h("div",{class:"use-code"},t.h(E,{name:n.name,value:l,propsText:a.propsText,slotValue:r.slotValue})),t.h("div",{class:"use-emit"},t.h(q,{name:n.name,list:m,value:r.emitValue})),t.h("div",{class:"use-expose"},t.h(b,{name:n.name,list:y,getRef:()=>g})),t.h("div",{class:"use-slot"},t.h(C,{name:n.name,list:h,onChange:(s,e)=>{r.slotValue[s]=e}}))])},data(){return{propsValue:{},propsText:{}}}});module.exports=j;
@@ -26,7 +26,7 @@ const K = g({
26
26
  }), o = f.value;
27
27
  let i = "div";
28
28
  o.component ? i = j(o.component) : o.name && (i = T(o.name));
29
- const p = f.param, d = D(p.propss || []), c = w(p.emitss || []), x = U(p.exposes || []), V = k(p.slots || []), l = {}, v = {};
29
+ const p = f.param, d = D(p.props), c = w(p.emits), x = U(p.expose), V = k(p.slot), l = {}, v = {};
30
30
  d.forEach((s) => {
31
31
  let e = s.name;
32
32
  if (!e.includes(".")) {
@@ -1 +1 @@
1
- "use strict";const l=require("vue"),w=require("./retrie/index.vue.cjs"),C={key:0,class:"set-props"},j=l.defineComponent({__name:"set-props",props:{name:String,list:Array},emits:["change"],setup(d,{emit:_}){const i=d,p=l.ref({}),y=l.ref(0),c=l.ref({}),a=l.ref([]);function b(){var e;c.value={};const r=[];(e=i.list)==null||e.forEach(s=>{let t=s.name;if(t.includes(".")?t="":t=(t.split("/")[0]||"").trim(),t){let o=V(s.type),n="any";o.length==1&&(n=o[0].split("<")[0]),c.value[t]=(s.default||"").trim();let m=(s.selectable||"").trim();if(m&&n!="boolean"){let h=[];m.split(",").forEach(u=>{if(u){let E=u.split(":");h.push({label:u,prop:E[0].trim()})}}),p.value[t]=h,n=="function"?n="function":n=="array"?n="choice":n="select"}let x={label:g(t,s),prop:t,type:n,dataType:o,select:t};r.push(x)}}),a.value=r}function g(r,e){let s=r+": { "+(e.type||"any")+" } "+e.description;return e.default&&(s+=" 默认值="+e.default),e.selectable&&(s+=" 可选值="+e.selectable),s}function V(r){let e=[];return(r||"").trim().toLowerCase().split(",").forEach(t=>{t=t.trim(),t&&e.push(t)}),[...new Set(e)].sort()}function T(r,e){let s=Object.assign({},r);_("change",s,e)}let f;function k(){clearTimeout(f),f=setTimeout(()=>{b()},400)}return l.watch(()=>i.name,()=>{a.value=[],l.nextTick(()=>{k()})},{immediate:!0}),(r,e)=>a.value&&a.value.length>0?(l.openBlock(),l.createElementBlock("div",C,[l.createVNode(w,{refresh:y.value,modelValue:c.value,selects:p.value,list:a.value,name:i.name,onQuery:T},null,8,["refresh","modelValue","selects","list","name"])])):l.createCommentVNode("",!0)}});module.exports=j;
1
+ "use strict";const t=require("vue"),V=require("./retrie/index.vue.cjs"),T=require("./code.cjs"),k={key:0,class:"set-props"},x=t.defineComponent({__name:"set-props",props:{name:String,list:Array},emits:["change"],setup(i,{emit:p}){const c=i,u=t.ref({}),f=t.ref(0),a=t.ref({}),l=t.ref([]);function m(){var e;a.value={};const r=[];(e=c.list)==null||e.forEach(s=>{let n=s.name;if(n.includes(".")?n="":n=(n.split("/")[0]||"").trim(),n){a.value[n]=(s.default||"").trim();const{arr:y,type:v,dataType:b}=T.getSpecType(s);u.value[n]=y;let g={label:d(n,s),prop:n,type:v,dataType:b,select:n};r.push(g)}}),l.value=r}function d(r,e){let s=r+": { "+(e.type||"any")+" } "+e.description;return e.default&&(s+=" 默认值="+e.default),e.selectable&&(s+=" 可选值="+e.selectable),s}function _(r,e){let s=Object.assign({},r);p("change",s,e)}let o;function h(){clearTimeout(o),o=setTimeout(()=>{m()},400)}return t.watch(()=>c.name,()=>{l.value=[],t.nextTick(()=>{h()})},{immediate:!0}),(r,e)=>l.value&&l.value.length>0?(t.openBlock(),t.createElementBlock("div",k,[t.createVNode(V,{refresh:f.value,modelValue:a.value,selects:u.value,list:l.value,name:c.name,onQuery:_},null,8,["refresh","modelValue","selects","list","name"])])):t.createCommentVNode("",!0)}});module.exports=x;
@@ -1,92 +1,75 @@
1
- import { defineComponent as x, ref as n, watch as C, nextTick as j, openBlock as B, createElementBlock as L, createVNode as N, createCommentVNode as S } from "vue";
2
- import z from "./retrie/index.vue.js";
3
- const A = {
1
+ import { defineComponent as v, ref as a, watch as T, nextTick as k, openBlock as x, createElementBlock as j, createVNode as B, createCommentVNode as C } from "vue";
2
+ import E from "./retrie/index.vue.js";
3
+ import { getSpecType as N } from "./code.js";
4
+ const S = {
4
5
  key: 0,
5
6
  class: "set-props"
6
- }, $ = /* @__PURE__ */ x({
7
+ }, Q = /* @__PURE__ */ v({
7
8
  __name: "set-props",
8
9
  props: {
9
10
  name: String,
10
11
  list: Array
11
12
  },
12
13
  emits: ["change"],
13
- setup(d, { emit: b }) {
14
- const i = d, f = n({}), y = n(0), o = n({}), a = n([]);
15
- function _() {
14
+ setup(u, { emit: m }) {
15
+ const r = u, c = a({}), p = a(0), o = a({}), n = a([]);
16
+ function f() {
16
17
  var e;
17
18
  o.value = {};
18
- const s = [];
19
- (e = i.list) == null || e.forEach((l) => {
20
- let t = l.name;
21
- if (t.includes(".") ? t = "" : t = (t.split("/")[0] || "").trim(), t) {
22
- let c = V(l.type), r = "any";
23
- c.length == 1 && (r = c[0].split("<")[0]), o.value[t] = (l.default || "").trim();
24
- let m = (l.selectable || "").trim();
25
- if (m && r != "boolean") {
26
- let h = [];
27
- m.split(",").forEach((u) => {
28
- if (u) {
29
- let w = u.split(":");
30
- h.push({
31
- label: u,
32
- prop: w[0].trim()
33
- });
34
- }
35
- }), f.value[t] = h, r == "function" ? r = "function" : r == "array" ? r = "choice" : r = "select";
36
- }
37
- let E = {
38
- label: g(t, l),
39
- prop: t,
40
- type: r,
41
- dataType: c,
42
- select: t
19
+ const l = [];
20
+ (e = r.list) == null || e.forEach((t) => {
21
+ let s = t.name;
22
+ if (s.includes(".") ? s = "" : s = (s.split("/")[0] || "").trim(), s) {
23
+ o.value[s] = (t.default || "").trim();
24
+ const { arr: y, type: b, dataType: g } = N(t);
25
+ c.value[s] = y;
26
+ let V = {
27
+ label: d(s, t),
28
+ prop: s,
29
+ type: b,
30
+ dataType: g,
31
+ select: s
43
32
  };
44
- s.push(E);
33
+ l.push(V);
45
34
  }
46
- }), a.value = s;
47
- }
48
- function g(s, e) {
49
- let l = s + ": { " + (e.type || "any") + " } " + e.description;
50
- return e.default && (l += " 默认值=" + e.default), e.selectable && (l += " 可选值=" + e.selectable), l;
35
+ }), n.value = l;
51
36
  }
52
- function V(s) {
53
- let e = [];
54
- return (s || "").trim().toLowerCase().split(",").forEach((t) => {
55
- t = t.trim(), t && e.push(t);
56
- }), [...new Set(e)].sort();
37
+ function d(l, e) {
38
+ let t = l + ": { " + (e.type || "any") + " } " + e.description;
39
+ return e.default && (t += " 默认值=" + e.default), e.selectable && (t += " 可选值=" + e.selectable), t;
57
40
  }
58
- function T(s, e) {
59
- let l = Object.assign({}, s);
60
- b("change", l, e);
41
+ function h(l, e) {
42
+ let t = Object.assign({}, l);
43
+ m("change", t, e);
61
44
  }
62
- let p;
63
- function k() {
64
- clearTimeout(p), p = setTimeout(() => {
65
- _();
45
+ let i;
46
+ function _() {
47
+ clearTimeout(i), i = setTimeout(() => {
48
+ f();
66
49
  }, 400);
67
50
  }
68
- return C(
69
- () => i.name,
51
+ return T(
52
+ () => r.name,
70
53
  () => {
71
- a.value = [], j(() => {
72
- k();
54
+ n.value = [], k(() => {
55
+ _();
73
56
  });
74
57
  },
75
58
  {
76
59
  immediate: !0
77
60
  }
78
- ), (s, e) => a.value && a.value.length > 0 ? (B(), L("div", A, [
79
- N(z, {
80
- refresh: y.value,
61
+ ), (l, e) => n.value && n.value.length > 0 ? (x(), j("div", S, [
62
+ B(E, {
63
+ refresh: p.value,
81
64
  modelValue: o.value,
82
- selects: f.value,
83
- list: a.value,
84
- name: i.name,
85
- onQuery: T
65
+ selects: c.value,
66
+ list: n.value,
67
+ name: r.name,
68
+ onQuery: h
86
69
  }, null, 8, ["refresh", "modelValue", "selects", "list", "name"])
87
- ])) : S("", !0);
70
+ ])) : C("", !0);
88
71
  }
89
72
  });
90
73
  export {
91
- $ as default
74
+ Q as default
92
75
  };
package/dist/style.css CHANGED
@@ -1,4 +1,4 @@
1
- :root{--bor-cor: rgb(239, 248, 255);--but-cor: rgb(27, 155, 253);--but-hover-cor: rgb(0, 145, 255);--bg-but-hover-cor: rgb(128, 199, 253);--bg-aside-cor: rgb(228, 251, 197);--bg-aside-on-cor: rgb(78, 250, 87);--bg-index-cor: rgb(248, 248, 248);--bg-table-th-cor: rgb(207, 246, 251);--bg-table-td-cor: rgb(221, 243, 246);--bg-test-cor: rgb(236 255 236);--bg-test-err-cor: rgb(255, 210, 210);--bg-test-pro-cor: rgb(203, 246, 255);--bg-test-err-pro-cor: rgb(251, 203, 255);--te-test-err-cor: rgb(247, 56, 56);--te-test-pro-cor: rgb(106, 131, 255);--bg-test-body: rgb(255, 255, 255);--bg-code-highlig: rgb(255, 251, 223);--bg-box-cor: rgb(198, 198, 198);--bg-md-cor: rgb(255, 233, 243);--bg-use-cor: rgb(193, 219, 255);--bg-use-component-cor: rgb(246, 246, 246);--text-cor: rgb(0, 0, 0);--fs-1: 12px;--fs-2: 14px;--fs-3: 16px;--fs-4: 18px;--fs-5: 20px}.__document{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow:auto;text-align:left;width:100%;height:100%;padding:0;margin:0}.__document .but-div{cursor:pointer;color:var(--but-cor);padding:5px 10px}.__document .but-div:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside{padding:20px 0}.__document .aside .aside-li{padding:5px 10px;height:60px;font-size:20px;font-weight:600;border-bottom:1px solid var(--bor-cor);cursor:pointer;display:flex;flex-direction:row;align-items:center}.__document .aside .aside-li:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside .aside-li.on{background-color:var(--bg-aside-on-cor)}.__document .aside .aside-li .aside-li-name{width:100%}.__document .aside .aside-li .aside-li-name .aside-li-name-alias{font-size:var(--fs-2)}.__document .aside .aside-li .aside-li-name .aside-li-name-aliass{font-size:var(--fs-1)}.__document .md{position:relative}.__document .use .use-component{padding:10px;display:flex;justify-content:center;align-items:center;height:300px;background-color:var(--bg-use-component-cor)}.__document .set-code .set-code-buts{display:flex;align-items:center}.__document .form-item.error{background-color:var(--te-test-err-cor)}.__document .compo .compo-top .compo-top-name{padding:10px;font-size:var(--fs-4)}.__document .compo .compo-top .compo-top-name .compo-top-name-li{font-size:var(--fs-2)}.__document .compo .compo-top .compo-top-info{padding:10px;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-info .compo-top-athor,.__document .compo .compo-top .compo-top-info .compo-top-date{flex:1;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-descriptions{padding:0 10px;font-size:var(--fs-2)}.__document .compo .compo-li h4{margin:10px 0 0;padding:10px}.__document .compo .compo-li .compo-talbe{width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body{border:1px solid var(--bor-cor);width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body td,.__document .compo .compo-li .compo-talbe .compo-talbe-body th{padding:5px 10px;border-bottom:1px solid var(--bor-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body th{background-color:var(--bg-table-th-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body td{background-color:var(--bg-table-td-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body tr:last-child td{border-bottom:0}.__document .compo .compo-li .compo-talbe .compo-talbe-body .compo-talbe-zw{width:100%;text-align:center;padding:10px}.__document .compo .compo-md{padding:10px;background-color:var(--bg-md-cor)}.__document .compo .compo-use{padding:10px;background-color:var(--bg-use-cor)}.__document .main .main-but{text-align:right;display:flex;flex-direction:row;align-items:center}.__document .test.error .test-top{background-color:var(--bg-test-err-cor)}.__document .test.proposal .test-top{background-color:var(--bg-test-pro-cor)}.__document .test.error-proposal .test-top{background-color:var(--bg-test-err-pro-cor)}.__document .test .test-top{padding:5px;background-color:var(--bg-test-cor)}.__document .test .test-top .test-top-error{color:var(--te-test-err-cor)}.__document .test .test-top .test-top-proposal{color:var(--te-test-pro-cor)}.__document .test .test-div .test-body{padding:5px;background-color:var(--bg-test-body)}.__document .code{padding:0}.__document .code .code-top .code-top-but,.__document .code .code-top .code-top-but .top-but-files{display:flex;flex-direction:row;align-items:center}.__document .code .code-highlightjs{padding:0}.__document .code .code-highlightjs .hljs{background-color:var(--bg-code-highlig)}.__document .box-url{position:relative}.__document .box-url:hover .box-url-box{display:block}.__document .box-url .box-url-box{position:fixed;top:25px;display:none;background-color:var(--bg-box-cor);font-size:var(--fs-1);color:var(--text-cor);z-index:100000}.__document .box-url .box-url-box .box-div-li{height:20px;line-height:20px;display:flex;flex-direction:row;align-items:center}.__document .box-url .box-url-box .box-div-li .box-div-li-span{white-space:nowrap;padding:5px 10px}.__document .__document-index{width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:row}.__document .__document-index .index-aside{width:250px;position:relative;z-index:100}.__document .__document-index .index-aside .index-aside-div{height:100%;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-index .index-body{flex:1;position:relative;background-color:var(--bg-index-cor)}.__document .__document-index .index-body .index-div{padding:20px;position:absolute;top:0;right:0;left:0;bottom:0;overflow-y:auto}.__document .__document-tests{padding:10px;height:100%;position:relative}.__document .__document-tests .tests-top .but-div.on{background-color:var(--bg-aside-on-cor)}.__document .__document-develop,.__document .__document-single{padding:10px;height:100%;position:relative}.__document .__document-single .single-top .single-top-li{display:flex;flex-direction:row;align-items:center}.__document .__document-single .single-top .single-top-li .single-top-li-span{padding:5px 10px}.__document .__document-compon{padding:10px;height:100%;position:relative}.__document .__document-compon .__document-compon-body.choice{padding-left:30px}.__document .__document-compon .__document-compon-choice{position:absolute;top:0;bottom:0;left:0;z-index:100;display:flex;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but{cursor:pointer}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
1
+ :root{--bor-cor: rgb(239, 248, 255);--but-cor: rgb(27, 155, 253);--but-hover-cor: rgb(0, 145, 255);--bg-but-hover-cor: rgb(128, 199, 253);--bg-aside-cor: rgb(228, 251, 197);--bg-aside-on-cor: rgb(78, 250, 87);--bg-index-cor: rgb(248, 248, 248);--bg-table-th-cor: rgb(207, 246, 251);--bg-table-td-cor: rgb(221, 243, 246);--bg-test-cor: rgb(236 255 236);--bg-test-err-cor: rgb(255, 210, 210);--bg-test-pro-cor: rgb(203, 246, 255);--bg-test-err-pro-cor: rgb(251, 203, 255);--te-test-err-cor: rgb(247, 56, 56);--te-test-pro-cor: rgb(106, 131, 255);--bg-test-body: rgb(255, 255, 255);--bg-code-highlig: rgb(255, 251, 223);--bg-box-cor: rgb(198, 198, 198);--bg-md-cor: rgb(255, 233, 243);--bg-use-cor: rgb(193, 219, 255);--bg-use-component-cor: rgb(246, 246, 246);--text-cor: rgb(0, 0, 0);--fs-1: 12px;--fs-2: 14px;--fs-3: 16px;--fs-4: 18px;--fs-5: 20px}.__document{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow:auto;text-align:left;width:100%;height:100%;padding:0;margin:0}.__document .but-div{cursor:pointer;color:var(--but-cor);padding:5px 10px}.__document .but-div:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside{padding:20px 0}.__document .aside .aside-li{padding:5px 10px;height:60px;font-size:20px;font-weight:600;border-bottom:1px solid var(--bor-cor);cursor:pointer;display:flex;flex-direction:row;align-items:center}.__document .aside .aside-li:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside .aside-li.on{background-color:var(--bg-aside-on-cor)}.__document .aside .aside-li .aside-li-name{width:100%}.__document .aside .aside-li .aside-li-name .aside-li-name-alias{font-size:var(--fs-2)}.__document .aside .aside-li .aside-li-name .aside-li-name-aliass{font-size:var(--fs-1)}.__document .md{position:relative}.__document .use .use-component{padding:10px;display:flex;justify-content:center;align-items:center;height:300px;background-color:var(--bg-use-component-cor)}.__document .set-code .set-code-buts{display:flex;align-items:center}.__document .form-item.error{background-color:var(--te-test-err-cor)}.__document .compo .compo-top .compo-top-name{padding:10px;font-size:var(--fs-4)}.__document .compo .compo-top .compo-top-name .compo-top-name-li{font-size:var(--fs-2)}.__document .compo .compo-top .compo-top-info{padding:10px;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-info .compo-top-athor,.__document .compo .compo-top .compo-top-info .compo-top-date{flex:1;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-descriptions{padding:0 10px;font-size:var(--fs-2)}.__document .compo .compo-li h4{margin:10px 0 0;padding:10px}.__document .compo .compo-li .compo-talbe{width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body{border:1px solid var(--bor-cor);width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body td,.__document .compo .compo-li .compo-talbe .compo-talbe-body th{padding:5px 10px;border-bottom:1px solid var(--bor-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body th{background-color:var(--bg-table-th-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body td{background-color:var(--bg-table-td-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body tr:last-child td{border-bottom:0}.__document .compo .compo-li .compo-talbe .compo-talbe-body .compo-talbe-zw{width:100%;text-align:center;padding:10px}.__document .compo .compo-md{padding:10px;background-color:var(--bg-md-cor)}.__document .compo .compo-use{padding:10px;background-color:var(--bg-use-cor)}.__document .main .main-but{text-align:right;display:flex;flex-direction:row;align-items:center}.__document .test.error .test-top{background-color:var(--bg-test-err-cor)}.__document .test.proposal .test-top{background-color:var(--bg-test-pro-cor)}.__document .test.error-proposal .test-top{background-color:var(--bg-test-err-pro-cor)}.__document .test .test-top{padding:5px;background-color:var(--bg-test-cor)}.__document .test .test-top .test-top-error{color:var(--te-test-err-cor)}.__document .test .test-top .test-top-proposal{color:var(--te-test-pro-cor)}.__document .test .test-div .test-body{padding:5px;background-color:var(--bg-test-body)}.__document .code{padding:0}.__document .code .code-top .code-top-but,.__document .code .code-top .code-top-but .top-but-files{display:flex;flex-direction:row;align-items:center}.__document .code .code-highlightjs{padding:0}.__document .code .code-highlightjs .hljs{background-color:var(--bg-code-highlig)}.__document .box-url{position:relative}.__document .box-url:hover .box-url-box{display:block}.__document .box-url .box-url-box{position:fixed;top:25px;display:none;background-color:var(--bg-box-cor);font-size:var(--fs-1);color:var(--text-cor);z-index:100000}.__document .box-url .box-url-box .box-div-li{height:20px;line-height:20px;display:flex;flex-direction:row;align-items:center}.__document .box-url .box-url-box .box-div-li .box-div-li-span{white-space:nowrap;padding:5px 10px}.__document .__document-index{width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:row}.__document .__document-index .index-aside{width:250px;position:relative;z-index:100}.__document .__document-index .index-aside .index-aside-div{height:100%;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-index .index-body{flex:1;position:relative;background-color:var(--bg-index-cor)}.__document .__document-index .index-body .index-div{padding:20px;position:absolute;top:0;right:0;left:0;bottom:0;overflow-y:auto}.__document .__document-tests{padding:10px;height:100%;position:relative}.__document .__document-tests .tests-top .but-div.on{background-color:var(--bg-aside-on-cor)}.__document .__document-develop,.__document .__document-single{padding:10px;height:100%;position:relative}.__document .__document-single .single-top .single-top-li{display:flex;flex-direction:row;align-items:center}.__document .__document-single .single-top .single-top-li .single-top-li-span{padding:5px 10px}.__document .__document-compon{padding:10px;height:100%;position:relative}.__document .__document-compon .__document-compon-body.choice{padding-left:30px}.__document .__document-compon .__document-compon-choice{position:absolute;top:0;bottom:0;left:0;z-index:100;display:flex;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but{cursor:pointer}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.form-select .form-select-box{position:absolute;z-index:100;background-color:#fff;text-align:center}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
2
2
  Theme: StackOverflow Light
3
3
  Description: Light theme as used on stackoverflow.com
4
4
  Author: stackoverflow.com
@@ -10,4 +10,4 @@
10
10
  Updated for @stackoverflow/stacks v0.64.0
11
11
  Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less
12
12
  Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less
13
- */.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#b75501}.hljs-selector-class{color:#015692}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-literal,.hljs-title{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.form-select .form-select-box{position:absolute;z-index:100;background-color:#fff;text-align:center}.form-select{position:relative}.form-select .form-select-box{position:absolute;background-color:#fff;text-align:center}.form-select .form-select-box .form-select-list-div{border:1px solid #fff}.form-select .form-select-box .form-select-list-div .form-select-list-li{padding:10px;border-bottom:1px solid #eee}.form-select .form-select-box .form-select-list-div .form-select-list-li:last-child{border:0}.form-select .form-select-box .form-select-list-div .form-select-list-li.active{color:#0051ff}
13
+ */.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#b75501}.hljs-selector-class{color:#015692}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-literal,.hljs-title{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.form-select{position:relative}.form-select .form-select-box{position:absolute;background-color:#fff;text-align:center}.form-select .form-select-box .form-select-list-div{border:1px solid #fff}.form-select .form-select-box .form-select-list-div .form-select-list-li{padding:10px;border-bottom:1px solid #eee}.form-select .form-select-box .form-select-list-div .form-select-list-li:last-child{border:0}.form-select .form-select-box .form-select-list-div .form-select-list-li.active{color:#0051ff}
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-3",
4
+ "version": "0.0.3-5",
5
5
  "type": "module",
6
6
  "description ": "vue 组件注释生成文档",
7
7
  "author": "fangzhongya ",