@fangzhongya/vue-archive 0.0.54 → 0.0.56
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 +83 -30
- package/dist/node/index.js +83 -30
- package/dist/packages/components/choice/index.vue.cjs +1 -1
- package/dist/packages/components/code/highlight.vue.cjs +1 -1
- package/dist/packages/components/code/index.vue.cjs +1 -1
- package/dist/packages/components/compo/code.vue.cjs +1 -0
- package/dist/packages/components/compo/code.vue.js +21 -0
- package/dist/packages/components/compo/code.vue3.cjs +1 -0
- package/dist/packages/components/compo/code.vue3.js +5 -0
- package/dist/packages/components/compo/index.cjs +1 -1
- package/dist/packages/components/compo/index.js +126 -108
- package/dist/packages/components/main/index.vue.cjs +1 -1
- package/dist/packages/components/main/index.vue.js +36 -32
- package/dist/packages/components/test/index.vue.cjs +1 -1
- package/dist/packages/components/use/code.cjs +10 -10
- package/dist/packages/components/use/code.d.ts +25 -17
- package/dist/packages/components/use/code.js +99 -93
- package/dist/packages/components/use/code.vue.cjs +1 -0
- package/dist/packages/components/use/code.vue.js +66 -0
- package/dist/packages/components/use/code.vue2.cjs +1 -0
- package/dist/packages/components/use/code.vue2.js +4 -0
- package/dist/packages/components/use/edit.cjs +18 -0
- package/dist/packages/components/use/edit.d.ts +32 -0
- package/dist/packages/components/use/edit.js +187 -0
- package/dist/packages/components/use/effect.d.ts +18 -0
- package/dist/packages/components/use/effect.vue.cjs +1 -0
- package/dist/packages/components/use/effect.vue.js +12 -0
- package/dist/packages/components/use/retrie/array/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/boolean/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/expose/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/index.d.ts +1 -1
- package/dist/packages/components/use/retrie/input/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/input/text.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/object/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/other/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/slot/index.vue.cjs +1 -1
- package/dist/packages/components/use/set-code.vue.cjs +1 -1
- package/dist/packages/components/use/set-code.vue.js +17 -58
- package/dist/packages/components/use/util.cjs +3 -3
- package/dist/packages/components/use/util.js +38 -34
- package/dist/packages/page/compon/index.vue2.cjs +1 -1
- package/dist/packages/page/develop/index.vue2.cjs +1 -1
- package/dist/packages/page/edit/index.vue.cjs +1 -0
- package/dist/packages/page/edit/index.vue.js +4 -0
- package/dist/packages/page/edit/index.vue2.cjs +1 -0
- package/dist/packages/page/edit/index.vue2.js +23 -0
- package/dist/packages/router/file.cjs +1 -1
- package/dist/packages/router/file.js +5 -4
- package/dist/packages/router/index.cjs +1 -1
- package/dist/packages/router/index.d.ts +1 -0
- package/dist/packages/router/index.js +55 -45
- package/dist/packages/utils/props.cjs +1 -1
- package/dist/packages/utils/props.js +30 -27
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./highlight.vue2.cjs"),e=require("vue"),r=require("../../../_virtual/_plugin-vue_export-helper.cjs");function
|
|
1
|
+
"use strict";const n=require("./highlight.vue2.cjs"),e=require("vue"),r=require("../../../_virtual/_plugin-vue_export-helper.cjs");function s(o,g,i,l,u,h){const t=e.resolveComponent("highlightjs");return o.code?(e.openBlock(),e.createBlock(t,{key:0,class:"highlightjs",language:o.language,code:o.code},null,8,["language","code"])):e.createCommentVNode("",!0)}const c=r(n,[["render",s]]);module.exports=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),u=require("../boxurl/index.vue.cjs"),x=require("../../router/index.cjs"),w=require("./highlight.vue.cjs"),v=require("../../utils/index.cjs"),d=require("../../utils/glob.cjs"),f=require("../../utils/util.cjs"),_=require("@fangzhongya/utils/urls/getUrlCatalogueObj"),b=require("vue-router"),y={class:"code"},E={class:"code-top"},N={class:"code-top-but"},V={class:"top-but-files"},q=["onClick"],S={class:"code-highlightjs"},B=e.defineComponent({__name:"index",props:{text:String,value:Object},setup(p){const g=b.useRouter(),t=p;e.watch(()=>t.text,()=>{
|
|
1
|
+
"use strict";const e=require("vue"),u=require("../boxurl/index.vue.cjs"),x=require("../../router/index.cjs"),w=require("./highlight.vue.cjs"),v=require("../../utils/index.cjs"),d=require("../../utils/glob.cjs"),f=require("../../utils/util.cjs"),_=require("@fangzhongya/utils/urls/getUrlCatalogueObj"),b=require("vue-router"),y={class:"code"},E={class:"code-top"},N={class:"code-top-but"},V={class:"top-but-files"},q=["onClick"],S={class:"code-highlightjs"},B=e.defineComponent({__name:"index",props:{text:String,value:Object},setup(p){const g=b.useRouter(),t=p;e.watch(()=>t.text,()=>{r()});const c=e.ref([]),o=e.ref(),a=e.ref(!1);function k(){o.value?.raw?v.copyCode(o.value.raw):v.copyCode(t.text)}function h(){if(o.value?.raw){const l=_.getUrlCatalogueObj(o.value?.key),n=t.value?.name+"_"+l.name+"."+l.suffix;f.exportStringToFile(o.value.raw,n)}else{const l=_.getUrlCatalogueObj(t.value?.key),n=t.value?.name+"_"+l.name+"."+l.suffix;f.exportStringToFile(t.text,n)}}function m(){a.value=!a.value}function C(){x.toSingle(g,t.value)}function s(l){a.value=!0,o.value=l}function r(){o.value=void 0,a.value=!1,t.text&&d.getTestImportUrl(t.value,t.text,"vue").then(l=>{d.getLocalTextArr(l).then(n=>{c.value=n.filter(i=>i.raw)})})}return r(),(l,n)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",E,[e.createElementVNode("div",N,[e.createElementVNode("div",{class:"but-div",onClick:C},"go"),e.createElementVNode("div",{class:"but-div",onClick:k},"复制"),e.createElementVNode("div",{class:"but-div",onClick:h},"下载"),e.createElementVNode("div",{class:"but-div",onClick:m},e.toDisplayString(a.value?"隐藏":"显示"),1),e.createElementVNode("div",V,[e.createVNode(u,{value:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:!(o.value&&o.value.value)}]),onClick:n[0]||(n[0]=e.withModifiers(i=>s(),["stop"]))}," index.vue ",2)]),_:1},8,["value"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(i,j)=>(e.openBlock(),e.createBlock(u,{value:i},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["but-div",{on:i.key==o.value?.key}]),onClick:e.withModifiers(D=>s(i),["stop"])},e.toDisplayString(i.value),11,q)]),_:2},1032,["value"]))),256))])])]),e.withDirectives(e.createElementVNode("div",S,[e.createVNode(w,{language:"html",code:o.value?.raw||t.text},null,8,["code"])],512),[[e.vShow,a.value]])]))}});module.exports=B;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),o=require("../use/edit.cjs"),n={class:"compo-code"},s=e.defineComponent({__name:"code",props:{value:{type:Object}},setup(t){const c=t;return(r,u)=>(e.openBlock(),e.createElementBlock("div",n,[e.createVNode(e.unref(o),{value:c.value},null,8,["value"])]))}});module.exports=s;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as t, createElementBlock as c, openBlock as n, createVNode as r, unref as a } from "vue";
|
|
2
|
+
import p from "../use/edit.js";
|
|
3
|
+
const l = { class: "compo-code" }, _ = /* @__PURE__ */ t({
|
|
4
|
+
__name: "code",
|
|
5
|
+
props: {
|
|
6
|
+
value: {
|
|
7
|
+
type: Object
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
setup(e) {
|
|
11
|
+
const o = e;
|
|
12
|
+
return (s, u) => (n(), c("div", l, [
|
|
13
|
+
r(a(p), {
|
|
14
|
+
value: o.value
|
|
15
|
+
}, null, 8, ["value"])
|
|
16
|
+
]));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
_ as default
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./code.vue.cjs");;/* empty css */module.exports=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../../utils/index.cjs");require("@fangzhongya/utils/basic/object/mergeObject");require("@fangzhongya/utils/basic/array/toggleArray");require("@fangzhongya/utils/name/humpToLine");require("@fangzhongya/utils/name/lineToLargeHump");require("@fangzhongya/utils/basic/string/appearNum");require("@fangzhongya/utils/basic/string/firstLower");require("@fangzhongya/utils/basic/array/duplicateRemoval");require("@fangzhongya/utils/basic/array/asyncMergeArray");require("@fangzhongya/utils/basic/string/firstUpper");require("@fangzhongya/utils/urls/getSuffix");require("@fangzhongya/utils/basic/array/replaceAfter");require("@fangzhongya/utils/html/getVueText");const o=require("../../utils/props.cjs"),c={titles:[],propss:[],slots:[],emitss:[],exposes:[]};function x(e,s){let r=e.charAt(0),l=[['"','"'],["'","'"],["`","`"],["(",")"],["{","}"],["[","]"]];const t=l.map(a=>a[0]);if(t.indexOf(r)!=-1){let a=[r];for(let i=1;i<e.length;i++){const p=e[i];if(t.includes(p))a.push(p);else{let f=!1;for(let m of l)if(p===m[1]&&a[a.length-1]===m[0]){f=!0;break}f&&a.pop()}if(a.length===0)return s&&e[i+1]===" ",e.substring(0,i+1)}}else return s?e.substring(0,e.indexOf(" ")):e}function E(e){delete e.problems,delete e.source;let s=e.tag,r=e.name,l=e.description,t=e.default,n="",a="";if(s=="default")r=r.trim(),r=x(r)||r;else if(s=="selectable")r=r.trim();else{if(r.includes("=")){const f=r.split("=");r=f[0];const m=f[1]+" "+l,g=x(m,!0);g?(t=g,l=m.replace(g,"")):t=e.default||f[1]||""}const p=/\s*\((.*)\)\s/gi.exec(l);p&&p.length>0&&(n=p[1],l=l.replace(p[0],""))}return r.endsWith("*")&&(a="*",r=r.substring(0,r.length-1)),e.name=r,e.required=a,e.default=t||"",e.description=l,e.selectable=n,e}function O(e){let s=["title","text","author","date"],r=d(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),h(l),r.arr.forEach(t=>{b(t.key,t.value)})}function h(e){c.titles.push(e)}function T(e){let s=["props","name","type","default","required","selectable","description","descriptions","return"],r=d(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),u(l,"props"),r.arr.forEach(t=>{b(t.key,t.value)})}function y(e){let s=["slot","name","selectable","description","descriptions"],r=d(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),u(l,"slot"),r.arr.forEach(t=>{b(t.key,t.value)})}function k(e){let s=["emits","name","selectable","description","descriptions"],r=d(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),u(l,"emits"),r.arr.forEach(t=>{b(t.key,t.value)})}function j(e){let s=["expose","name","type","return","selectable","description","descriptions"],r=d(e),l={};s.forEach(t=>{l[t]=r.obj[t]}),u(l,"expose"),r.arr.forEach(t=>{b(t.key,t.value)})}function u(e,s){const r=c[s+"name"]||[],l=e.name??e[s]?.name,t=r.indexOf(l);t>=0&&(c[s+"s"].splice(t,1),r.splice(t,1)),c[s+"s"].push(e),r.push(l),c[s+"name"]=r}function S(){Object.keys(c).forEach(e=>{c[e]=[]})}function d(e,s){const r={descriptions:e?.description||""},l=[];return e?.tags&&e.tags?.forEach(t=>{let n=t.tag,a=E(t);if(!r.hasOwnProperty(n))r[n]=a;else{const i={};i[n]=a,l.push({key:n,value:i})}}),{arr:l,obj:r}}function b(e,s){switch(e){case"title":return h(s),!0;case"text":return h(s),!0;case"props":return u(s,"props"),!0;case"slot":return u(s,"slot"),!0;case"emits":return u(s,"emits"),!0;case"expose":return u(s,"expose"),!0;default:return!1}}function w(e,s){switch(e){case"title":return O(s),!0;case"props":return T(s),!0;case"slot":return y(s),!0;case"emits":return k(s),!0;case"expose":return j(s),!0;default:return!1}}function N(e){return S(),e?.forEach(s=>{let r=s?.tags||[],l=r?.length||0;if(l>0)for(let t=0;t<l;t++){const n=r[t]||{};if(w(n.tag,s))break}}),c}function P(e){let s=q.getTextNotes(e);return N(s)}const F=[{label:"属性名",prop:"name",formatter:o.props.name},{label:"说明",prop:"description",formatter:o.props.description},{label:"类型",prop:"type",formatter:o.props.type},{label:"可选值",prop:"selectable",formatter:o.props.selectable},{label:"默认值",prop:"default",formatter:o.props.default},{label:"必传",prop:"required",formatter:o.props.required},{label:"方法返回值",prop:"return",formatter:o.props.return}],v=[{label:"事件名",prop:"name",formatter:o.emits.name},{label:"说明",prop:"description",formatter:o.emits.description},{label:"回调参数",prop:"selectable",formatter:o.emits.selectable}],z=[{label:"方法名",prop:"name",formatter:o.expose.name},{label:"说明",prop:"description",formatter:o.expose.description},{label:"参数",prop:"selectable",formatter:o.expose.selectable},{label:"返回值",prop:"return",formatter(e){return o.expose.return(e)||e.expose.default||""}},{label:"类型",prop:"type",formatter(e){return o.expose.type(e)||"function"}}],A=[{label:"插槽名",prop:"name",formatter:o.slot.name},{label:"说明",prop:"description",formatter:o.slot.description},{label:"作用域参数",prop:"selectable",formatter:o.slot.selectable}];exports.getNotesText=P;exports.temits=v;exports.texpose=z;exports.tprops=F;exports.tslot=A;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getTextNotes as
|
|
1
|
+
import { getTextNotes as T } 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,16 +11,16 @@ 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 u, emits as x, expose as d, slot as E } from "../../utils/props.js";
|
|
15
|
+
const p = {
|
|
16
16
|
titles: [],
|
|
17
17
|
propss: [],
|
|
18
18
|
slots: [],
|
|
19
19
|
emitss: [],
|
|
20
20
|
exposes: []
|
|
21
21
|
};
|
|
22
|
-
function
|
|
23
|
-
let r = e.charAt(0),
|
|
22
|
+
function k(e, l) {
|
|
23
|
+
let r = e.charAt(0), s = [
|
|
24
24
|
['"', '"'],
|
|
25
25
|
["'", "'"],
|
|
26
26
|
["`", "`"],
|
|
@@ -28,49 +28,49 @@ function O(e, s) {
|
|
|
28
28
|
["{", "}"],
|
|
29
29
|
["[", "]"]
|
|
30
30
|
];
|
|
31
|
-
const t =
|
|
31
|
+
const t = s.map((o) => o[0]);
|
|
32
32
|
if (t.indexOf(r) != -1) {
|
|
33
|
-
let
|
|
34
|
-
for (let
|
|
35
|
-
const
|
|
36
|
-
if (t.includes(
|
|
37
|
-
|
|
33
|
+
let o = [r];
|
|
34
|
+
for (let n = 1; n < e.length; n++) {
|
|
35
|
+
const i = e[n];
|
|
36
|
+
if (t.includes(i))
|
|
37
|
+
o.push(i);
|
|
38
38
|
else {
|
|
39
|
-
let
|
|
40
|
-
for (let
|
|
41
|
-
if (
|
|
42
|
-
|
|
39
|
+
let f = !1;
|
|
40
|
+
for (let m of s)
|
|
41
|
+
if (i === m[1] && o[o.length - 1] === m[0]) {
|
|
42
|
+
f = !0;
|
|
43
43
|
break;
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
f && o.pop();
|
|
46
46
|
}
|
|
47
|
-
if (
|
|
48
|
-
return
|
|
47
|
+
if (o.length === 0)
|
|
48
|
+
return l && e[n + 1] === " ", e.substring(0, n + 1);
|
|
49
49
|
}
|
|
50
50
|
} else
|
|
51
|
-
return
|
|
51
|
+
return l ? e.substring(0, e.indexOf(" ")) : e;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function q(e) {
|
|
54
54
|
delete e.problems, delete e.source;
|
|
55
|
-
let
|
|
56
|
-
if (
|
|
57
|
-
r = r.trim(), r =
|
|
58
|
-
else if (
|
|
55
|
+
let l = e.tag, r = e.name, s = e.description, t = e.default, a = "", o = "";
|
|
56
|
+
if (l == "default")
|
|
57
|
+
r = r.trim(), r = k(r) || r;
|
|
58
|
+
else if (l == "selectable")
|
|
59
59
|
r = r.trim();
|
|
60
60
|
else {
|
|
61
61
|
if (r.includes("=")) {
|
|
62
|
-
const
|
|
63
|
-
r =
|
|
64
|
-
const
|
|
65
|
-
|
|
62
|
+
const f = r.split("=");
|
|
63
|
+
r = f[0];
|
|
64
|
+
const m = f[1] + " " + s, g = k(m, !0);
|
|
65
|
+
g ? (t = g, s = m.replace(g, "")) : t = e.default || f[1] || "";
|
|
66
66
|
}
|
|
67
|
-
const
|
|
68
|
-
|
|
67
|
+
const i = /\s*\((.*)\)\s/gi.exec(s);
|
|
68
|
+
i && i.length > 0 && (a = i[1], s = s.replace(i[0], ""));
|
|
69
69
|
}
|
|
70
|
-
return e.name = r, e.default = t || "", e.description =
|
|
70
|
+
return r.endsWith("*") && (o = "*", r = r.substring(0, r.length - 1)), e.name = r, e.required = o, e.default = t || "", e.description = s, e.selectable = a, e;
|
|
71
71
|
}
|
|
72
72
|
function y(e) {
|
|
73
|
-
let
|
|
73
|
+
let l = [
|
|
74
74
|
"title",
|
|
75
75
|
// 'name',
|
|
76
76
|
"text",
|
|
@@ -78,51 +78,52 @@ function y(e) {
|
|
|
78
78
|
"date"
|
|
79
79
|
// 'description',
|
|
80
80
|
// 'descriptions',
|
|
81
|
-
], r = b(e),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}),
|
|
81
|
+
], r = b(e), s = {};
|
|
82
|
+
l.forEach((t) => {
|
|
83
|
+
s[t] = r.obj[t];
|
|
84
|
+
}), O(s), r.arr.forEach((t) => {
|
|
85
85
|
h(t.key, t.value);
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
|
|
88
|
+
function O(e) {
|
|
89
|
+
p.titles.push(e);
|
|
90
90
|
}
|
|
91
91
|
function j(e) {
|
|
92
|
-
let
|
|
92
|
+
let l = [
|
|
93
93
|
"props",
|
|
94
94
|
"name",
|
|
95
95
|
"type",
|
|
96
96
|
"default",
|
|
97
|
+
"required",
|
|
97
98
|
"selectable",
|
|
98
99
|
"description",
|
|
99
100
|
"descriptions",
|
|
100
101
|
"return"
|
|
101
|
-
], r = b(e),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}), c(
|
|
102
|
+
], r = b(e), s = {};
|
|
103
|
+
l.forEach((t) => {
|
|
104
|
+
s[t] = r.obj[t];
|
|
105
|
+
}), c(s, "props"), r.arr.forEach((t) => {
|
|
105
106
|
h(t.key, t.value);
|
|
106
107
|
});
|
|
107
108
|
}
|
|
108
109
|
function w(e) {
|
|
109
|
-
let
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}), c(
|
|
110
|
+
let l = ["slot", "name", "selectable", "description", "descriptions"], r = b(e), s = {};
|
|
111
|
+
l.forEach((t) => {
|
|
112
|
+
s[t] = r.obj[t];
|
|
113
|
+
}), c(s, "slot"), r.arr.forEach((t) => {
|
|
113
114
|
h(t.key, t.value);
|
|
114
115
|
});
|
|
115
116
|
}
|
|
116
117
|
function F(e) {
|
|
117
|
-
let
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}), c(
|
|
118
|
+
let l = ["emits", "name", "selectable", "description", "descriptions"], r = b(e), s = {};
|
|
119
|
+
l.forEach((t) => {
|
|
120
|
+
s[t] = r.obj[t];
|
|
121
|
+
}), c(s, "emits"), r.arr.forEach((t) => {
|
|
121
122
|
h(t.key, t.value);
|
|
122
123
|
});
|
|
123
124
|
}
|
|
124
125
|
function N(e) {
|
|
125
|
-
let
|
|
126
|
+
let l = [
|
|
126
127
|
"expose",
|
|
127
128
|
"name",
|
|
128
129
|
"type",
|
|
@@ -130,132 +131,142 @@ function N(e) {
|
|
|
130
131
|
"selectable",
|
|
131
132
|
"description",
|
|
132
133
|
"descriptions"
|
|
133
|
-
], r = b(e),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}), c(
|
|
134
|
+
], r = b(e), s = {};
|
|
135
|
+
l.forEach((t) => {
|
|
136
|
+
s[t] = r.obj[t];
|
|
137
|
+
}), c(s, "expose"), r.arr.forEach((t) => {
|
|
137
138
|
h(t.key, t.value);
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
|
-
function c(e,
|
|
141
|
-
const r =
|
|
142
|
-
t >= 0 && (
|
|
141
|
+
function c(e, l) {
|
|
142
|
+
const r = p[l + "name"] || [], s = e.name ?? e[l]?.name, t = r.indexOf(s);
|
|
143
|
+
t >= 0 && (p[l + "s"].splice(t, 1), r.splice(t, 1)), p[l + "s"].push(e), r.push(s), p[l + "name"] = r;
|
|
143
144
|
}
|
|
144
145
|
function P() {
|
|
145
|
-
Object.keys(
|
|
146
|
-
|
|
146
|
+
Object.keys(p).forEach((e) => {
|
|
147
|
+
p[e] = [];
|
|
147
148
|
});
|
|
148
149
|
}
|
|
149
|
-
function b(e,
|
|
150
|
+
function b(e, l) {
|
|
150
151
|
const r = {
|
|
151
152
|
descriptions: e?.description || ""
|
|
152
|
-
},
|
|
153
|
+
}, s = [];
|
|
153
154
|
return e?.tags && e.tags?.forEach((t) => {
|
|
154
|
-
let
|
|
155
|
-
if (!r.hasOwnProperty(
|
|
156
|
-
r[
|
|
155
|
+
let a = t.tag, o = q(t);
|
|
156
|
+
if (!r.hasOwnProperty(a))
|
|
157
|
+
r[a] = o;
|
|
157
158
|
else {
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
key:
|
|
161
|
-
value:
|
|
159
|
+
const n = {};
|
|
160
|
+
n[a] = o, s.push({
|
|
161
|
+
key: a,
|
|
162
|
+
value: n
|
|
162
163
|
});
|
|
163
164
|
}
|
|
164
165
|
}), {
|
|
165
|
-
arr:
|
|
166
|
+
arr: s,
|
|
166
167
|
obj: r
|
|
167
168
|
};
|
|
168
169
|
}
|
|
169
|
-
function h(e,
|
|
170
|
+
function h(e, l) {
|
|
170
171
|
switch (e) {
|
|
171
172
|
case "title":
|
|
172
|
-
return
|
|
173
|
+
return O(l), !0;
|
|
173
174
|
case "text":
|
|
174
|
-
return
|
|
175
|
+
return O(l), !0;
|
|
175
176
|
case "props":
|
|
176
|
-
return c(
|
|
177
|
+
return c(l, "props"), !0;
|
|
177
178
|
case "slot":
|
|
178
|
-
return c(
|
|
179
|
+
return c(l, "slot"), !0;
|
|
179
180
|
case "emits":
|
|
180
|
-
return c(
|
|
181
|
+
return c(l, "emits"), !0;
|
|
181
182
|
case "expose":
|
|
182
|
-
return c(
|
|
183
|
+
return c(l, "expose"), !0;
|
|
183
184
|
default:
|
|
184
185
|
return !1;
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
|
-
function S(e,
|
|
188
|
+
function S(e, l) {
|
|
188
189
|
switch (e) {
|
|
189
190
|
case "title":
|
|
190
|
-
return y(
|
|
191
|
+
return y(l), !0;
|
|
191
192
|
case "props":
|
|
192
|
-
return j(
|
|
193
|
+
return j(l), !0;
|
|
193
194
|
case "slot":
|
|
194
|
-
return w(
|
|
195
|
+
return w(l), !0;
|
|
195
196
|
case "emits":
|
|
196
|
-
return F(
|
|
197
|
+
return F(l), !0;
|
|
197
198
|
case "expose":
|
|
198
|
-
return N(
|
|
199
|
+
return N(l), !0;
|
|
199
200
|
default:
|
|
200
201
|
return !1;
|
|
201
202
|
}
|
|
202
203
|
}
|
|
203
|
-
function
|
|
204
|
-
return P(), e?.forEach((
|
|
205
|
-
let r =
|
|
206
|
-
if (
|
|
207
|
-
for (let t = 0; t <
|
|
208
|
-
const
|
|
209
|
-
if (S(
|
|
204
|
+
function z(e) {
|
|
205
|
+
return P(), e?.forEach((l) => {
|
|
206
|
+
let r = l?.tags || [], s = r?.length || 0;
|
|
207
|
+
if (s > 0)
|
|
208
|
+
for (let t = 0; t < s; t++) {
|
|
209
|
+
const a = r[t] || {};
|
|
210
|
+
if (S(a.tag, l))
|
|
210
211
|
break;
|
|
211
212
|
}
|
|
212
|
-
}),
|
|
213
|
+
}), p;
|
|
213
214
|
}
|
|
214
215
|
function Q(e) {
|
|
215
|
-
let
|
|
216
|
-
return
|
|
216
|
+
let l = T(e);
|
|
217
|
+
return z(l);
|
|
217
218
|
}
|
|
218
219
|
const R = [
|
|
219
220
|
{
|
|
220
221
|
label: "属性名",
|
|
221
222
|
prop: "name",
|
|
222
|
-
formatter:
|
|
223
|
+
formatter: u.name
|
|
223
224
|
},
|
|
224
225
|
{
|
|
225
226
|
label: "说明",
|
|
226
227
|
prop: "description",
|
|
227
|
-
formatter:
|
|
228
|
+
formatter: u.description
|
|
228
229
|
},
|
|
229
230
|
{
|
|
230
231
|
label: "类型",
|
|
231
232
|
prop: "type",
|
|
232
|
-
formatter:
|
|
233
|
+
formatter: u.type
|
|
233
234
|
},
|
|
234
235
|
{
|
|
235
236
|
label: "可选值",
|
|
236
237
|
prop: "selectable",
|
|
237
|
-
formatter:
|
|
238
|
+
formatter: u.selectable
|
|
238
239
|
},
|
|
239
240
|
{
|
|
240
241
|
label: "默认值",
|
|
241
242
|
prop: "default",
|
|
242
|
-
formatter:
|
|
243
|
+
formatter: u.default
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
label: "必传",
|
|
247
|
+
prop: "required",
|
|
248
|
+
formatter: u.required
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
label: "方法返回值",
|
|
252
|
+
prop: "return",
|
|
253
|
+
formatter: u.return
|
|
243
254
|
}
|
|
244
255
|
], U = [
|
|
245
256
|
{
|
|
246
257
|
label: "事件名",
|
|
247
258
|
prop: "name",
|
|
248
|
-
formatter:
|
|
259
|
+
formatter: x.name
|
|
249
260
|
},
|
|
250
261
|
{
|
|
251
262
|
label: "说明",
|
|
252
263
|
prop: "description",
|
|
253
|
-
formatter:
|
|
264
|
+
formatter: x.description
|
|
254
265
|
},
|
|
255
266
|
{
|
|
256
267
|
label: "回调参数",
|
|
257
268
|
prop: "selectable",
|
|
258
|
-
formatter:
|
|
269
|
+
formatter: x.selectable
|
|
259
270
|
}
|
|
260
271
|
], V = [
|
|
261
272
|
{
|
|
@@ -275,26 +286,33 @@ const R = [
|
|
|
275
286
|
},
|
|
276
287
|
{
|
|
277
288
|
label: "返回值",
|
|
289
|
+
prop: "return",
|
|
290
|
+
formatter(e) {
|
|
291
|
+
return d.return(e) || e.expose.default || "";
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
label: "类型",
|
|
278
296
|
prop: "type",
|
|
279
297
|
formatter(e) {
|
|
280
|
-
return d.
|
|
298
|
+
return d.type(e) || "function";
|
|
281
299
|
}
|
|
282
300
|
}
|
|
283
|
-
],
|
|
301
|
+
], X = [
|
|
284
302
|
{
|
|
285
303
|
label: "插槽名",
|
|
286
304
|
prop: "name",
|
|
287
|
-
formatter:
|
|
305
|
+
formatter: E.name
|
|
288
306
|
},
|
|
289
307
|
{
|
|
290
308
|
label: "说明",
|
|
291
309
|
prop: "description",
|
|
292
|
-
formatter:
|
|
310
|
+
formatter: E.description
|
|
293
311
|
},
|
|
294
312
|
{
|
|
295
313
|
label: "作用域参数",
|
|
296
314
|
prop: "selectable",
|
|
297
|
-
formatter:
|
|
315
|
+
formatter: E.selectable
|
|
298
316
|
}
|
|
299
317
|
];
|
|
300
318
|
export {
|
|
@@ -302,5 +320,5 @@ export {
|
|
|
302
320
|
U as temits,
|
|
303
321
|
V as texpose,
|
|
304
322
|
R as tprops,
|
|
305
|
-
|
|
323
|
+
X as tslot
|
|
306
324
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),v=require("vue-router"),
|
|
1
|
+
"use strict";const e=require("vue"),v=require("vue-router"),i=require("../../router/index.cjs"),d=require("../compo/index.vue.cjs"),_=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"},E={class:"main-top"},V={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(r){const l=v.useRouter(),n=r,a=e.ref([]);e.watch(()=>n.value,()=>{c()});function c(){a.value=N.getTestName(n.value?.key)}c();function u(o){o==1?i.toCompon(l,n.value):o==2?i.toTests(l,n.value):o==3?i.toDevelop(l,n.value):o==4&&i.toEdit(l,n.value)}return(o,t)=>(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",E,[e.createVNode(_,{value:r.value},null,8,["value"])]),e.createElementVNode("div",V,[e.createVNode(p,{value:r.value},null,8,["value"])]),e.createElementVNode("div",k,[e.createElementVNode("div",{class:"but-div",onClick:t[0]||(t[0]=s=>u(1))},"当前"),e.createElementVNode("div",{class:"but-div",onClick:t[1]||(t[1]=s=>u(2))},"更多"),e.createElementVNode("div",{class:"but-div",onClick:t[2]||(t[2]=s=>u(3))},"开发"),e.createElementVNode("div",{class:"but-div",onClick:t[3]||(t[3]=s=>u(4))},"编辑")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,s=>(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(m,{value:s},null,8,["value"])]))),256)),e.createElementVNode("div",q,[e.createVNode(d,{istop:!1,value:n.value},null,8,["value"])])]))}});module.exports=b;
|
|
@@ -1,64 +1,68 @@
|
|
|
1
|
-
import { defineComponent as d, ref as f, watch as p, createElementBlock as
|
|
1
|
+
import { defineComponent as d, ref as f, watch as p, createElementBlock as v, openBlock as m, createElementVNode as t, createVNode as a, Fragment as _, renderList as $ } from "vue";
|
|
2
2
|
import { useRouter as C } from "vue-router";
|
|
3
|
-
import { toCompon as b, toTests as k, toDevelop as g } from "../../router/index.js";
|
|
4
|
-
import
|
|
3
|
+
import { toCompon as b, toTests as k, toDevelop as g, toEdit as x } from "../../router/index.js";
|
|
4
|
+
import E from "../compo/index.vue.js";
|
|
5
5
|
import N from "../compo/info.vue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { getTestName as
|
|
9
|
-
const
|
|
6
|
+
import B from "../compo/info-top.vue.js";
|
|
7
|
+
import T from "../test/index.vue.js";
|
|
8
|
+
import { getTestName as V } from "../../utils/glob.js";
|
|
9
|
+
const j = { class: "main" }, w = { class: "main-top" }, D = { class: "main-compo-top" }, F = { class: "main-but" }, L = { class: "main-test" }, O = { class: "main-compo" }, J = /* @__PURE__ */ d({
|
|
10
10
|
__name: "index",
|
|
11
11
|
props: {
|
|
12
12
|
value: Object
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
14
|
+
setup(u) {
|
|
15
|
+
const l = C(), o = u, r = f([]);
|
|
16
16
|
p(
|
|
17
|
-
() =>
|
|
17
|
+
() => o.value,
|
|
18
18
|
() => {
|
|
19
19
|
c();
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
function c() {
|
|
23
|
-
r.value =
|
|
23
|
+
r.value = V(o.value?.key);
|
|
24
24
|
}
|
|
25
25
|
c();
|
|
26
|
-
function
|
|
27
|
-
s == 1 ? b(
|
|
26
|
+
function n(s) {
|
|
27
|
+
s == 1 ? b(l, o.value) : s == 2 ? k(l, o.value) : s == 3 ? g(l, o.value) : s == 4 && x(l, o.value);
|
|
28
28
|
}
|
|
29
|
-
return (s,
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
return (s, e) => (m(), v("div", j, [
|
|
30
|
+
t("div", w, [
|
|
31
|
+
a(N, { value: u.value }, null, 8, ["value"])
|
|
32
32
|
]),
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
t("div", D, [
|
|
34
|
+
a(B, { value: u.value }, null, 8, ["value"])
|
|
35
35
|
]),
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
t("div", F, [
|
|
37
|
+
t("div", {
|
|
38
38
|
class: "but-div",
|
|
39
|
-
onClick:
|
|
39
|
+
onClick: e[0] || (e[0] = (i) => n(1))
|
|
40
40
|
}, "当前"),
|
|
41
|
-
|
|
41
|
+
t("div", {
|
|
42
42
|
class: "but-div",
|
|
43
|
-
onClick:
|
|
43
|
+
onClick: e[1] || (e[1] = (i) => n(2))
|
|
44
44
|
}, "更多"),
|
|
45
|
-
|
|
45
|
+
t("div", {
|
|
46
46
|
class: "but-div",
|
|
47
|
-
onClick:
|
|
48
|
-
}, "开发")
|
|
47
|
+
onClick: e[2] || (e[2] = (i) => n(3))
|
|
48
|
+
}, "开发"),
|
|
49
|
+
t("div", {
|
|
50
|
+
class: "but-div",
|
|
51
|
+
onClick: e[3] || (e[3] = (i) => n(4))
|
|
52
|
+
}, "编辑")
|
|
49
53
|
]),
|
|
50
|
-
(
|
|
51
|
-
|
|
54
|
+
(m(!0), v(_, null, $(r.value, (i) => (m(), v("div", L, [
|
|
55
|
+
a(T, { value: i }, null, 8, ["value"])
|
|
52
56
|
]))), 256)),
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
t("div", O, [
|
|
58
|
+
a(E, {
|
|
55
59
|
istop: !1,
|
|
56
|
-
value:
|
|
60
|
+
value: o.value
|
|
57
61
|
}, null, 8, ["value"])
|
|
58
62
|
])
|
|
59
63
|
]));
|
|
60
64
|
}
|
|
61
65
|
});
|
|
62
66
|
export {
|
|
63
|
-
|
|
67
|
+
J as default
|
|
64
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),p=require("../boxurl/index.vue.cjs"),m=require("./top.cjs"),f=require("../code/index.vue.cjs"),x=require("./index.cjs"),y=require("../../utils/glob.cjs"),N={class:"md-top-name"},h={class:"test-top"},k={class:"test-div"},V={class:"test-body"},g={key:0,class:"test-code"},B=e.defineComponent({__name:"index",props:{value:Object,read:{type:Boolean,default:!0}},emits:["state"],setup(i,{emit:d}){const t=i,v=d,
|
|
1
|
+
"use strict";const e=require("vue"),p=require("../boxurl/index.vue.cjs"),m=require("./top.cjs"),f=require("../code/index.vue.cjs"),x=require("./index.cjs"),y=require("../../utils/glob.cjs"),N={class:"md-top-name"},h={class:"test-top"},k={class:"test-div"},V={class:"test-body"},g={key:0,class:"test-code"},B=e.defineComponent({__name:"index",props:{value:Object,read:{type:Boolean,default:!0}},emits:["state"],setup(i,{emit:d}){const t=i,v=d,s=e.ref(""),c=e.ref([]),o=e.ref("1");e.watch([()=>t.value,()=>t.read],()=>{r()});let u;function r(){t.read&&t.value?.key&&y.getLocalTextTests(t.value).then(l=>{s.value=l;let{titles:a,states:_}=x.getNotes(l);c.value=a;const n=_[0];n&&n.type&&(o.value=n.type.type),v("state",o.value,t.value?.key)}).catch(()=>{s.value=""}),t.value?.component&&(u=e.defineAsyncComponent(t.value.component))}return r(),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["test","state-"+o.value])},[e.createVNode(p,{value:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",N,e.toDisplayString(t.value?.value)+" 文件 示例代码 ",1)]),_:1},8,["value"]),e.createElementVNode("div",h,[e.createVNode(e.unref(m.default),{value:c.value},null,8,["value"])]),e.createElementVNode("div",k,[e.createElementVNode("div",V,[(e.openBlock(),e.createBlock(e.Suspense,null,{fallback:e.withCtx(()=>a[0]||(a[0]=[e.createTextVNode(" 示例加载中... ",-1)])),default:e.withCtx(()=>[e.createVNode(e.unref(u))]),_:1}))]),t.read?(e.openBlock(),e.createElementBlock("div",g,[e.createVNode(f,{value:t.value,text:s.value},null,8,["value","text"])])):e.createCommentVNode("",!0)])],2))}});module.exports=B;
|