@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.
- package/dist/index.css +1 -1
- package/dist/node/index.cjs +166 -134
- package/dist/node/index.d.cts +4 -0
- package/dist/node/index.d.ts +4 -0
- package/dist/node/index.js +166 -134
- package/dist/packages/components/boxurl/index.vue.cjs +1 -1
- package/dist/packages/components/boxurl/index.vue.js +37 -27
- package/dist/packages/components/code/index.vue.cjs +1 -1
- package/dist/packages/components/code/index.vue.js +67 -57
- 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/set-code.vue.cjs +1 -1
- package/dist/packages/components/use/set-code.vue.js +31 -36
- package/dist/packages/config.d.ts +3 -0
- package/dist/packages/page/develop/index.vue2.cjs +1 -1
- package/dist/packages/page/develop/index.vue2.js +2 -1
- package/dist/packages/utils/common.cjs +1 -1
- package/dist/packages/utils/common.d.ts +2 -0
- package/dist/packages/utils/common.js +13 -12
- package/dist/packages/utils/glob.cjs +2 -2
- package/dist/packages/utils/glob.d.ts +1 -1
- package/dist/packages/utils/glob.js +226 -235
- package/dist/packages/utils/util.cjs +1 -0
- package/dist/packages/utils/util.d.ts +4 -0
- package/dist/packages/utils/util.js +46 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),v=require("vue-router"),r=require("../../router/index.cjs"),
|
|
1
|
+
"use strict";const e=require("vue"),v=require("vue-router"),r=require("../../router/index.cjs"),_=require("../compo/index.vue.cjs"),d=require("../compo/info.vue.cjs"),p=require("../compo/info-top.vue.cjs"),m=require("../test/index.vue.cjs"),N=require("../../utils/glob.cjs"),f={class:"main"},V={class:"main-top"},E={class:"main-compo-top"},k={class:"main-but"},g={class:"main-test"},q={class:"main-compo"},b=e.defineComponent({__name:"index",props:{value:Object},setup(l){const u=v.useRouter(),t=l,c=e.ref([]);e.watch(()=>t.value,()=>{a()});function a(){c.value=N.getTestName(t.value?.key)}a();function i(o){o==1?r.toCompon(u,t.value):o==2?r.toTests(u,t.value):o==3&&r.toDevelop(u,t.value)}return(o,n)=>(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",V,[e.createVNode(d,{value:l.value},null,8,["value"])]),e.createElementVNode("div",E,[e.createVNode(p,{value:l.value},null,8,["value"])]),e.createElementVNode("div",k,[e.createElementVNode("div",{class:"but-div",onClick:n[0]||(n[0]=s=>i(1))},"当前"),e.createElementVNode("div",{class:"but-div",onClick:n[1]||(n[1]=s=>i(2))},"更多"),e.createElementVNode("div",{class:"but-div",onClick:n[2]||(n[2]=s=>i(3))},"开发")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,s=>(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(m,{value:s},null,8,["value"])]))),256)),e.createElementVNode("div",q,[e.createVNode(_,{istop:!1,value:t.value},null,8,["value"])])]))}});module.exports=b;
|
|
@@ -1,59 +1,64 @@
|
|
|
1
|
-
import { defineComponent as d, ref as f, watch as p, createElementBlock as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as d, ref as f, watch as p, createElementBlock as m, openBlock as v, createElementVNode as e, createVNode as n, Fragment as _, renderList as $ } from "vue";
|
|
2
|
+
import { useRouter as C } from "vue-router";
|
|
3
3
|
import { toCompon as b, toTests as k, toDevelop as g } from "../../router/index.js";
|
|
4
4
|
import x from "../compo/index.vue.js";
|
|
5
5
|
import N from "../compo/info.vue.js";
|
|
6
|
+
import h from "../compo/info-top.vue.js";
|
|
6
7
|
import B from "../test/index.vue.js";
|
|
7
8
|
import { getTestName as E } from "../../utils/glob.js";
|
|
8
|
-
const T = { class: "main" }, V = { class: "main-top" },
|
|
9
|
+
const T = { class: "main" }, V = { class: "main-top" }, j = { class: "main-compo-top" }, w = { class: "main-but" }, D = { class: "main-test" }, F = { class: "main-compo" }, I = /* @__PURE__ */ d({
|
|
9
10
|
__name: "index",
|
|
10
11
|
props: {
|
|
11
12
|
value: Object
|
|
12
13
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
14
|
+
setup(i) {
|
|
15
|
+
const a = C(), t = i, r = f([]);
|
|
15
16
|
p(
|
|
16
|
-
() =>
|
|
17
|
+
() => t.value,
|
|
17
18
|
() => {
|
|
18
19
|
c();
|
|
19
20
|
}
|
|
20
21
|
);
|
|
21
22
|
function c() {
|
|
22
|
-
|
|
23
|
+
r.value = E(t.value?.key);
|
|
23
24
|
}
|
|
24
25
|
c();
|
|
25
|
-
function
|
|
26
|
-
s == 1 ? b(
|
|
26
|
+
function u(s) {
|
|
27
|
+
s == 1 ? b(a, t.value) : s == 2 ? k(a, t.value) : s == 3 && g(a, t.value);
|
|
27
28
|
}
|
|
28
|
-
return (s,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
return (s, o) => (v(), m("div", T, [
|
|
30
|
+
e("div", V, [
|
|
31
|
+
n(N, { value: i.value }, null, 8, ["value"])
|
|
31
32
|
]),
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
e("div", j, [
|
|
34
|
+
n(h, { value: i.value }, null, 8, ["value"])
|
|
35
|
+
]),
|
|
36
|
+
e("div", w, [
|
|
37
|
+
e("div", {
|
|
34
38
|
class: "but-div",
|
|
35
|
-
onClick:
|
|
39
|
+
onClick: o[0] || (o[0] = (l) => u(1))
|
|
36
40
|
}, "当前"),
|
|
37
|
-
|
|
41
|
+
e("div", {
|
|
38
42
|
class: "but-div",
|
|
39
|
-
onClick:
|
|
43
|
+
onClick: o[1] || (o[1] = (l) => u(2))
|
|
40
44
|
}, "更多"),
|
|
41
|
-
|
|
45
|
+
e("div", {
|
|
42
46
|
class: "but-div",
|
|
43
|
-
onClick:
|
|
47
|
+
onClick: o[2] || (o[2] = (l) => u(3))
|
|
44
48
|
}, "开发")
|
|
45
49
|
]),
|
|
46
|
-
(
|
|
47
|
-
|
|
50
|
+
(v(!0), m(_, null, $(r.value, (l) => (v(), m("div", D, [
|
|
51
|
+
n(B, { value: l }, null, 8, ["value"])
|
|
48
52
|
]))), 256)),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
e("div", F, [
|
|
54
|
+
n(x, {
|
|
55
|
+
istop: !1,
|
|
56
|
+
value: t.value
|
|
52
57
|
}, null, 8, ["value"])
|
|
53
58
|
])
|
|
54
59
|
]));
|
|
55
60
|
}
|
|
56
61
|
});
|
|
57
62
|
export {
|
|
58
|
-
|
|
63
|
+
I as default
|
|
59
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../utils/index.cjs");function E(t){return delete t.problems,delete t.source,t}function d(t,e){const s={descriptions:t?.description||""},a=[];return t?.tags&&t?.tags?.forEach((r,o)=>{let n=r.tag,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../utils/index.cjs");function E(t){return delete t.problems,delete t.source,t}function d(t,e){const s={descriptions:t?.description||""},a=[];return t?.tags&&t?.tags?.forEach((r,o)=>{let n=r.tag,i=E(r);if(!s.hasOwnProperty(n)&&e.includes(n))s[n]=i;else{let f={};f[n]=i,a.push({key:n,value:f})}}),{arr:a,obj:s}}let u=[];function T(t){const e=["title","author","date"],s=d(t,e),a={};e.forEach(r=>{a[r]=s.obj[r]}),c(a),s.arr.forEach(r=>{h(r.key,r.value)})}let l=[];function v(t){const e=["state","type"],s=d(t,e),a={};e.forEach(r=>{a[r]=s.obj[r]}),g(a),s.arr.forEach(r=>{h(r.key,r.value)})}function c(t){u.push(t)}function y(t){u.push(t)}function x(t){u.push(t)}function g(t){l.push(t)}function h(t,e){switch(t){case"title":return c(e),!0;case"proposal":return y(e),!0;case"error":return x(e),!0;case"state":return g(e),!0;case"text":return c(e),!0;case"html":return c(e),!0;default:return!1}}function S(t,e){switch(t){case"title":return T(e),!0;case"state":return v(e),!0;default:return!1}}function m(t){return u=[],l=[],p.getTextNotes(t)?.forEach(s=>{let a=s?.tags||[],r=a?.length||0;if(r>0)for(let o=0;o<r;o++){const n=a[o]||{};if(S(n.tag,s))break}}),{titles:u,states:l}}exports.getNotes=m;
|
|
@@ -6,13 +6,13 @@ function d(t, e) {
|
|
|
6
6
|
const s = {
|
|
7
7
|
descriptions: t?.description || ""
|
|
8
8
|
}, a = [];
|
|
9
|
-
return t?.tags && t?.tags?.forEach((r,
|
|
10
|
-
let n = r.tag,
|
|
9
|
+
return t?.tags && t?.tags?.forEach((r, o) => {
|
|
10
|
+
let n = r.tag, l = E(r);
|
|
11
11
|
if (!s.hasOwnProperty(n) && e.includes(n))
|
|
12
|
-
s[n] =
|
|
12
|
+
s[n] = l;
|
|
13
13
|
else {
|
|
14
14
|
let f = {};
|
|
15
|
-
f[n] =
|
|
15
|
+
f[n] = l, a.push({
|
|
16
16
|
key: n,
|
|
17
17
|
value: f
|
|
18
18
|
});
|
|
@@ -22,17 +22,17 @@ function d(t, e) {
|
|
|
22
22
|
obj: s
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
let
|
|
25
|
+
let u = [];
|
|
26
26
|
function T(t) {
|
|
27
27
|
const e = ["title", "author", "date"], s = d(t, e), a = {};
|
|
28
28
|
e.forEach((r) => {
|
|
29
29
|
a[r] = s.obj[r];
|
|
30
|
-
}),
|
|
30
|
+
}), c(a), s.arr.forEach((r) => {
|
|
31
31
|
g(r.key, r.value);
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
let i = [];
|
|
35
|
-
function
|
|
35
|
+
function m(t) {
|
|
36
36
|
const e = ["state", "type"], s = d(t, e), a = {};
|
|
37
37
|
e.forEach((r) => {
|
|
38
38
|
a[r] = s.obj[r];
|
|
@@ -40,14 +40,14 @@ function v(t) {
|
|
|
40
40
|
g(r.key, r.value);
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
43
|
+
function c(t) {
|
|
44
|
+
u.push(t);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
46
|
+
function v(t) {
|
|
47
|
+
u.push(t);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
49
|
+
function x(t) {
|
|
50
|
+
u.push(t);
|
|
51
51
|
}
|
|
52
52
|
function h(t) {
|
|
53
53
|
i.push(t);
|
|
@@ -55,15 +55,17 @@ function h(t) {
|
|
|
55
55
|
function g(t, e) {
|
|
56
56
|
switch (t) {
|
|
57
57
|
case "title":
|
|
58
|
-
return
|
|
58
|
+
return c(e), !0;
|
|
59
59
|
case "proposal":
|
|
60
|
-
return
|
|
60
|
+
return v(e), !0;
|
|
61
61
|
case "error":
|
|
62
|
-
return
|
|
62
|
+
return x(e), !0;
|
|
63
63
|
case "state":
|
|
64
64
|
return h(e), !0;
|
|
65
65
|
case "text":
|
|
66
|
-
return
|
|
66
|
+
return c(e), !0;
|
|
67
|
+
case "html":
|
|
68
|
+
return c(e), !0;
|
|
67
69
|
default:
|
|
68
70
|
return !1;
|
|
69
71
|
}
|
|
@@ -79,22 +81,22 @@ function w(t, e) {
|
|
|
79
81
|
// setError(obj);
|
|
80
82
|
// return true;
|
|
81
83
|
case "state":
|
|
82
|
-
return
|
|
84
|
+
return m(e), !0;
|
|
83
85
|
default:
|
|
84
86
|
return !1;
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
function k(t) {
|
|
88
|
-
return
|
|
90
|
+
return u = [], i = [], p(t)?.forEach((s) => {
|
|
89
91
|
let a = s?.tags || [], r = a?.length || 0;
|
|
90
92
|
if (r > 0)
|
|
91
|
-
for (let
|
|
92
|
-
const n = a[
|
|
93
|
+
for (let o = 0; o < r; o++) {
|
|
94
|
+
const n = a[o] || {};
|
|
93
95
|
if (w(n.tag, s))
|
|
94
96
|
break;
|
|
95
97
|
}
|
|
96
98
|
}), {
|
|
97
|
-
titles:
|
|
99
|
+
titles: u,
|
|
98
100
|
states: i
|
|
99
101
|
};
|
|
100
102
|
}
|
|
@@ -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 o=require("vue");require("@fangzhongya/utils/html/htmlEscape");function v(u,e,m){let i=[],f=[],p=[];const n=t=>t,r=()=>{p.length>0&&(i.push(e("div",{class:"test-top-list"},p)),p=[])},c=()=>{i.length>0&&(f.push(e("div",{class:"test-top-division"},i)),i=[])};return u.forEach(t=>{const d=[];let a=!1;if(t.date&&(a=!0,d.push(e("div",{class:"test-top-date"},[e("span",{},"更新时间:"),e("span",{},[n(t.date.name+" "+t.date.description)])]))),t.author&&(a=!0,d.push(e("div",{class:"test-top-author"},[e("span",{},"作者:"),e("span",{},[n(t.author.name+" "+t.author.description)])]))),t.title&&(t.title.type||t.title.name||t.title.description)){r(),a&&c();let s=(t.title.type||"div").split("."),l=s[1]||"";s[0]=="html"?i.push(e("div",{class:"test-top-title "+l,innerHTML:t.title.name+" "+t.title.description})):i.push(e(s[0],{class:"test-top-title "+l},[e("span",{},[n(t.title.name+" "+t.title.description)])]))}if(a&&(p.length>0&&(r(),c()),i.push(e("div",{class:"test-top-info"},d))),t.html){let s=(t.html.type||"div").split("."),l=s[1]||"";p.push(e(s[0],{class:"test-top-html "+l,innerHTML:t.html.name+" "+t.html.description}))}["text","proposal","error"].forEach(s=>{if(t[s]){let l=(t[s].type||"div").split("."),h=l[1]||"";l[0]=="html"?p.push(e("div",{class:"test-top-"+s+" "+h,innerHTML:t[s].name+" "+t[s].description})):p.push(e(l[0],{class:"test-top-"+s+" "+h},[e("span",{},[n(t[s].name+" "+t[s].description)])]))}})}),r(),c(),f}const y=o.defineComponent({props:{value:Array},render(u,e,m){const i=v(m.value,o.h);return o.h("div",{class:"test-top"},i)}});exports.default=y;exports.getTestTopDom=v;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as y, h } from "vue";
|
|
2
2
|
import "@fangzhongya/utils/html/htmlEscape";
|
|
3
|
-
function v(
|
|
4
|
-
let
|
|
5
|
-
const
|
|
6
|
-
|
|
3
|
+
function v(o, e, u) {
|
|
4
|
+
let i = [], m = [], l = [];
|
|
5
|
+
const n = (t) => t, r = () => {
|
|
6
|
+
l.length > 0 && (i.push(
|
|
7
7
|
e(
|
|
8
8
|
"div",
|
|
9
9
|
{
|
|
10
10
|
class: "test-top-list"
|
|
11
11
|
},
|
|
12
|
-
|
|
12
|
+
l
|
|
13
13
|
)
|
|
14
|
-
),
|
|
15
|
-
},
|
|
16
|
-
|
|
14
|
+
), l = []);
|
|
15
|
+
}, c = () => {
|
|
16
|
+
i.length > 0 && (m.push(
|
|
17
17
|
e(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
20
|
class: "test-top-division"
|
|
21
21
|
},
|
|
22
|
-
|
|
22
|
+
i
|
|
23
23
|
)
|
|
24
|
-
),
|
|
24
|
+
), i = []);
|
|
25
25
|
};
|
|
26
|
-
return
|
|
27
|
-
const
|
|
26
|
+
return o.forEach((t) => {
|
|
27
|
+
const d = [];
|
|
28
28
|
let a = !1;
|
|
29
|
-
if (t.date && (a = !0,
|
|
29
|
+
if (t.date && (a = !0, d.push(
|
|
30
30
|
e(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
@@ -35,13 +35,13 @@ function v(d, e, c) {
|
|
|
35
35
|
[
|
|
36
36
|
e("span", {}, "更新时间:"),
|
|
37
37
|
e("span", {}, [
|
|
38
|
-
|
|
38
|
+
n(
|
|
39
39
|
t.date.name + " " + t.date.description
|
|
40
40
|
)
|
|
41
41
|
])
|
|
42
42
|
]
|
|
43
43
|
)
|
|
44
|
-
)), t.author && (a = !0,
|
|
44
|
+
)), t.author && (a = !0, d.push(
|
|
45
45
|
e(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
@@ -50,24 +50,29 @@ function v(d, e, c) {
|
|
|
50
50
|
[
|
|
51
51
|
e("span", {}, "作者:"),
|
|
52
52
|
e("span", {}, [
|
|
53
|
-
|
|
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
|
-
|
|
61
|
-
let
|
|
62
|
-
s.push(
|
|
60
|
+
r(), a && c();
|
|
61
|
+
let s = (t.title.type || "div").split("."), p = s[1] || "";
|
|
62
|
+
s[0] == "html" ? i.push(
|
|
63
|
+
e("div", {
|
|
64
|
+
class: "test-top-title " + p,
|
|
65
|
+
innerHTML: t.title.name + " " + t.title.description
|
|
66
|
+
})
|
|
67
|
+
) : i.push(
|
|
63
68
|
e(
|
|
64
|
-
|
|
69
|
+
s[0],
|
|
65
70
|
{
|
|
66
|
-
class: "test-top-title"
|
|
71
|
+
class: "test-top-title " + p
|
|
67
72
|
},
|
|
68
73
|
[
|
|
69
74
|
e("span", {}, [
|
|
70
|
-
|
|
75
|
+
n(
|
|
71
76
|
t.title.name + " " + t.title.description
|
|
72
77
|
)
|
|
73
78
|
])
|
|
@@ -75,89 +80,69 @@ function v(d, e, c) {
|
|
|
75
80
|
)
|
|
76
81
|
);
|
|
77
82
|
}
|
|
78
|
-
if (a && (
|
|
83
|
+
if (a && (l.length > 0 && (r(), c()), i.push(
|
|
79
84
|
e(
|
|
80
85
|
"div",
|
|
81
86
|
{
|
|
82
87
|
class: "test-top-info"
|
|
83
88
|
},
|
|
84
|
-
|
|
89
|
+
d
|
|
85
90
|
)
|
|
86
|
-
)), t.
|
|
87
|
-
let
|
|
88
|
-
|
|
89
|
-
e(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
[
|
|
95
|
-
e("span", {}, [
|
|
96
|
-
r(
|
|
97
|
-
t.text.name + " " + t.text.description
|
|
98
|
-
)
|
|
99
|
-
])
|
|
100
|
-
]
|
|
101
|
-
)
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
if (t.proposal) {
|
|
105
|
-
let i = t.proposal.type || "div";
|
|
106
|
-
p.push(
|
|
107
|
-
e(
|
|
108
|
-
i,
|
|
109
|
-
{
|
|
110
|
-
class: "test-top-proposal"
|
|
111
|
-
},
|
|
112
|
-
[
|
|
113
|
-
e("span", {}, [
|
|
114
|
-
r(
|
|
115
|
-
t.proposal.name + " " + t.proposal.description
|
|
116
|
-
)
|
|
117
|
-
])
|
|
118
|
-
]
|
|
119
|
-
)
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
if (t.error) {
|
|
123
|
-
let i = t.error.type || "div";
|
|
124
|
-
p.push(
|
|
125
|
-
e(
|
|
126
|
-
i,
|
|
127
|
-
{
|
|
128
|
-
class: "test-top-error"
|
|
129
|
-
},
|
|
130
|
-
[
|
|
131
|
-
e("span", {}, [
|
|
132
|
-
r(
|
|
133
|
-
t.error.name + " " + t.error.description
|
|
134
|
-
)
|
|
135
|
-
])
|
|
136
|
-
]
|
|
137
|
-
)
|
|
91
|
+
)), t.html) {
|
|
92
|
+
let s = (t.html.type || "div").split("."), p = s[1] || "";
|
|
93
|
+
l.push(
|
|
94
|
+
e(s[0], {
|
|
95
|
+
class: "test-top-html " + p,
|
|
96
|
+
innerHTML: t.html.name + " " + t.html.description
|
|
97
|
+
})
|
|
138
98
|
);
|
|
139
99
|
}
|
|
140
|
-
|
|
100
|
+
["text", "proposal", "error"].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: "test-top-" + s + " " + f,
|
|
106
|
+
innerHTML: t[s].name + " " + t[s].description
|
|
107
|
+
})
|
|
108
|
+
) : l.push(
|
|
109
|
+
e(
|
|
110
|
+
p[0],
|
|
111
|
+
{
|
|
112
|
+
class: "test-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
|
+
}), r(), c(), m;
|
|
141
126
|
}
|
|
142
|
-
const
|
|
127
|
+
const H = y({
|
|
143
128
|
/**
|
|
144
129
|
* @props {Stinrg} value 插入数据
|
|
145
130
|
*/
|
|
146
131
|
props: {
|
|
147
132
|
value: Array
|
|
148
133
|
},
|
|
149
|
-
render(
|
|
150
|
-
const
|
|
151
|
-
return
|
|
134
|
+
render(o, e, u) {
|
|
135
|
+
const i = v(u.value, h);
|
|
136
|
+
return h(
|
|
152
137
|
"div",
|
|
153
138
|
{
|
|
154
139
|
class: "test-top"
|
|
155
140
|
},
|
|
156
|
-
|
|
141
|
+
i
|
|
157
142
|
);
|
|
158
143
|
}
|
|
159
144
|
});
|
|
160
145
|
export {
|
|
161
|
-
|
|
146
|
+
H as default,
|
|
162
147
|
v as getTestTopDom
|
|
163
148
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),d=require("../code/highlight.vue.cjs"),p=require("../../utils/index.cjs"),l=require("./code.cjs"),v=require("../../utils/util.cjs"),m={class:"set-code"},h={class:"but-div set-code-but"},x={class:"set-code-html"},b=e.defineComponent({__name:"set-code",props:{name:{type:String},param:{type:Object},value:{type:Object},slotValue:{type:Object},propsText:{type:Object},exposeText:{type:Object}},setup(i){const t=i,o=e.ref("");e.watch([()=>t.name,()=>t.param,()=>t.value,()=>t.slotValue,()=>t.propsText,()=>t.exposeText],()=>{o.value=l.getHmtl(t.name||"",t.param||{},t.value||{},t.slotValue,t.propsText,t.exposeText)},{deep:!0});const s=e.ref(!1);function n(){o.value=l.getHmtl(t.name||"",t.param||{},t.value||{},t.slotValue,t.propsText,t.exposeText)}function a(){s.value=!s.value}function r(){p.copyCode(o.value)}function u(){v.exportStringToFile(o.value,t.name+".vue")}return(f,c)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("div",{onClick:a,class:"set-code-buts"},[c[0]||(c[0]=e.createElementVNode("div",null,"代码",-1)),e.createElementVNode("div",h,e.toDisplayString(s.value?"显示":"隐藏"),1),e.createElementVNode("div",{onClick:e.withModifiers(r,["stop"]),class:"but-div set-code-but"}," 复制 "),e.createElementVNode("div",{onClick:e.withModifiers(u,["stop"]),class:"but-div set-code-but"}," 下载 "),e.createElementVNode("div",{onClick:e.withModifiers(n,["stop"]),class:"but-div set-code-but"}," 刷新 ")]),e.withDirectives(e.createElementVNode("div",x,[e.createVNode(d,{language:"html",code:o.value},null,8,["code"])],512),[[e.vShow,s.value]])]))}});module.exports=b;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { copyCode as
|
|
4
|
-
import { getHmtl as
|
|
5
|
-
|
|
1
|
+
import { defineComponent as v, ref as c, watch as m, createElementBlock as f, openBlock as x, createElementVNode as t, withDirectives as b, toDisplayString as h, withModifiers as l, createVNode as C, vShow as _ } from "vue";
|
|
2
|
+
import k from "../code/highlight.vue.js";
|
|
3
|
+
import { copyCode as y } from "../../utils/index.js";
|
|
4
|
+
import { getHmtl as i } from "./code.js";
|
|
5
|
+
import { exportStringToFile as T } from "../../utils/util.js";
|
|
6
|
+
const g = { class: "set-code" }, V = { class: "but-div set-code-but" }, j = { class: "set-code-html" }, H = /* @__PURE__ */ v({
|
|
6
7
|
__name: "set-code",
|
|
7
8
|
props: {
|
|
8
9
|
name: {
|
|
@@ -24,9 +25,9 @@ const R = { class: "set-code" }, S = { class: "but-div set-code-but" }, L = { cl
|
|
|
24
25
|
type: Object
|
|
25
26
|
}
|
|
26
27
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const e =
|
|
29
|
-
|
|
28
|
+
setup(n) {
|
|
29
|
+
const e = n, o = c("");
|
|
30
|
+
m(
|
|
30
31
|
[
|
|
31
32
|
() => e.name,
|
|
32
33
|
() => e.param,
|
|
@@ -36,7 +37,7 @@ const R = { class: "set-code" }, S = { class: "but-div set-code-but" }, L = { cl
|
|
|
36
37
|
() => e.exposeText
|
|
37
38
|
],
|
|
38
39
|
() => {
|
|
39
|
-
|
|
40
|
+
o.value = i(
|
|
40
41
|
e.name || "",
|
|
41
42
|
e.param || {},
|
|
42
43
|
e.value || {},
|
|
@@ -47,9 +48,9 @@ const R = { class: "set-code" }, S = { class: "but-div set-code-but" }, L = { cl
|
|
|
47
48
|
},
|
|
48
49
|
{ deep: !0 }
|
|
49
50
|
);
|
|
50
|
-
const
|
|
51
|
-
function
|
|
52
|
-
|
|
51
|
+
const s = c(!1);
|
|
52
|
+
function p() {
|
|
53
|
+
o.value = i(
|
|
53
54
|
e.name || "",
|
|
54
55
|
e.param || {},
|
|
55
56
|
e.value || {},
|
|
@@ -58,48 +59,42 @@ const R = { class: "set-code" }, S = { class: "but-div set-code-but" }, L = { cl
|
|
|
58
59
|
e.exposeText
|
|
59
60
|
);
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
function v() {
|
|
65
|
-
V(s.value);
|
|
62
|
+
function u() {
|
|
63
|
+
s.value = !s.value;
|
|
66
64
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
69
|
-
o.href = i, o.download = c, o.style.display = "none", document.body.appendChild(o), o.click(), setTimeout(() => {
|
|
70
|
-
document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
71
|
-
}, 100);
|
|
65
|
+
function r() {
|
|
66
|
+
y(o.value);
|
|
72
67
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
68
|
+
function d() {
|
|
69
|
+
T(o.value, e.name + ".vue");
|
|
75
70
|
}
|
|
76
|
-
return (
|
|
71
|
+
return (w, a) => (x(), f("div", g, [
|
|
77
72
|
t("div", {
|
|
78
|
-
onClick:
|
|
73
|
+
onClick: u,
|
|
79
74
|
class: "set-code-buts"
|
|
80
75
|
}, [
|
|
81
|
-
|
|
82
|
-
t("div",
|
|
76
|
+
a[0] || (a[0] = t("div", null, "代码", -1)),
|
|
77
|
+
t("div", V, h(s.value ? "显示" : "隐藏"), 1),
|
|
83
78
|
t("div", {
|
|
84
|
-
onClick:
|
|
79
|
+
onClick: l(r, ["stop"]),
|
|
85
80
|
class: "but-div set-code-but"
|
|
86
81
|
}, " 复制 "),
|
|
87
82
|
t("div", {
|
|
88
|
-
onClick:
|
|
83
|
+
onClick: l(d, ["stop"]),
|
|
89
84
|
class: "but-div set-code-but"
|
|
90
|
-
}, "
|
|
85
|
+
}, " 下载 "),
|
|
91
86
|
t("div", {
|
|
92
|
-
onClick:
|
|
87
|
+
onClick: l(p, ["stop"]),
|
|
93
88
|
class: "but-div set-code-but"
|
|
94
89
|
}, " 刷新 ")
|
|
95
90
|
]),
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
b(t("div", j, [
|
|
92
|
+
C(k, {
|
|
98
93
|
language: "html",
|
|
99
|
-
code:
|
|
94
|
+
code: o.value
|
|
100
95
|
}, null, 8, ["code"])
|
|
101
96
|
], 512), [
|
|
102
|
-
[
|
|
97
|
+
[_, s.value]
|
|
103
98
|
])
|
|
104
99
|
]));
|
|
105
100
|
}
|
|
@@ -12,6 +12,7 @@ export interface GlobComs {
|
|
|
12
12
|
}
|
|
13
13
|
export interface Component {
|
|
14
14
|
dir: string;
|
|
15
|
+
cwd?: string;
|
|
15
16
|
extensions?: Array<string>;
|
|
16
17
|
alias?: string;
|
|
17
18
|
aliass?: ObjStr;
|
|
@@ -34,6 +35,7 @@ export interface ExampleObj {
|
|
|
34
35
|
tests?: boolean;
|
|
35
36
|
testsNanme?: string;
|
|
36
37
|
dir?: string;
|
|
38
|
+
cwd?: string;
|
|
37
39
|
/**
|
|
38
40
|
* 0 : url 下面就是组件
|
|
39
41
|
* 1 : dir 名称开始
|
|
@@ -73,6 +75,7 @@ export interface Config {
|
|
|
73
75
|
redirect?: boolean;
|
|
74
76
|
useparam?: boolean;
|
|
75
77
|
resolve?: Resolve[];
|
|
78
|
+
directory?: string;
|
|
76
79
|
components: Array<Components>;
|
|
77
80
|
example?: ExampleObj;
|
|
78
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),_=require("../../components/compo/info.vue.cjs"),u=require("../../components/compo/index.vue.cjs"),n=require("../../components/choice/index.vue.cjs"),r={class:"__document-compon"},c=e.defineComponent({__name:"index",setup(
|
|
1
|
+
"use strict";const e=require("vue"),_=require("../../components/compo/info.vue.cjs"),u=require("../../components/compo/index.vue.cjs"),n=require("../../components/choice/index.vue.cjs"),r={class:"__document-compon"},c=e.defineComponent({__name:"index",setup(o){return(s,l)=>(e.openBlock(),e.createElementBlock("div",r,[e.createVNode(n,null,{default:e.withCtx(t=>[e.createVNode(_,{value:t.value},null,8,["value"]),e.createVNode(u,{istop:"",value:t.value},null,8,["value"])]),_:1})]))}});module.exports=c;
|
|
@@ -5,13 +5,14 @@ import r from "../../components/choice/index.vue.js";
|
|
|
5
5
|
const c = { class: "__document-compon" }, x = /* @__PURE__ */ t({
|
|
6
6
|
__name: "index",
|
|
7
7
|
setup(u) {
|
|
8
|
-
return (i,
|
|
8
|
+
return (i, s) => (_(), n("div", c, [
|
|
9
9
|
e(r, null, {
|
|
10
10
|
default: a((o) => [
|
|
11
11
|
e(l, {
|
|
12
12
|
value: o.value
|
|
13
13
|
}, null, 8, ["value"]),
|
|
14
14
|
e(m, {
|
|
15
|
+
istop: "",
|
|
15
16
|
value: o.value
|
|
16
17
|
}, null, 8, ["value"])
|
|
17
18
|
]),
|