@fangzhongya/vue-archive 0.0.1
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/LICENSE +25 -0
- package/README.md +206 -0
- package/dist/_plugin-vue_export-helper-dad06003.js +9 -0
- package/dist/index-1fdb5fc5.js +13 -0
- package/dist/index-28f438e1.js +69 -0
- package/dist/index-61a2b43d.js +25 -0
- package/dist/index-6f949c8c.js +69 -0
- package/dist/index-b39ee475.js +203 -0
- package/dist/index-b5b99e39.js +27 -0
- package/dist/index-d1afb146.js +147 -0
- package/dist/index.js +13 -0
- package/dist/index.umd.cjs +469 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-2728c72f.js +117 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-3d34c6b1.js +65360 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-7cc10ffe.js +56 -0
- package/dist/index.vue_vue_type_script_setup_true_lang-9378e472.js +434 -0
- package/dist/info.vue_vue_type_script_setup_true_lang-77b86598.js +2009 -0
- package/dist/style.css +13 -0
- package/package.json +55 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineComponent as d, ref as p, watch as f, openBlock as l, createElementBlock as r, createElementVNode as o, createVNode as m, Fragment as _, renderList as b } from "vue";
|
|
2
|
+
import { useRouter as C } from "vue-router";
|
|
3
|
+
import { t as k, a as $, b as g } from "./index-b39ee475.js";
|
|
4
|
+
import { _ as x } from "./index.vue_vue_type_script_setup_true_lang-3d34c6b1.js";
|
|
5
|
+
import { _ as N } from "./index.vue_vue_type_script_setup_true_lang-9378e472.js";
|
|
6
|
+
import { d as B } from "./info.vue_vue_type_script_setup_true_lang-77b86598.js";
|
|
7
|
+
const E = { class: "main" }, T = { class: "main-top" }, V = { class: "main-but" }, j = { class: "main-test" }, h = /* @__PURE__ */ d({
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
value: Object
|
|
11
|
+
},
|
|
12
|
+
setup(c) {
|
|
13
|
+
const t = c, i = C(), u = p([]);
|
|
14
|
+
f(
|
|
15
|
+
() => t.value,
|
|
16
|
+
() => {
|
|
17
|
+
v();
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
function v() {
|
|
21
|
+
var e;
|
|
22
|
+
u.value = B((e = t.value) == null ? void 0 : e.key);
|
|
23
|
+
}
|
|
24
|
+
v();
|
|
25
|
+
function a(e) {
|
|
26
|
+
e == 1 ? k(i, t.value) : e == 2 ? $(i, t.value) : e == 3 && g(i, t.value);
|
|
27
|
+
}
|
|
28
|
+
return (e, s) => (l(), r("div", E, [
|
|
29
|
+
o("div", T, [
|
|
30
|
+
m(x, {
|
|
31
|
+
value: t.value
|
|
32
|
+
}, null, 8, ["value"])
|
|
33
|
+
]),
|
|
34
|
+
o("div", V, [
|
|
35
|
+
o("div", {
|
|
36
|
+
class: "but-div",
|
|
37
|
+
onClick: s[0] || (s[0] = (n) => a(1))
|
|
38
|
+
}, " 当前 "),
|
|
39
|
+
o("div", {
|
|
40
|
+
class: "but-div",
|
|
41
|
+
onClick: s[1] || (s[1] = (n) => a(2))
|
|
42
|
+
}, " 更多 "),
|
|
43
|
+
o("div", {
|
|
44
|
+
class: "but-div",
|
|
45
|
+
onClick: s[2] || (s[2] = (n) => a(3))
|
|
46
|
+
}, " 开发 ")
|
|
47
|
+
]),
|
|
48
|
+
(l(!0), r(_, null, b(u.value, (n) => (l(), r("div", j, [
|
|
49
|
+
m(N, { value: n }, null, 8, ["value"])
|
|
50
|
+
]))), 256))
|
|
51
|
+
]));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
h as _
|
|
56
|
+
};
|
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import { defineComponent as N, h as o, watch as V, ref as g, openBlock as y, createElementBlock as C, createElementVNode as d, toDisplayString as w, createVNode as m, withCtx as x, normalizeClass as T, withModifiers as A, Fragment as q, renderList as z, createBlock as L, withDirectives as I, vShow as M, defineAsyncComponent as R, unref as B, Suspense as U, createTextVNode as G, createCommentVNode as J } from "vue";
|
|
2
|
+
import { p as K, q as Q, _ as E, H as W, i as O, m as X, k as Y } from "./info.vue_vue_type_script_setup_true_lang-77b86598.js";
|
|
3
|
+
import { d as Z } from "./index-b39ee475.js";
|
|
4
|
+
import { useRouter as b } from "vue-router";
|
|
5
|
+
const j = N({
|
|
6
|
+
/**
|
|
7
|
+
* @props {Stinrg} value 插入数据
|
|
8
|
+
*/
|
|
9
|
+
props: {
|
|
10
|
+
value: Array
|
|
11
|
+
},
|
|
12
|
+
render(t, s, l) {
|
|
13
|
+
var f;
|
|
14
|
+
let n = [], a = [], i = [];
|
|
15
|
+
const v = () => {
|
|
16
|
+
i.length > 0 && (n.push(
|
|
17
|
+
o(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
class: "test-top-list"
|
|
21
|
+
},
|
|
22
|
+
i
|
|
23
|
+
)
|
|
24
|
+
), i = []);
|
|
25
|
+
}, r = () => {
|
|
26
|
+
n.length > 0 && (a.push(
|
|
27
|
+
o(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
class: "test-top-division"
|
|
31
|
+
},
|
|
32
|
+
n
|
|
33
|
+
)
|
|
34
|
+
), n = []);
|
|
35
|
+
};
|
|
36
|
+
return (f = l.value) == null || f.forEach((e) => {
|
|
37
|
+
const p = [];
|
|
38
|
+
let u = !1;
|
|
39
|
+
if (e.date && (u = !0, p.push(
|
|
40
|
+
o(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
class: "test-top-date"
|
|
44
|
+
},
|
|
45
|
+
[
|
|
46
|
+
o("span", {}, "更新时间:"),
|
|
47
|
+
o(
|
|
48
|
+
"span",
|
|
49
|
+
{},
|
|
50
|
+
e.date.name + " " + e.date.description
|
|
51
|
+
)
|
|
52
|
+
]
|
|
53
|
+
)
|
|
54
|
+
)), e.author && (u = !0, p.push(
|
|
55
|
+
o(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
class: "test-top-author"
|
|
59
|
+
},
|
|
60
|
+
[
|
|
61
|
+
o("span", {}, "作者:"),
|
|
62
|
+
o(
|
|
63
|
+
"span",
|
|
64
|
+
{},
|
|
65
|
+
e.author.name + " " + e.author.description
|
|
66
|
+
)
|
|
67
|
+
]
|
|
68
|
+
)
|
|
69
|
+
)), e.title && (e.title.type || e.title.name || e.title.description)) {
|
|
70
|
+
v(), u && r();
|
|
71
|
+
let c = e.title.type || "div";
|
|
72
|
+
n.push(
|
|
73
|
+
o(
|
|
74
|
+
c,
|
|
75
|
+
{
|
|
76
|
+
class: "test-top-title"
|
|
77
|
+
},
|
|
78
|
+
[
|
|
79
|
+
o(
|
|
80
|
+
"span",
|
|
81
|
+
{},
|
|
82
|
+
e.title.name + " " + e.title.description
|
|
83
|
+
)
|
|
84
|
+
]
|
|
85
|
+
)
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
if (u && (i.length > 0 && (v(), r()), n.push(
|
|
89
|
+
o(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
class: "test-top-info"
|
|
93
|
+
},
|
|
94
|
+
p
|
|
95
|
+
)
|
|
96
|
+
)), e.text) {
|
|
97
|
+
let c = e.text.type || "div";
|
|
98
|
+
i.push(
|
|
99
|
+
o(
|
|
100
|
+
c,
|
|
101
|
+
{
|
|
102
|
+
class: "test-top-text"
|
|
103
|
+
},
|
|
104
|
+
[
|
|
105
|
+
o(
|
|
106
|
+
"span",
|
|
107
|
+
{},
|
|
108
|
+
e.text.name + " " + e.text.description
|
|
109
|
+
)
|
|
110
|
+
]
|
|
111
|
+
)
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
if (e.proposal) {
|
|
115
|
+
let c = e.proposal.type || "div";
|
|
116
|
+
i.push(
|
|
117
|
+
o(
|
|
118
|
+
c,
|
|
119
|
+
{
|
|
120
|
+
class: "test-top-proposal"
|
|
121
|
+
},
|
|
122
|
+
[
|
|
123
|
+
o(
|
|
124
|
+
"span",
|
|
125
|
+
{},
|
|
126
|
+
e.proposal.name + " " + e.proposal.description
|
|
127
|
+
)
|
|
128
|
+
]
|
|
129
|
+
)
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
if (e.error) {
|
|
133
|
+
let c = e.error.type || "div";
|
|
134
|
+
i.push(
|
|
135
|
+
o(
|
|
136
|
+
c,
|
|
137
|
+
{
|
|
138
|
+
class: "test-top-error"
|
|
139
|
+
},
|
|
140
|
+
[
|
|
141
|
+
o(
|
|
142
|
+
"span",
|
|
143
|
+
{},
|
|
144
|
+
e.error.name + " " + e.error.description
|
|
145
|
+
)
|
|
146
|
+
]
|
|
147
|
+
)
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
}), v(), r(), o(
|
|
151
|
+
"div",
|
|
152
|
+
{
|
|
153
|
+
class: "test-top"
|
|
154
|
+
},
|
|
155
|
+
a
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
}), tt = { class: "code" }, et = { class: "code-top" }, st = { class: "code-top-but" }, at = { class: "top-but-files" }, lt = ["onClick"], nt = { class: "code-highlightjs" }, it = /* @__PURE__ */ N({
|
|
159
|
+
__name: "index",
|
|
160
|
+
props: {
|
|
161
|
+
text: String,
|
|
162
|
+
value: Object
|
|
163
|
+
},
|
|
164
|
+
setup(t) {
|
|
165
|
+
const s = t, l = b();
|
|
166
|
+
V(
|
|
167
|
+
() => s.text,
|
|
168
|
+
() => {
|
|
169
|
+
p();
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
const n = g([]), a = g(), i = g(!1);
|
|
173
|
+
function v() {
|
|
174
|
+
var u;
|
|
175
|
+
(u = a.value) != null && u.raw ? O(a.value.raw) : O(s.text);
|
|
176
|
+
}
|
|
177
|
+
function r() {
|
|
178
|
+
i.value = !i.value;
|
|
179
|
+
}
|
|
180
|
+
function f() {
|
|
181
|
+
Z(l, s.value);
|
|
182
|
+
}
|
|
183
|
+
function e(u) {
|
|
184
|
+
i.value = !0, a.value = u;
|
|
185
|
+
}
|
|
186
|
+
function p() {
|
|
187
|
+
var u;
|
|
188
|
+
if (a.value = void 0, i.value = !1, s.text) {
|
|
189
|
+
let c = K(
|
|
190
|
+
(u = s.value) == null ? void 0 : u.key,
|
|
191
|
+
s.text,
|
|
192
|
+
"vue"
|
|
193
|
+
);
|
|
194
|
+
Q(c).then((_) => {
|
|
195
|
+
n.value = _.filter((h) => h.raw);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return p(), (u, c) => {
|
|
200
|
+
var _;
|
|
201
|
+
return y(), C("div", tt, [
|
|
202
|
+
d("div", et, [
|
|
203
|
+
d("div", st, [
|
|
204
|
+
d("div", {
|
|
205
|
+
class: "but-div",
|
|
206
|
+
onClick: f
|
|
207
|
+
}, " go "),
|
|
208
|
+
d("div", {
|
|
209
|
+
class: "but-div",
|
|
210
|
+
onClick: v
|
|
211
|
+
}, " 复制 "),
|
|
212
|
+
d("div", {
|
|
213
|
+
class: "but-div",
|
|
214
|
+
onClick: r
|
|
215
|
+
}, w(i.value ? "隐藏" : "显示"), 1),
|
|
216
|
+
d("div", at, [
|
|
217
|
+
m(E, {
|
|
218
|
+
value: s.value
|
|
219
|
+
}, {
|
|
220
|
+
default: x(() => [
|
|
221
|
+
d("div", {
|
|
222
|
+
class: T(["but-div", {
|
|
223
|
+
on: !(a.value && a.value.value)
|
|
224
|
+
}]),
|
|
225
|
+
onClick: c[0] || (c[0] = A((h) => e(), ["stop"]))
|
|
226
|
+
}, " index.vue ", 2)
|
|
227
|
+
]),
|
|
228
|
+
_: 1
|
|
229
|
+
}, 8, ["value"]),
|
|
230
|
+
(y(!0), C(q, null, z(n.value, (h, yt) => (y(), L(E, { value: h }, {
|
|
231
|
+
default: x(() => {
|
|
232
|
+
var D;
|
|
233
|
+
return [
|
|
234
|
+
d("div", {
|
|
235
|
+
class: T(["but-div", {
|
|
236
|
+
on: h.key == ((D = a.value) == null ? void 0 : D.key)
|
|
237
|
+
}]),
|
|
238
|
+
onClick: A((xt) => e(h), ["stop"])
|
|
239
|
+
}, w(h.value), 11, lt)
|
|
240
|
+
];
|
|
241
|
+
}),
|
|
242
|
+
_: 2
|
|
243
|
+
}, 1032, ["value"]))), 256))
|
|
244
|
+
])
|
|
245
|
+
])
|
|
246
|
+
]),
|
|
247
|
+
I(d("div", nt, [
|
|
248
|
+
m(W, {
|
|
249
|
+
language: "html",
|
|
250
|
+
code: ((_ = a.value) == null ? void 0 : _.raw) || s.text
|
|
251
|
+
}, null, 8, ["code"])
|
|
252
|
+
], 512), [
|
|
253
|
+
[M, i.value]
|
|
254
|
+
])
|
|
255
|
+
]);
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
function ot(t) {
|
|
260
|
+
return delete t.problems, delete t.source, t;
|
|
261
|
+
}
|
|
262
|
+
function P(t, s) {
|
|
263
|
+
var a;
|
|
264
|
+
const l = {
|
|
265
|
+
descriptions: (t == null ? void 0 : t.description) || ""
|
|
266
|
+
}, n = [];
|
|
267
|
+
return t != null && t.tags && ((a = t == null ? void 0 : t.tags) == null || a.forEach((i, v) => {
|
|
268
|
+
let r = i.tag, f = ot(i);
|
|
269
|
+
if (!l.hasOwnProperty(r) && s.includes(r))
|
|
270
|
+
l[r] = f;
|
|
271
|
+
else {
|
|
272
|
+
let e = {};
|
|
273
|
+
e[r] = f, n.push({
|
|
274
|
+
key: r,
|
|
275
|
+
value: e
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
})), {
|
|
279
|
+
arr: n,
|
|
280
|
+
obj: l
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
let k = [];
|
|
284
|
+
function rt(t) {
|
|
285
|
+
const s = ["title", "author", "date"], l = P(t, s), n = {};
|
|
286
|
+
s.forEach((a) => {
|
|
287
|
+
n[a] = l.obj[a];
|
|
288
|
+
}), S(n), l.arr.forEach((a) => {
|
|
289
|
+
H(a.key, a.value);
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
let $ = [];
|
|
293
|
+
function ut(t) {
|
|
294
|
+
const s = ["state", "type"], l = P(t, s), n = {};
|
|
295
|
+
s.forEach((a) => {
|
|
296
|
+
n[a] = l.obj[a];
|
|
297
|
+
}), F(n), l.arr.forEach((a) => {
|
|
298
|
+
H(a.key, a.value);
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function S(t) {
|
|
302
|
+
k.push(t);
|
|
303
|
+
}
|
|
304
|
+
function ct(t) {
|
|
305
|
+
k.push(t);
|
|
306
|
+
}
|
|
307
|
+
function dt(t) {
|
|
308
|
+
k.push(t);
|
|
309
|
+
}
|
|
310
|
+
function F(t) {
|
|
311
|
+
$.push(t);
|
|
312
|
+
}
|
|
313
|
+
function H(t, s) {
|
|
314
|
+
switch (t) {
|
|
315
|
+
case "title":
|
|
316
|
+
return S(s), !0;
|
|
317
|
+
case "proposal":
|
|
318
|
+
return ct(s), !0;
|
|
319
|
+
case "error":
|
|
320
|
+
return dt(s), !0;
|
|
321
|
+
case "state":
|
|
322
|
+
return F(s), !0;
|
|
323
|
+
case "text":
|
|
324
|
+
return S(s), !0;
|
|
325
|
+
default:
|
|
326
|
+
return !1;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
function pt(t, s) {
|
|
330
|
+
switch (t) {
|
|
331
|
+
case "title":
|
|
332
|
+
return rt(s), !0;
|
|
333
|
+
case "state":
|
|
334
|
+
return ut(s), !0;
|
|
335
|
+
default:
|
|
336
|
+
return !1;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
function vt(t) {
|
|
340
|
+
k = [], $ = [];
|
|
341
|
+
const s = X(t);
|
|
342
|
+
return s == null || s.forEach((l) => {
|
|
343
|
+
let n = (l == null ? void 0 : l.tags) || [], a = (n == null ? void 0 : n.length) || 0;
|
|
344
|
+
if (a > 0)
|
|
345
|
+
for (let i = 0; i < a; i++) {
|
|
346
|
+
const v = n[i] || {};
|
|
347
|
+
if (pt(v.tag, l))
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
}), {
|
|
351
|
+
titles: k,
|
|
352
|
+
states: $
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
const ft = { class: "md-top-name" }, ht = { class: "test-top" }, _t = { class: "test-div" }, mt = { class: "test-body" }, gt = {
|
|
356
|
+
key: 0,
|
|
357
|
+
class: "test-code"
|
|
358
|
+
}, Et = /* @__PURE__ */ N({
|
|
359
|
+
__name: "index",
|
|
360
|
+
props: {
|
|
361
|
+
value: Object,
|
|
362
|
+
read: {
|
|
363
|
+
type: Boolean,
|
|
364
|
+
default: !0
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
emits: ["state"],
|
|
368
|
+
setup(t, { emit: s }) {
|
|
369
|
+
const l = t, n = g(""), a = g([]), i = g("1");
|
|
370
|
+
V([() => l.value, () => l.read], () => {
|
|
371
|
+
r();
|
|
372
|
+
});
|
|
373
|
+
let v;
|
|
374
|
+
function r() {
|
|
375
|
+
var f, e;
|
|
376
|
+
l.read && (f = l.value) != null && f.key && Y(l.value).then((p) => {
|
|
377
|
+
var h;
|
|
378
|
+
n.value = p;
|
|
379
|
+
let { titles: u, states: c } = vt(p);
|
|
380
|
+
console.log("states", c), a.value = u;
|
|
381
|
+
const _ = c[0];
|
|
382
|
+
_ && _.type && (console.log("so", _), i.value = _.type.type), s(
|
|
383
|
+
"state",
|
|
384
|
+
i.value,
|
|
385
|
+
(h = l.value) == null ? void 0 : h.key
|
|
386
|
+
);
|
|
387
|
+
}).catch(() => {
|
|
388
|
+
n.value = "";
|
|
389
|
+
}), (e = l.value) != null && e.component && (v = R(
|
|
390
|
+
l.value.component
|
|
391
|
+
));
|
|
392
|
+
}
|
|
393
|
+
return r(), (f, e) => (y(), C("div", {
|
|
394
|
+
class: T(["test", "state-" + i.value])
|
|
395
|
+
}, [
|
|
396
|
+
m(E, {
|
|
397
|
+
value: l.value
|
|
398
|
+
}, {
|
|
399
|
+
default: x(() => {
|
|
400
|
+
var p;
|
|
401
|
+
return [
|
|
402
|
+
d("div", ft, w((p = l.value) == null ? void 0 : p.value) + " 文件 示例代码 ", 1)
|
|
403
|
+
];
|
|
404
|
+
}),
|
|
405
|
+
_: 1
|
|
406
|
+
}, 8, ["value"]),
|
|
407
|
+
d("div", ht, [
|
|
408
|
+
m(B(j), { value: a.value }, null, 8, ["value"])
|
|
409
|
+
]),
|
|
410
|
+
d("div", _t, [
|
|
411
|
+
d("div", mt, [
|
|
412
|
+
(y(), L(U, null, {
|
|
413
|
+
fallback: x(() => [
|
|
414
|
+
G(" 示例加载中... ")
|
|
415
|
+
]),
|
|
416
|
+
default: x(() => [
|
|
417
|
+
m(B(v))
|
|
418
|
+
]),
|
|
419
|
+
_: 1
|
|
420
|
+
}))
|
|
421
|
+
]),
|
|
422
|
+
l.read ? (y(), C("div", gt, [
|
|
423
|
+
m(it, {
|
|
424
|
+
value: l.value,
|
|
425
|
+
text: n.value
|
|
426
|
+
}, null, 8, ["value", "text"])
|
|
427
|
+
])) : J("", !0)
|
|
428
|
+
])
|
|
429
|
+
], 2));
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
export {
|
|
433
|
+
Et as _
|
|
434
|
+
};
|