@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,105 +1,115 @@
1
- import { defineComponent as S, watch as B, ref as n, createElementBlock as d, openBlock as u, createElementVNode as t, withDirectives as D, toDisplayString as f, createVNode as p, withCtx as m, withModifiers as h, normalizeClass as _, Fragment as T, renderList as $, createBlock as j, vShow as E } from "vue";
2
- import k from "../boxurl/index.vue.js";
3
- import { toSingle as L } from "../../router/index.js";
4
- import N from "./highlight.vue.js";
1
+ import { defineComponent as j, watch as B, ref as s, createElementBlock as d, openBlock as u, createElementVNode as l, withDirectives as $, toDisplayString as f, createVNode as m, withCtx as p, withModifiers as _, normalizeClass as k, Fragment as E, renderList as F, createBlock as L, vShow as N } from "vue";
2
+ import h from "../boxurl/index.vue.js";
3
+ import { toSingle as O } from "../../router/index.js";
4
+ import U from "./highlight.vue.js";
5
5
  import { copyCode as g } from "../../utils/index.js";
6
6
  import { getTestImportUrl as V, getLocalTextArr as z } from "../../utils/glob.js";
7
+ import { exportStringToFile as C } from "../../utils/util.js";
8
+ import { getUrlCatalogueObj as x } from "@fangzhongya/utils/urls/getUrlCatalogueObj";
7
9
  import { useRouter as A } from "vue-router";
