@fangzhongya/vue-archive 0.0.45 → 0.0.47

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 (29) hide show
  1. package/dist/node/index.cjs +184 -112
  2. package/dist/node/index.js +184 -112
  3. package/dist/packages/components/compo/index.cjs +1 -1
  4. package/dist/packages/components/compo/index.js +98 -85
  5. package/dist/packages/components/compo/index.vue.cjs +1 -1
  6. package/dist/packages/components/compo/index.vue.js +18 -16
  7. package/dist/packages/components/compo/info-top.vue.cjs +1 -0
  8. package/dist/packages/components/compo/info-top.vue.js +32 -0
  9. package/dist/packages/components/compo/info-top.vue2.cjs +1 -0
  10. package/dist/packages/components/compo/info-top.vue2.js +4 -0
  11. package/dist/packages/components/compo/props.vue.cjs +1 -1
  12. package/dist/packages/components/compo/props.vue.js +44 -40
  13. package/dist/packages/components/compo/top.cjs +1 -1
  14. package/dist/packages/components/compo/top.js +69 -48
  15. package/dist/packages/components/main/index.vue.cjs +1 -1
  16. package/dist/packages/components/main/index.vue.js +30 -25
  17. package/dist/packages/components/test/index.cjs +1 -1
  18. package/dist/packages/components/test/index.js +24 -22
  19. package/dist/packages/components/test/top.cjs +1 -1
  20. package/dist/packages/components/test/top.js +69 -84
  21. package/dist/packages/components/use/code.cjs +6 -6
  22. package/dist/packages/components/use/code.js +74 -66
  23. package/dist/packages/components/use/retrie/array/index.vue.cjs +2 -2
  24. package/dist/packages/components/use/retrie/array/index.vue.js +16 -16
  25. package/dist/packages/components/use/retrie/object/index.vue.cjs +2 -2
  26. package/dist/packages/components/use/retrie/object/index.vue.js +17 -17
  27. package/dist/packages/page/develop/index.vue2.cjs +1 -1
  28. package/dist/packages/page/develop/index.vue2.js +2 -1
  29. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { getTextNotes as T } from "../../utils/index.js";
1
+ import { getTextNotes as k } from "../../utils/index.js";
2
2
  import "@fangzhongya/utils/basic/object/mergeObject";
3
3
  import "@fangzhongya/utils/basic/array/toggleArray";
4
4
  import "@fangzhongya/utils/name/humpToLine";
@@ -11,8 +11,8 @@ import "@fangzhongya/utils/basic/string/firstUpper";
11
11
  import "@fangzhongya/utils/urls/getSuffix";
12
12
  import "@fangzhongya/utils/basic/array/replaceAfter";
13
13
  import "@fangzhongya/utils/html/getVueText";
14
- import { props as p, emits as g, expose as f, slot as h } from "../../utils/props.js";
15
- const n = {
14
+ import { props as m, emits as g, expose as d, slot as x } from "../../utils/props.js";
15
+ const i = {
16
16
  titles: [],
17
17
  propss: [],
18
18
  slots: [],
@@ -27,36 +27,49 @@ function O(e, s) {
27
27
  ["(", ")"],
28
28
  ["{", "}"],
29
29
  ["[", "]"]
30
- ], o = l.map((c) => c[0]).indexOf(r);
31
- if (o != -1) {
32
- let a = new RegExp(
33
- "^\\" + l[o][0] + "(([^\\" + l[o][1] + "])*)\\" + l[o][1] + (s ? "\\s" : ""),
34
- "gi"
35
- ).exec(e);
36
- if (a)
37
- return a[0];
38
- }
30
+ ];
31
+ const t = l.map((a) => a[0]);
32
+ if (t.indexOf(r) != -1) {
33
+ let a = [r];
34
+ for (let o = 1; o < e.length; o++) {
35
+ const p = e[o];
36
+ if (t.includes(p))
37
+ a.push(p);
38
+ else {
39
+ let u = !1;
40
+ for (let f of l)
41
+ if (p === f[1] && a[a.length - 1] === f[0]) {
42
+ u = !0;
43
+ break;
44
+ }
45
+ u && a.pop();
46
+ }
47
+ if (a.length === 0)
48
+ return s && e[o + 1] === " ", e.substring(0, o + 1);
49
+ }
50
+ } else
51
+ return s ? e.substring(0, e.indexOf(" ")) : e;
39
52
  }
