@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.
- package/dist/node/index.cjs +184 -112
- package/dist/node/index.js +184 -112
- package/dist/packages/components/compo/index.cjs +1 -1
- package/dist/packages/components/compo/index.js +98 -85
- package/dist/packages/components/compo/index.vue.cjs +1 -1
- package/dist/packages/components/compo/index.vue.js +18 -16
- package/dist/packages/components/compo/info-top.vue.cjs +1 -0
- package/dist/packages/components/compo/info-top.vue.js +32 -0
- package/dist/packages/components/compo/info-top.vue2.cjs +1 -0
- package/dist/packages/components/compo/info-top.vue2.js +4 -0
- package/dist/packages/components/compo/props.vue.cjs +1 -1
- package/dist/packages/components/compo/props.vue.js +44 -40
- package/dist/packages/components/compo/top.cjs +1 -1
- package/dist/packages/components/compo/top.js +69 -48
- package/dist/packages/components/main/index.vue.cjs +1 -1
- package/dist/packages/components/main/index.vue.js +30 -25
- package/dist/packages/components/test/index.cjs +1 -1
- package/dist/packages/components/test/index.js +24 -22
- package/dist/packages/components/test/top.cjs +1 -1
- package/dist/packages/components/test/top.js +69 -84
- package/dist/packages/components/use/code.cjs +6 -6
- package/dist/packages/components/use/code.js +74 -66
- package/dist/packages/components/use/retrie/array/index.vue.cjs +2 -2
- package/dist/packages/components/use/retrie/array/index.vue.js +16 -16
- package/dist/packages/components/use/retrie/object/index.vue.cjs +2 -2
- package/dist/packages/components/use/retrie/object/index.vue.js +17 -17
- package/dist/packages/page/develop/index.vue2.cjs +1 -1
- package/dist/packages/page/develop/index.vue2.js +2 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getTextNotes as
|
|
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
|
|
15
|
-
const
|
|
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
|
-
]
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
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,
|
|
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
|
|
50
|
-
r =
|
|
51
|
-
const
|
|
52
|
-
|
|
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
|
|
55
|
-
|
|
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 =
|
|
70
|
+
return e.name = r, e.default = t || "", e.description = l, e.selectable = n, e;
|
|
58
71
|
}
|
|
59
|
-
function
|
|
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 =
|
|
81
|
+
], r = b(e), l = {};
|
|
69
82
|
s.forEach((t) => {
|
|
70
83
|
l[t] = r.obj[t];
|
|
71
|
-
}),
|
|
72
|
-
|
|
84
|
+
}), E(l), r.arr.forEach((t) => {
|
|
85
|
+
h(t.key, t.value);
|
|
73
86
|
});
|
|
74
87
|
}
|
|
75
|
-
function
|
|
76
|
-
|
|
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 =
|
|
101
|
+
], r = b(e), l = {};
|
|
89
102
|
s.forEach((t) => {
|
|
90
103
|
l[t] = r.obj[t];
|
|
91
|
-
}),
|
|
92
|
-
|
|
104
|
+
}), c(l, "props"), r.arr.forEach((t) => {
|
|
105
|
+
h(t.key, t.value);
|
|
93
106
|
});
|
|
94
107
|
}
|
|
95
|
-
function
|
|
96
|
-
let s = ["slot", "name", "selectable", "description", "descriptions"], r =
|
|
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
|
-
}),
|
|
100
|
-
|
|
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 =
|
|
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
|
-
}),
|
|
108
|
-
|
|
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 =
|
|
133
|
+
], r = b(e), l = {};
|
|
121
134
|
s.forEach((t) => {
|
|
122
135
|
l[t] = r.obj[t];
|
|
123
|
-
}),
|
|
124
|
-
|
|
136
|
+
}), c(l, "expose"), r.arr.forEach((t) => {
|
|
137
|
+
h(t.key, t.value);
|
|
125
138
|
});
|
|
126
139
|
}
|
|
127
|
-
function
|
|
128
|
-
const r =
|
|
129
|
-
t >= 0 && (
|
|
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(
|
|
133
|
-
|
|
145
|
+
Object.keys(i).forEach((e) => {
|
|
146
|
+
i[e] = [];
|
|
134
147
|
});
|
|
135
148
|
}
|
|
136
|
-
function
|
|
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
|
|
142
|
-
if (!r.hasOwnProperty(
|
|
143
|
-
r[
|
|
154
|
+
let n = t.tag, a = T(t);
|
|
155
|
+
if (!r.hasOwnProperty(n))
|
|
156
|
+
r[n] = a;
|
|
144
157
|
else {
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
key:
|
|
148
|
-
value:
|
|
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
|
|
169
|
+
function h(e, s) {
|
|
157
170
|
switch (e) {
|
|
158
171
|
case "title":
|
|
159
|
-
return
|
|
172
|
+
return E(s), !0;
|
|
160
173
|
case "text":
|
|
161
|
-
return
|
|
174
|
+
return E(s), !0;
|
|
162
175
|
case "props":
|
|
163
|
-
return
|
|
176
|
+
return c(s, "props"), !0;
|
|
164
177
|
case "slot":
|
|
165
|
-
return
|
|
178
|
+
return c(s, "slot"), !0;
|
|
166
179
|
case "emits":
|
|
167
|
-
return
|
|
180
|
+
return c(s, "emits"), !0;
|
|
168
181
|
case "expose":
|
|
169
|
-
return
|
|
182
|
+
return c(s, "expose"), !0;
|
|
170
183
|
default:
|
|
171
184
|
return !1;
|
|
172
185
|
}
|
|
173
186
|
}
|
|
174
|
-
function
|
|
187
|
+
function S(e, s) {
|
|
175
188
|
switch (e) {
|
|
176
189
|
case "title":
|
|
177
|
-
return
|
|
190
|
+
return y(s), !0;
|
|
178
191
|
case "props":
|
|
179
192
|
return j(s), !0;
|
|
180
193
|
case "slot":
|
|
181
|
-
return
|
|
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
|
|
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
|
|
196
|
-
if (
|
|
208
|
+
const n = r[t] || {};
|
|
209
|
+
if (S(n.tag, s))
|
|
197
210
|
break;
|
|
198
211
|
}
|
|
199
|
-
}),
|
|
212
|
+
}), i;
|
|
200
213
|
}
|
|
201
|
-
function
|
|
202
|
-
let s =
|
|
203
|
-
return
|
|
214
|
+
function Q(e) {
|
|
215
|
+
let s = k(e);
|
|
216
|
+
return v(s);
|
|
204
217
|
}
|
|
205
|
-
const
|
|
218
|
+
const R = [
|
|
206
219
|
{
|
|
207
220
|
label: "属性名",
|
|
208
221
|
prop: "name",
|
|
209
|
-
formatter:
|
|
222
|
+
formatter: m.name
|
|
210
223
|
},
|
|
211
224
|
{
|
|
212
225
|
label: "说明",
|
|
213
226
|
prop: "description",
|
|
214
|
-
formatter:
|
|
227
|
+
formatter: m.description
|
|
215
228
|
},
|
|
216
229
|
{
|
|
217
230
|
label: "类型",
|
|
218
231
|
prop: "type",
|
|
219
|
-
formatter:
|
|
232
|
+
formatter: m.type
|
|
220
233
|
},
|
|
221
234
|
{
|
|
222
235
|
label: "可选值",
|
|
223
236
|
prop: "selectable",
|
|
224
|
-
formatter:
|
|
237
|
+
formatter: m.selectable
|
|
225
238
|
},
|
|
226
239
|
{
|
|
227
240
|
label: "默认值",
|
|
228
241
|
prop: "default",
|
|
229
|
-
formatter:
|
|
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:
|
|
264
|
+
formatter: d.name
|
|
252
265
|
},
|
|
253
266
|
{
|
|
254
267
|
label: "说明",
|
|
255
268
|
prop: "description",
|
|
256
|
-
formatter:
|
|
269
|
+
formatter: d.description
|
|
257
270
|
},
|
|
258
271
|
{
|
|
259
272
|
label: "参数",
|
|
260
273
|
prop: "selectable",
|
|
261
|
-
formatter:
|
|
274
|
+
formatter: d.selectable
|
|
262
275
|
},
|
|
263
276
|
{
|
|
264
277
|
label: "返回值",
|
|
265
278
|
prop: "type",
|
|
266
279
|
formatter(e) {
|
|
267
|
-
return
|
|
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:
|
|
287
|
+
formatter: x.name
|
|
275
288
|
},
|
|
276
289
|
{
|
|
277
290
|
label: "说明",
|
|
278
291
|
prop: "description",
|
|
279
|
-
formatter:
|
|
292
|
+
formatter: x.description
|
|
280
293
|
},
|
|
281
294
|
{
|
|
282
295
|
label: "作用域参数",
|
|
283
296
|
prop: "selectable",
|
|
284
|
-
formatter:
|
|
297
|
+
formatter: x.selectable
|
|
285
298
|
}
|
|
286
299
|
];
|
|
287
300
|
export {
|
|
288
|
-
|
|
301
|
+
Q as getNotesText,
|
|
289
302
|
U as temits,
|
|
290
303
|
V as texpose,
|
|
291
|
-
|
|
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"),
|
|
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
|
|
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
|
|
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
|
-
() =>
|
|
31
|
+
() => e.value,
|
|
31
32
|
() => {
|
|
32
33
|
c();
|
|
33
34
|
}
|
|
34
35
|
);
|
|
35
36
|
function c() {
|
|
36
|
-
|
|
37
|
+
e.value?.key && (b(e.value?.key).then((n) => {
|
|
37
38
|
r.value = n;
|
|
38
|
-
}), a.value = j(
|
|
39
|
+
}), a.value = j(e.value?.key) || []);
|
|
39
40
|
}
|
|
40
|
-
return c(), (n, i) => (
|
|
41
|
-
a.value && a.value.length ? (
|
|
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] = (
|
|
44
|
+
onClick: i[0] || (i[0] = (p) => s.md = !s.md),
|
|
44
45
|
class: "compo-md-name"
|
|
45
46
|
}, "说明文档"),
|
|
46
|
-
s.md ? (
|
|
47
|
-
(
|
|
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
|
-
|
|
51
|
+
v($, {
|
|
52
|
+
istop: e.istop,
|
|
51
53
|
onChange: k,
|
|
52
54
|
value: r.value
|
|
53
|
-
}, null, 8, ["value"]),
|
|
54
|
-
d(_) ? (
|
|
55
|
-
|
|
56
|
-
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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
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
|
|
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 = {
|
|
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(
|
|
12
|
-
const v =
|
|
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
|
-
}),
|
|
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
|
-
|
|
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,
|
|
31
|
-
|
|
32
|
-
e.top ? (l(),
|
|
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:
|
|
35
|
-
}, null, 8, ["value"])) :
|
|
36
|
-
]),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
onClick:
|
|
40
|
-
}, "
|
|
41
|
-
e.props ? (l(),
|
|
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:
|
|
45
|
-
}, null, 8, ["list", "value"])) :
|
|
48
|
+
value: d.value
|
|
49
|
+
}, null, 8, ["list", "value"])) : i("", !0)
|
|
46
50
|
]),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
onClick:
|
|
50
|
-
}, "
|
|
51
|
-
e.emits ? (l(),
|
|
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:
|
|
55
|
-
}, null, 8, ["list", "value"])) :
|
|
58
|
+
value: k.value
|
|
59
|
+
}, null, 8, ["list", "value"])) : i("", !0)
|
|
56
60
|
]),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
onClick:
|
|
60
|
-
}, "
|
|
61
|
-
e.expose ? (l(),
|
|
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"])) :
|
|
69
|
+
}, null, 8, ["list", "value"])) : i("", !0)
|
|
66
70
|
]),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
onClick:
|
|
71
|
+
o("div", A, [
|
|
72
|
+
o("h4", {
|
|
73
|
+
onClick: t[3] || (t[3] = (a) => e.slot = !e.slot)
|
|
70
74
|
}, "组件插槽"),
|
|
71
|
-
e.slot ? (l(),
|
|
75
|
+
e.slot ? (l(), n(r, {
|
|
72
76
|
key: 0,
|
|
73
77
|
list: u(b),
|
|
74
|
-
value:
|
|
75
|
-
}, null, 8, ["list", "value"])) :
|
|
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
|
|
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;
|