8
- const F = { class: "code" }, H = { class: "code-top" }, I = { class: "code-top-but" }, M = { class: "top-but-files" }, O = ["onClick"], R = { class: "code-highlightjs" }, Y = /* @__PURE__ */ S({
10
+ const H = { class: "code" }, I = { class: "code-top" }, M = { class: "code-top-but" }, R = { class: "top-but-files" }, q = ["onClick"], G = { class: "code-highlightjs" }, le = /* @__PURE__ */ j({
9
11
  __name: "index",
10
12
  props: {
11
13
  text: String,
12
14
  value: Object
13
15
  },
14
- setup(C) {
15
- const x = A(), e = C;
16
+ setup(w) {
17
+ const b = A(), e = w;
16
18
  B(
17
19
  () => e.text,
18
20
  () => {
19
21
  v();
20
22
  }
21
23
  );
22
- const c = n([]), o = n(), i = n(!1);
23
- function w() {
24
- o.value?.raw ? g(o.value.raw) : g(e.text);
24
+ const c = s([]), t = s(), n = s(!1);
25
+ function y() {
26
+ t.value?.raw ? g(t.value.raw) : g(e.text);
27
+ }
28
+ function S() {
29
+ if (t.value?.raw) {
30
+ const o = x(t.value?.key), i = e.value?.name + "_" + o.name + "." + o.suffix;
31
+ C(t.value.raw, i);
32
+ } else {
33
+ const o = x(e.value?.key), i = e.value?.name + "_" + o.name + "." + o.suffix;
34
+ C(e.text, i);
35
+ }
25
36
  }
26
- function b() {
27
- i.value = !i.value;
37
+ function D() {
38
+ n.value = !n.value;
28
39
  }
29
- function y() {
30
- L(x, e.value);
40
+ function T() {
41
+ O(b, e.value);
31
42
  }
32
- function r(a) {
33
- i.value = !0, o.value = a;
43
+ function r(o) {
44
+ n.value = !0, t.value = o;
34
45
  }
35
46
  function v() {
36
- o.value = void 0, i.value = !1, e.text && V(
37
- e.value?.key,
38
- e.text,
39
- "vue",
40
- e.value?.dir,
41
- e.value?.url,
42
- e.value?.comprops
43
- ).then((a) => {
44
- z(a).then((s) => {
45
- c.value = s.filter((l) => l.raw);
46
- });
47
- });
47
+ t.value = void 0, n.value = !1, e.text && V(e.value, e.text, "vue").then(
48
+ (o) => {
49
+ z(o).then((i) => {
50
+ c.value = i.filter((a) => a.raw);
51
+ });
52
+ }
53
+ );
48
54
  }
49
- return v(), (a, s) => (u(), d("div", F, [
50
- t("div", H, [
51
- t("div", I, [
52
- t("div", {
55
+ return v(), (o, i) => (u(), d("div", H, [
56
+ l("div", I, [
57
+ l("div", M, [
58
+ l("div", {
53
59
  class: "but-div",
54
- onClick: y
60
+ onClick: T
55
61
  }, "go"),
56
- t("div", {
62
+ l("div", {
57
63
  class: "but-div",
58
- onClick: w
64
+ onClick: y
59
65
  }, "复制"),
60
- t("div", {
66
+ l("div", {
67
+ class: "but-div",
68
+ onClick: S
69
+ }, "下载"),
70
+ l("div", {
61
71
  class: "but-div",
62
- onClick: b
63
- }, f(i.value ? "隐藏" : "显示"), 1),
64
- t("div", M, [
65
- p(k, {
72
+ onClick: D
73
+ }, f(n.value ? "隐藏" : "显示"), 1),
74
+ l("div", R, [
75
+ m(h, {
66
76
  value: e.value
67
77
  }, {
68
- default: m(() => [
69
- t("div", {
70
- class: _(["but-div", {
71
- on: !(o.value && o.value.value)
78
+ default: p(() => [
79
+ l("div", {
80
+ class: k(["but-div", {
81
+ on: !(t.value && t.value.value)
72
82
  }]),
73
- onClick: s[0] || (s[0] = h((l) => r(), ["stop"]))
83
+ onClick: i[0] || (i[0] = _((a) => r(), ["stop"]))
74
84
  }, " index.vue ", 2)
75
85
  ]),
76
86
  _: 1
77
87
  }, 8, ["value"]),
78
- (u(!0), d(T, null, $(c.value, (l, U) => (u(), j(k, { value: l }, {
79
- default: m(() => [
80
- t("div", {
81
- class: _(["but-div", {
82
- on: l.key == o.value?.key
88
+ (u(!0), d(E, null, F(c.value, (a, J) => (u(), L(h, { value: a }, {
89
+ default: p(() => [
90
+ l("div", {
91
+ class: k(["but-div", {
92
+ on: a.key == t.value?.key
83
93
  }]),
84
- onClick: h((q) => r(l), ["stop"])
85
- }, f(l.value), 11, O)
94
+ onClick: _((K) => r(a), ["stop"])
95
+ }, f(a.value), 11, q)
86
96
  ]),
87
97
  _: 2
88
98
  }, 1032, ["value"]))), 256))
89
99
  ])
90
100
  ])
91
101
  ]),
92
- D(t("div", R, [
93
- p(N, {
102
+ $(l("div", G, [
103
+ m(U, {
94
104
  language: "html",
95
- code: o.value?.raw || e.text
105
+ code: t.value?.raw || e.text
96
106
  }, null, 8, ["code"])
97
107
  ], 512), [
98
- [E, i.value]
108
+ [N, n.value]
99
109
  ])
100
110
  ]));
101
111
  }
102
112
  });
103
113
  export {
104
- Y as default
114
+ le as default
105
115
  };
@@ -1 +1 @@
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
+ "use strict";const e=require("vue"),d=require("../use/index.cjs"),_=require("./props.vue.cjs"),k=require("../../config.cjs"),B=require("../md/index.vue.cjs");require("./index.cjs");const i=require("../../utils/glob.cjs"),f={class:"compo"},g={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,istop:Boolean},setup(m){const t=m,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&&(i.getLocalTextComponents(t.value?.key).then(n=>{r.value=n}),o.value=i.getKeyMds(t.value?.key)||[])}return l(),(n,s)=>(e.openBlock(),e.createElementBlock("div",f,[o.value&&o.value.length?(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",{onClick:s[0]||(s[0]=u=>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,u=>(e.openBlock(),e.createBlock(B,{value:u},null,8,["value"]))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createVNode(_,{istop:t.istop,onChange:v,value:r.value},null,8,["istop","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,4 +1,4 @@
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";
1
+ import { defineComponent as g, ref as l, reactive as h, watch as y, createElementBlock as o, openBlock as t, createCommentVNode as m, createVNode as v, createElementVNode as C, Fragment as x, renderList as B, createBlock as N, unref as d } from "vue";
2
2
  import V from "../use/index.js";
3
3
  import $ from "./props.vue.js";
4
4
  import { getConfig as E } from "../../config.js";
@@ -17,43 +17,45 @@ const w = { class: "compo" }, D = {
17
17
  }, G = /* @__PURE__ */ g({
18
18
  __name: "index",
19
19
  props: {
20
- value: Object
20
+ value: Object,
21
+ istop: Boolean
21
22
  },
22
23
  setup(f) {
23
- const t = f, _ = E("useparam"), r = l(""), s = h({
24
+ const e = f, _ = E("useparam"), r = l(""), s = h({
24
25
  md: !0
25
26
  }), a = l([]), u = l();
26
27
  function k(n) {
27
28
  u.value = n;
28
29
  }
29
30
  y(
30
- () => t.value,
31
+ () => e.value,
31
32
  () => {
32
33
  c();
33
34
  }
34
35
  );
35
36
  function c() {
36
- t.value?.key && (b(t.value?.key).then((n) => {
37
+ e.value?.key && (b(e.value?.key).then((n) => {
37
38
  r.value = n;
38
- }), a.value = j(t.value?.key) || []);
39
+ }), a.value = j(e.value?.key) || []);
39
40
  }
40
- return c(), (n, i) => (e(), o("div", w, [
41
- a.value && a.value.length ? (e(), o("div", D, [
41
+ return c(), (n, i) => (t(), o("div", w, [
42
+ a.value && a.value.length ? (t(), o("div", D, [
42
43
  C("div", {
43
- onClick: i[0] || (i[0] = (v) => s.md = !s.md),
44
+ onClick: i[0] || (i[0] = (p) => s.md = !s.md),
44
45
  class: "compo-md-name"
45
46
  }, "说明文档"),
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))
47
+ s.md ? (t(), o("div", F, [
48
+ (t(!0), o(x, null, B(a.value, (p) => (t(), N(L, { value: p }, null, 8, ["value"]))), 256))
48
49
  ])) : m("", !0)
49
50
  ])) : m("", !0),
50
- p($, {
51
+ v($, {
52
+ istop: e.istop,
51
53
  onChange: k,
52
54
  value: r.value
53
- }, null, 8, ["value"]),
54
- d(_) ? (e(), o("div", K, [
55
- p(d(V), {
56
- value: t.value,
55
+ }, null, 8, ["istop", "value"]),
56
+ d(_) ? (t(), o("div", K, [
57
+ v(d(V), {
58
+ value: e.value,
57
59
  param: u.value
58
60
  }, null, 8, ["value", "param"])
59
61
  ])) : m("", !0)
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),r=require("./top.cjs"),a=require("./index.cjs"),l=require("../../utils/glob.cjs"),i={class:"info-top"},p=e.defineComponent({__name:"info-top",props:{value:{type:Object}},setup(u){const t=u,o=e.ref([]);function n(){t.value?.key&&l.getLocalTextComponents(t.value?.key).then(c=>{const s=a.getNotesText(c);o.value=s.titles})}return e.watch(()=>t.value,()=>{n()}),n(),(c,s)=>(e.openBlock(),e.createElementBlock("div",i,[e.createVNode(e.unref(r.default),{value:o.value},null,8,["value"])]))}});module.exports=p;
@@ -0,0 +1,32 @@
1
+ import { defineComponent as c, ref as l, watch as p, createElementBlock as s, openBlock as u, createVNode as i, unref as f } from "vue";
2
+ import m from "./top.js";
3
+ import { getNotesText as v } from "./index.js";
4
+ import { getLocalTextComponents as _ } from "../../utils/glob.js";
5
+ const d = { class: "info-top" }, y = /* @__PURE__ */ c({
6
+ __name: "info-top",
7
+ props: {
8
+ value: {
9
+ type: Object
10
+ }
11
+ },
12
+ setup(r) {
13
+ const e = r, t = l([]);
14
+ function o() {
15
+ e.value?.key && _(e.value?.key).then((n) => {
16
+ const a = v(n);
17
+ t.value = a.titles;
18
+ });
19
+ }
20
+ return p(
21
+ () => e.value,
22
+ () => {
23
+ o();
24
+ }
25
+ ), o(), (n, a) => (u(), s("div", d, [
26
+ i(f(m), { value: t.value }, null, 8, ["value"])
27
+ ]));
28
+ }
29
+ });
30
+ export {
31
+ y as default
32
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./info-top.vue.cjs");module.exports=e;
@@ -0,0 +1,4 @@
1
+ import f from "./info-top.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),f=require("./top.cjs"),n=require("./ftable.vue.cjs"),l=require("./index.cjs"),N={class:"compo"},V={class:"compo-top"},x={class:"compo-li compo-props"},B={class:"compo-li compo-emits"},C={class:"compo-li compo-expose"},E={class:"compo-li compo-slot"},g=e.defineComponent({__name:"props",props:{value:String},emits:["change"],setup(d,{emit:k}){const r=d,_=k,u=e.ref([]),t=e.reactive({props:!0,expose:!0,emits:!0,slot:!0,top:!0}),p=e.ref([]),i=e.ref([]),a=e.ref([]),m=e.ref([]);function v(){if(r.value){const s=l.getNotesText(r.value);u.value=s.titles,p.value=s.propss,m.value=s.slots,i.value=s.emitss,a.value=s.exposes,_("change",s)}}return e.watch(()=>r.value,()=>{v()}),v(),(s,o)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("div",V,[t.top?(e.openBlock(),e.createBlock(e.unref(f.default),{key:0,value:u.value},null,8,["value"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",x,[e.createElementVNode("h4",{onClick:o[0]||(o[0]=c=>t.props=!t.props)}," 组件属性 "),t.props?(e.openBlock(),e.createBlock(n,{key:0,list:e.unref(l.tprops),value:p.value},null,8,["list","value"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",B,[e.createElementVNode("h4",{onClick:o[1]||(o[1]=c=>t.emits=!t.emits)}," 组件事件 "),t.emits?(e.openBlock(),e.createBlock(n,{key:0,list:e.unref(l.temits),value:i.value},null,8,["list","value"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",C,[e.createElementVNode("h4",{onClick:o[2]||(o[2]=c=>t.expose=!t.expose)}," 组件方法 "),t.expose?(e.openBlock(),e.createBlock(n,{key:0,list:e.unref(l.texpose),value:a.value},null,8,["list","value"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",E,[e.createElementVNode("h4",{onClick:o[3]||(o[3]=c=>t.slot=!t.slot)},"组件插槽"),t.slot?(e.openBlock(),e.createBlock(n,{key:0,list:e.unref(l.tslot),value:m.value},null,8,["list","value"])):e.createCommentVNode("",!0)])]))}});module.exports=g;
1
+ "use strict";const e=require("vue"),B=require("./top.cjs"),n=require("./ftable.vue.cjs"),l=require("./index.cjs"),N={class:"compo"},_={key:0,class:"compo-top"},V={class:"compo-li compo-props"},x={class:"compo-li compo-emits"},C={class:"compo-li compo-expose"},E={class:"compo-li compo-slot"},y=e.defineComponent({__name:"props",props:{value:String,istop:Boolean},emits:["change"],setup(u,{emit:k}){const c=u,f=k,i=e.ref([]),t=e.reactive({props:!0,expose:!0,emits:!0,slot:!0,top:!0}),p=e.ref([]),a=e.ref([]),m=e.ref([]),v=e.ref([]);function d(){if(c.value){const s=l.getNotesText(c.value);i.value=s.titles,p.value=s.propss,v.value=s.slots,a.value=s.emitss,m.value=s.exposes,f("change",s)}}return e.watch(()=>c.value,()=>{d()}),d(),(s,o)=>(e.openBlock(),e.createElementBlock("div",N,[u.istop?(e.openBlock(),e.createElementBlock("div",_,[t.top?(e.openBlock(),e.createBlock(e.unref(B.default),{key:0,value:i.value},null,8,["value"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",V,[e.createElementVNode("h4",{onClick:o[0]||(o[0]=r=>t.props=!t.props)},"组件属性"),t.props?(e.openBlock(),e.createBlock(n,{key:0,list:e.unref(l.tprops),value:p.value},null,8,["list","value"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",x,[e.createElementVNode("h4",{onClick:o[1]||(o[1]=r=>t.emits=!t.emits)},"组件事件"),t.emits?(e.openBlock(),e.createBlock(n,{key:0,list:e.unref(l.temits),value:a.value},null,8,["list","value"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",C,[e.createElementVNode("h4",{onClick:o[2]||(o[2]=r=>t.expose=!t.expose)},"组件方法"),t.expose?(e.openBlock(),e.createBlock(n,{key:0,list:e.unref(l.texpose),value:m.value},null,8,["list","value"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",E,[e.createElementVNode("h4",{onClick:o[3]||(o[3]=r=>t.slot=!t.slot)},"组件插槽"),t.slot?(e.openBlock(),e.createBlock(n,{key:0,list:e.unref(l.tslot),value:v.value},null,8,["list","value"])):e.createCommentVNode("",!0)])]))}});module.exports=y;
@@ -1,78 +1,82 @@
1
- import { defineComponent as g, ref as i, reactive as y, watch as $, createElementBlock as B, openBlock as l, createElementVNode as t, createBlock as p, createCommentVNode as n, unref as u } from "vue";
1
+ import { defineComponent as g, ref as p, reactive as $, watch as B, createElementBlock as h, openBlock as l, createCommentVNode as i, createElementVNode as o, createBlock as n, unref as u } from "vue";
2
2
  import N from "./top.js";
3
3
  import r from "./ftable.vue.js";
4
4
  import { tprops as E, temits as T, texpose as V, tslot as b, getNotesText as j } from "./index.js";
5
- const w = { class: "compo" }, D = { class: "compo-top" }, S = { class: "compo-li compo-props" }, q = { class: "compo-li compo-emits" }, z = { class: "compo-li compo-expose" }, A = { class: "compo-li compo-slot" }, J = /* @__PURE__ */ g({
5
+ const w = { class: "compo" }, D = {
6
+ key: 0,
7
+ class: "compo-top"
8
+ }, S = { class: "compo-li compo-props" }, q = { class: "compo-li compo-emits" }, z = { class: "compo-li compo-expose" }, A = { class: "compo-li compo-slot" }, J = /* @__PURE__ */ g({
6
9
  __name: "props",
7
10
  props: {
8
- value: String
11
+ value: String,
12
+ istop: Boolean
9
13
  },
10
14
  emits: ["change"],
11
- setup(x, { emit: h }) {
12
- const v = x, C = h, c = i([]), e = y({
15
+ setup(c, { emit: y }) {
16
+ const v = c, C = y, m = p([]), e = $({
13
17
  props: !0,
14
18
  expose: !0,
15
19
  emits: !0,
16
20
  slot: !0,
17
21
  top: !0
18
- }), m = i([]), d = i([]), f = i([]), k = i([]);
22
+ }), d = p([]), k = p([]), f = p([]), x = p([]);
19
23
  function _() {
20
24
  if (v.value) {
21
25
  const s = j(v.value);
22
- c.value = s.titles, m.value = s.propss, k.value = s.slots, d.value = s.emitss, f.value = s.exposes, C("change", s);
26
+ m.value = s.titles, d.value = s.propss, x.value = s.slots, k.value = s.emitss, f.value = s.exposes, C("change", s);
23
27
  }
24
28
  }
25
- return $(
29
+ return B(
26
30
  () => v.value,
27
31
  () => {
28
32
  _();
29
33
  }
30
- ), _(), (s, o) => (l(), B("div", w, [
31
- t("div", D, [
32
- e.top ? (l(), p(u(N), {
34
+ ), _(), (s, t) => (l(), h("div", w, [
35
+ c.istop ? (l(), h("div", D, [
36
+ e.top ? (l(), n(u(N), {
33
37
  key: 0,
34
- value: c.value
35
- }, null, 8, ["value"])) : n("", !0)
36
- ]),
37
- t("div", S, [
38
- t("h4", {
39
- onClick: o[0] || (o[0] = (a) => e.props = !e.props)
40
- }, " 组件属性 "),
41
- e.props ? (l(), p(r, {
38
+ value: m.value
39
+ }, null, 8, ["value"])) : i("", !0)
40
+ ])) : i("", !0),
41
+ o("div", S, [
42
+ o("h4", {
43
+ onClick: t[0] || (t[0] = (a) => e.props = !e.props)
44
+ }, "组件属性"),
45
+ e.props ? (l(), n(r, {
42
46
  key: 0,
43
47
  list: u(E),
44
- value: m.value
45
- }, null, 8, ["list", "value"])) : n("", !0)
48
+ value: d.value
49
+ }, null, 8, ["list", "value"])) : i("", !0)
46
50
  ]),
47
- t("div", q, [
48
- t("h4", {
49
- onClick: o[1] || (o[1] = (a) => e.emits = !e.emits)
50
- }, " 组件事件 "),
51
- e.emits ? (l(), p(r, {
51
+ o("div", q, [
52
+ o("h4", {
53
+ onClick: t[1] || (t[1] = (a) => e.emits = !e.emits)
54
+ }, "组件事件"),
55
+ e.emits ? (l(), n(r, {
52
56
  key: 0,
53
57
  list: u(T),
54
- value: d.value
55
- }, null, 8, ["list", "value"])) : n("", !0)
58
+ value: k.value
59
+ }, null, 8, ["list", "value"])) : i("", !0)
56
60
  ]),
57
- t("div", z, [
58
- t("h4", {
59
- onClick: o[2] || (o[2] = (a) => e.expose = !e.expose)
60
- }, " 组件方法 "),
61
- e.expose ? (l(), p(r, {
61
+ o("div", z, [
62
+ o("h4", {
63
+ onClick: t[2] || (t[2] = (a) => e.expose = !e.expose)
64
+ }, "组件方法"),
65
+ e.expose ? (l(), n(r, {
62
66
  key: 0,
63
67
  list: u(V),
64
68
  value: f.value
65
- }, null, 8, ["list", "value"])) : n("", !0)
69
+ }, null, 8, ["list", "value"])) : i("", !0)
66
70
  ]),
67
- t("div", A, [
68
- t("h4", {
69
- onClick: o[3] || (o[3] = (a) => e.slot = !e.slot)
71
+ o("div", A, [
72
+ o("h4", {
73
+ onClick: t[3] || (t[3] = (a) => e.slot = !e.slot)
70
74
  }, "组件插槽"),
71
- e.slot ? (l(), p(r, {
75
+ e.slot ? (l(), n(r, {
72
76
  key: 0,
73
77
  list: u(b),
74
- value: k.value
75
- }, null, 8, ["list", "value"])) : n("", !0)
78
+ value: x.value
79
+ }, null, 8, ["list", "value"])) : i("", !0)
76
80
  ])
77
81
  ]));
78
82
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("vue");require("@fangzhongya/utils/html/htmlEscape");function f(u,e,d){let s=[],m=[],i=[];const p=t=>t,n=()=>{i.length>0&&(s.push(e("div",{class:"compo-top-list"},i)),i=[])},a=()=>{s.length>0&&(m.push(e("div",{class:"compo-top-division"},s)),s=[])};return u?.forEach(t=>{const l=[];let o=!1;if(t.date&&(o=!0,l.push(e("div",{class:"compo-top-date"},[e("span",{},"更新时间:"),e("span",{},[p(t.date.name+" "+t.date.description)])]))),t.author&&(o=!0,l.push(e("div",{class:"compo-top-author"},[e("span",{},"作者:"),e("span",{},[p(t.author.name+" "+t.author.description)])]))),t.title&&(t.title.type||t.title.name||t.title.description)){n(),o&&a();let r=t.title.type||"div";s.push(e(r,{class:"compo-top-title"},[e("span",{},[p(t.title.name+" "+t.title.description)])]))}if(o&&(i.length>0&&(n(),a()),s.push(e("div",{class:"compo-top-info"},l))),t.text){let r=t.text.type||"div";i.push(e(r,{class:"compo-top-text"},[e("span",{},[p(t.text.name+" "+t.text.description)])]))}}),n(),a(),m}const v=c.defineComponent({props:{value:Array},render(u,e,d){const s=f(d.value,c.h);return c.h("div",{class:"compo-top"},s)}});exports.default=v;exports.getTopDom=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue");require("@fangzhongya/utils/html/htmlEscape");function v(m,e,u){let i=[],f=[],l=[];const n=t=>t,a=()=>{l.length>0&&(i.push(e("div",{class:"compo-top-list"},l)),l=[])},c=()=>{i.length>0&&(f.push(e("div",{class:"compo-top-division"},i)),i=[])};return m?.forEach(t=>{const r=[];let o=!1;if(t.date&&(o=!0,r.push(e("div",{class:"compo-top-date"},[e("span",{},"更新时间:"),e("span",{},[n(t.date.name+" "+t.date.description)])]))),t.author&&(o=!0,r.push(e("div",{class:"compo-top-author"},[e("span",{},"作者:"),e("span",{},[n(t.author.name+" "+t.author.description)])]))),t.title&&(t.title.type||t.title.name||t.title.description)){a(),o&&c();let s=(t.title.type||"div").split("."),p=s[1]||"";s[0]=="html"?i.push(e("div",{class:"compo-top-title "+p,innerHTML:t.title.name+" "+t.title.description})):i.push(e(s[0],{class:"compo-top-title "+p},[e("span",{},[n(t.title.name+" "+t.title.description)])]))}if(o&&(l.length>0&&(a(),c()),i.push(e("div",{class:"compo-top-info"},r))),t.html){let s=(t.html.type||"div").split("."),p=s[1]||"";l.push(e(s[0],{class:"compo-top-html "+p,innerHTML:t.html.name+" "+t.html.description}))}["text"].forEach(s=>{if(t[s]){let p=(t[s].type||"div").split("."),h=p[1]||"";p[0]=="html"?l.push(e("div",{class:"compo-top-"+s+" "+h,innerHTML:t[s].name+" "+t[s].description})):l.push(e(p[0],{class:"compo-top-"+s+" "+h},[e("span",{},[n(t[s].name+" "+t[s].description)])]))}})}),a(),c(),f}const y=d.defineComponent({props:{value:Array},render(m,e,u){const i=v(u.value,d.h);return d.h("div",{class:"compo-top"},i)}});exports.default=y;exports.getTopDom=v;
@@ -1,32 +1,32 @@
1
- import { defineComponent as f, h as u } from "vue";
1
+ import { defineComponent as y, h } from "vue";
2
2
  import "@fangzhongya/utils/html/htmlEscape";
3
- function v(r, e, d) {
4
- let s = [], m = [], i = [];
5
- const p = (t) => t, n = () => {
6
- i.length > 0 && (s.push(
3
+ function v(m, e, d) {
4
+ let i = [], u = [], l = [];
5
+ const n = (t) => t, a = () => {
6
+ l.length > 0 && (i.push(
7
7
  e(
8
8
  "div",
9
9
  {
10
10
  class: "compo-top-list"
11
11
  },
12
- i
12
+ l
13
13
  )
14
- ), i = []);
15
- }, a = () => {
16
- s.length > 0 && (m.push(
14
+ ), l = []);
15
+ }, c = () => {
16
+ i.length > 0 && (u.push(
17
17
  e(
18
18
  "div",
19
19
  {
20
20
  class: "compo-top-division"
21
21
  },
22
- s
22
+ i
23
23
  )
24
- ), s = []);
24
+ ), i = []);
25
25
  };
26
- return r?.forEach((t) => {
27
- const l = [];
26
+ return m?.forEach((t) => {
27
+ const r = [];
28
28
  let o = !1;
29
- if (t.date && (o = !0, l.push(
29
+ if (t.date && (o = !0, r.push(
30
30
  e(
31
31
  "div",
32
32
  {
@@ -35,13 +35,13 @@ function v(r, e, d) {
35
35
  [
36
36
  e("span", {}, "更新时间:"),
37
37
  e("span", {}, [
38
- p(
38
+ n(
39
39
  t.date.name + " " + t.date.description
40
40
  )
41
41
  ])
42
42
  ]
43
43
  )
44
- )), t.author && (o = !0, l.push(
44
+ )), t.author && (o = !0, r.push(
45
45
  e(
46
46
  "div",
47
47
  {
@@ -50,24 +50,29 @@ function v(r, e, d) {
50
50
  [
51
51
  e("span", {}, "作者:"),
52
52
  e("span", {}, [
53
- p(
53
+ n(
54
54
  t.author.name + " " + t.author.description
55
55
  )
56
56
  ])
57
57
  ]
58
58
  )
59
59
  )), t.title && (t.title.type || t.title.name || t.title.description)) {
60
- n(), o && a();
61
- let c = t.title.type || "div";
62
- s.push(
60
+ a(), o && c();
61
+ let s = (t.title.type || "div").split("."), p = s[1] || "";
62
+ s[0] == "html" ? i.push(
63
+ e("div", {
64
+ class: "compo-top-title " + p,
65
+ innerHTML: t.title.name + " " + t.title.description
66
+ })
67
+ ) : i.push(
63
68
  e(
64
- c,
69
+ s[0],
65
70
  {
66
- class: "compo-top-title"
71
+ class: "compo-top-title " + p
67
72
  },
68
73
  [
69
74
  e("span", {}, [
70
- p(
75
+ n(
71
76
  t.title.name + " " + t.title.description
72
77
  )
73
78
  ])
@@ -75,53 +80,69 @@ function v(r, e, d) {
75
80
  )
76
81
  );
77
82
  }
78
- if (o && (i.length > 0 && (n(), a()), s.push(
83
+ if (o && (l.length > 0 && (a(), c()), i.push(
79
84
  e(
80
85
  "div",
81
86
  {
82
87
  class: "compo-top-info"
83
88
  },
84
- l
89
+ r
85
90
  )
86
- )), t.text) {
87
- let c = t.text.type || "div";
88
- i.push(
89
- e(
90
- c,
91
- {
92
- class: "compo-top-text"
93
- },
94
- [
95
- e("span", {}, [
96
- p(
97
- t.text.name + " " + t.text.description
98
- )
99
- ])
100
- ]
101
- )
91
+ )), t.html) {
92
+ let s = (t.html.type || "div").split("."), p = s[1] || "";
93
+ l.push(
94
+ e(s[0], {
95
+ class: "compo-top-html " + p,
96
+ innerHTML: t.html.name + " " + t.html.description
97
+ })
102
98
  );
103
99
  }
104
- }), n(), a(), m;
100
+ ["text"].forEach((s) => {
101
+ if (t[s]) {
102
+ let p = (t[s].type || "div").split("."), f = p[1] || "";
103
+ p[0] == "html" ? l.push(
104
+ e("div", {
105
+ class: "compo-top-" + s + " " + f,
106
+ innerHTML: t[s].name + " " + t[s].description
107
+ })
108
+ ) : l.push(
109
+ e(
110
+ p[0],
111
+ {
112
+ class: "compo-top-" + s + " " + f
113
+ },
114
+ [
115
+ e("span", {}, [
116
+ n(
117
+ t[s].name + " " + t[s].description
118
+ )
119
+ ])
120
+ ]
121
+ )
122
+ );
123
+ }
124
+ });
125
+ }), a(), c(), u;
105
126
  }
106
- const g = f({
127
+ const H = y({
107
128
  /**
108
129
  * @props {Stinrg} value 插入数据
109
130
  */
110
131
  props: {
111
132
  value: Array
112
133
  },
113
- render(r, e, d) {
114
- const s = v(d.value, u);
115
- return u(
134
+ render(m, e, d) {
135
+ const i = v(d.value, h);
136
+ return h(
116
137
  "div",
117
138
  {
118
139
  class: "compo-top"
119
140
  },
120
- s
141
+ i
121
142
  );
122
143
  }
123
144
  });
124
145
  export {
125
- g as default,
146
+ H as default,
126
147
  v as getTopDom
127
148
  };