40
- function y(e) {
53
+ function T(e) {
41
54
  delete e.problems, delete e.source;
42
- let s = e.tag, r = e.name, l = e.description, t = e.default, o = "";
55
+ let s = e.tag, r = e.name, l = e.description, t = e.default, n = "";
43
56
  if (s == "default")
44
57
  r = r.trim(), r = O(r) || r;
45
58
  else if (s == "selectable")
46
59
  r = r.trim();
47
60
  else {
48
61
  if (r.includes("=")) {
49
- const d = r.split("=");
50
- r = d[0];
51
- const E = d[1] + " " + l, b = O(E, !0);
52
- b ? (t = b, l = E.replace(b, "")) : t = e.default || d[1] || "";
62
+ const p = r.split("=");
63
+ r = p[0];
64
+ const u = p[1] + " " + l, f = O(u, !0);
65
+ f ? (t = f, l = u.replace(f, "")) : t = e.default || p[1] || "";
53
66
  }
54
- const a = /\s*\((.*)\)\s/gi.exec(l);
55
- a && a.length > 0 && (o = a[1], l = l.replace(a[0], ""));
67
+ const o = /\s*\((.*)\)\s/gi.exec(l);
68
+ o && o.length > 0 && (n = o[1], l = l.replace(o[0], ""));
56
69
  }
57
- return e.name = r, e.default = t || "", e.description = l, e.selectable = o, e;
70
+ return e.name = r, e.default = t || "", e.description = l, e.selectable = n, e;
58
71
  }
59
- function w(e) {
72
+ function y(e) {
60
73
  let s = [
61
74
  "title",
62
75
  // 'name',
@@ -65,15 +78,15 @@ function w(e) {
65
78
  "date"
66
79
  // 'description',
67
80
  // 'descriptions',
68
- ], r = u(e), l = {};
81
+ ], r = b(e), l = {};
69
82
  s.forEach((t) => {
70
83
  l[t] = r.obj[t];
71
- }), x(l), r.arr.forEach((t) => {
72
- m(t.key, t.value);
84
+ }), E(l), r.arr.forEach((t) => {
85
+ h(t.key, t.value);
73
86
  });
74
87
  }
75
- function x(e) {
76
- n.titles.push(e);
88
+ function E(e) {
89
+ i.titles.push(e);
77
90
  }
78
91
  function j(e) {
79
92
  let s = [
@@ -85,27 +98,27 @@ function j(e) {
85
98
  "description",
86
99
  "descriptions",
87
100
  "return"
88
- ], r = u(e), l = {};
101
+ ], r = b(e), l = {};
89
102
  s.forEach((t) => {
90
103
  l[t] = r.obj[t];
91
- }), i(l, "props"), r.arr.forEach((t) => {
92
- m(t.key, t.value);
104
+ }), c(l, "props"), r.arr.forEach((t) => {
105
+ h(t.key, t.value);
93
106
  });
94
107
  }
95
- function k(e) {
96
- let s = ["slot", "name", "selectable", "description", "descriptions"], r = u(e), l = {};
108
+ function w(e) {
109
+ let s = ["slot", "name", "selectable", "description", "descriptions"], r = b(e), l = {};
97
110
  s.forEach((t) => {
98
111
  l[t] = r.obj[t];
99
- }), i(l, "slot"), r.arr.forEach((t) => {
100
- m(t.key, t.value);
112
+ }), c(l, "slot"), r.arr.forEach((t) => {
113
+ h(t.key, t.value);
101
114
  });
102
115
  }
103
116
  function F(e) {
104
- let s = ["emits", "name", "selectable", "description", "descriptions"], r = u(e), l = {};
117
+ let s = ["emits", "name", "selectable", "description", "descriptions"], r = b(e), l = {};
105
118
  s.forEach((t) => {
106
119
  l[t] = r.obj[t];
107
- }), i(l, "emits"), r.arr.forEach((t) => {
108
- m(t.key, t.value);
120
+ }), c(l, "emits"), r.arr.forEach((t) => {
121
+ h(t.key, t.value);
109
122
  });
110
123
  }
111
124
  function N(e) {
@@ -117,35 +130,35 @@ function N(e) {
117
130
  "selectable",
118
131
  "description",
119
132
  "descriptions"
120
- ], r = u(e), l = {};
133
+ ], r = b(e), l = {};
121
134
  s.forEach((t) => {
122
135
  l[t] = r.obj[t];
123
- }), i(l, "expose"), r.arr.forEach((t) => {
124
- m(t.key, t.value);
136
+ }), c(l, "expose"), r.arr.forEach((t) => {
137
+ h(t.key, t.value);
125
138
  });
126
139
  }
127
- function i(e, s) {
128
- const r = n[s + "name"] || [], l = e.name ?? e[s]?.name, t = r.indexOf(l);
129
- t >= 0 && (n[s + "s"].splice(t, 1), r.splice(t, 1)), n[s + "s"].push(e), r.push(l), n[s + "name"] = r;
140
+ function c(e, s) {
141
+ const r = i[s + "name"] || [], l = e.name ?? e[s]?.name, t = r.indexOf(l);
142
+ t >= 0 && (i[s + "s"].splice(t, 1), r.splice(t, 1)), i[s + "s"].push(e), r.push(l), i[s + "name"] = r;
130
143
  }
131
144
  function P() {
132
- Object.keys(n).forEach((e) => {
133
- n[e] = [];
145
+ Object.keys(i).forEach((e) => {
146
+ i[e] = [];
134
147
  });
135
148
  }
136
- function u(e, s) {
149
+ function b(e, s) {
137
150
  const r = {
138
151
  descriptions: e?.description || ""
139
152
  }, l = [];
140
153
  return e?.tags && e.tags?.forEach((t) => {
141
- let o = t.tag, c = y(t);
142
- if (!r.hasOwnProperty(o))
143
- r[o] = c;
154
+ let n = t.tag, a = T(t);
155
+ if (!r.hasOwnProperty(n))
156
+ r[n] = a;
144
157
  else {
145
- const a = {};
146
- a[o] = c, l.push({
147
- key: o,
148
- value: a
158
+ const o = {};
159
+ o[n] = a, l.push({
160
+ key: n,
161
+ value: o
149
162
  });
150
163
  }
151
164
  }), {
@@ -153,32 +166,32 @@ function u(e, s) {
153
166
  obj: r
154
167
  };
155
168
  }
156
- function m(e, s) {
169
+ function h(e, s) {
157
170
  switch (e) {
158
171
  case "title":
159
- return x(s), !0;
172
+ return E(s), !0;
160
173
  case "text":
161
- return x(s), !0;
174
+ return E(s), !0;
162
175
  case "props":
163
- return i(s, "props"), !0;
176
+ return c(s, "props"), !0;
164
177
  case "slot":
165
- return i(s, "slot"), !0;
178
+ return c(s, "slot"), !0;
166
179
  case "emits":
167
- return i(s, "emits"), !0;
180
+ return c(s, "emits"), !0;
168
181
  case "expose":
169
- return i(s, "expose"), !0;
182
+ return c(s, "expose"), !0;
170
183
  default:
171
184
  return !1;
172
185
  }
173
186
  }
174
- function z(e, s) {
187
+ function S(e, s) {
175
188
  switch (e) {
176
189
  case "title":
177
- return w(s), !0;
190
+ return y(s), !0;
178
191
  case "props":
179
192
  return j(s), !0;
180
193
  case "slot":
181
- return k(s), !0;
194
+ return w(s), !0;
182
195
  case "emits":
183
196
  return F(s), !0;
184
197
  case "expose":
@@ -187,46 +200,46 @@ function z(e, s) {
187
200
  return !1;
188
201
  }
189
202
  }
190
- function A(e) {
203
+ function v(e) {
191
204
  return P(), e?.forEach((s) => {
192
205
  let r = s?.tags || [], l = r?.length || 0;
193
206
  if (l > 0)
194
207
  for (let t = 0; t < l; t++) {
195
- const o = r[t] || {};
196
- if (z(o.tag, s))
208
+ const n = r[t] || {};
209
+ if (S(n.tag, s))
197
210
  break;
198
211
  }
199
- }), n;
212
+ }), i;
200
213
  }
201
- function M(e) {
202
- let s = T(e);
203
- return A(s);
214
+ function Q(e) {
215
+ let s = k(e);
216
+ return v(s);
204
217
  }
205
- const Q = [
218
+ const R = [
206
219
  {
207
220
  label: "属性名",
208
221
  prop: "name",
209
- formatter: p.name
222
+ formatter: m.name
210
223
  },
211
224
  {
212
225
  label: "说明",
213
226
  prop: "description",
214
- formatter: p.description
227
+ formatter: m.description
215
228
  },
216
229
  {
217
230
  label: "类型",
218
231
  prop: "type",
219
- formatter: p.type
232
+ formatter: m.type
220
233
  },
221
234
  {
222
235
  label: "可选值",
223
236
  prop: "selectable",
224
- formatter: p.selectable
237
+ formatter: m.selectable
225
238
  },
226
239
  {
227
240
  label: "默认值",
228
241
  prop: "default",
229
- formatter: p.default
242
+ formatter: m.default
230
243
  }
231
244
  ], U = [
232
245
  {
@@ -248,46 +261,46 @@ const Q = [
248
261
  {
249
262
  label: "方法名",
250
263
  prop: "name",
251
- formatter: f.name
264
+ formatter: d.name
252
265
  },
253
266
  {
254
267
  label: "说明",
255
268
  prop: "description",
256
- formatter: f.description
269
+ formatter: d.description
257
270
  },
258
271
  {
259
272
  label: "参数",
260
273
  prop: "selectable",
261
- formatter: f.selectable
274
+ formatter: d.selectable
262
275
  },
263
276
  {
264
277
  label: "返回值",
265
278
  prop: "type",
266
279
  formatter(e) {
267
- return f.return(e) ?? f.type(e);
280
+ return d.return(e) ?? d.type(e);
268
281
  }
269
282
  }
270
283
  ], W = [
271
284
  {
272
285
  label: "插槽名",
273
286
  prop: "name",
274
- formatter: h.name
287
+ formatter: x.name
275
288
  },
276
289
  {
277
290
  label: "说明",
278
291
  prop: "description",
279
- formatter: h.description
292
+ formatter: x.description
280
293
  },
281
294
  {
282
295
  label: "作用域参数",
283
296
  prop: "selectable",
284
- formatter: h.selectable
297
+ formatter: x.selectable
285
298
  }
286
299
  ];
287
300
  export {
288
- M as getNotesText,
301
+ Q as getNotesText,
289
302
  U as temits,
290
303
  V as texpose,
291
- Q as tprops,
304
+ R as tprops,
292
305
  W as tslot
293
306
  };
@@ -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;