@fangzhongya/vue-archive 0.0.81 → 0.0.83
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 +15 -7
- package/dist/node/index.js +15 -7
- package/dist/packages/components/choice/index.vue.cjs +1 -1
- package/dist/packages/components/code/index.vue.cjs +1 -1
- package/dist/packages/components/compo/index.cjs +1 -1
- package/dist/packages/components/compo/index.js +98 -98
- package/dist/packages/components/main/index.vue.cjs +1 -1
- package/dist/packages/index/index.vue2.cjs +1 -1
- package/dist/packages/index/index.vue2.js +1 -1
- package/dist/packages/page/index/index.vue2.cjs +1 -1
- package/dist/packages/page/single/index.vue2.cjs +1 -1
- package/package.json +1 -1
package/dist/node/index.cjs
CHANGED
|
@@ -3873,7 +3873,7 @@ var notesObj = {
|
|
|
3873
3873
|
exposes: []
|
|
3874
3874
|
};
|
|
3875
3875
|
function getDefault(ss, iss) {
|
|
3876
|
-
let
|
|
3876
|
+
let char = ss.charAt(0);
|
|
3877
3877
|
let css2 = [
|
|
3878
3878
|
['"', '"'],
|
|
3879
3879
|
["'", "'"],
|
|
@@ -3883,16 +3883,24 @@ function getDefault(ss, iss) {
|
|
|
3883
3883
|
["[", "]"]
|
|
3884
3884
|
];
|
|
3885
3885
|
const cs = css2.map((o) => o[0]);
|
|
3886
|
-
let ci = cs.indexOf(
|
|
3886
|
+
let ci = cs.indexOf(char);
|
|
3887
3887
|
if (ci != -1) {
|
|
3888
|
-
let bracketStack = [
|
|
3888
|
+
let bracketStack = [char];
|
|
3889
3889
|
for (let i = 1; i < ss.length; i++) {
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3890
|
+
char = ss[i];
|
|
3891
|
+
ci = cs.indexOf(char);
|
|
3892
|
+
if (ci != -1) {
|
|
3893
|
+
if (ci > 2) {
|
|
3894
|
+
bracketStack.push(char);
|
|
3895
|
+
} else {
|
|
3896
|
+
if (bracketStack[bracketStack.length - 1] === char) {
|
|
3897
|
+
bracketStack.pop();
|
|
3898
|
+
} else {
|
|
3899
|
+
bracketStack.push(char);
|
|
3900
|
+
}
|
|
3901
|
+
}
|
|
3893
3902
|
} else {
|
|
3894
3903
|
let is = false;
|
|
3895
|
-
char === "]" && bracketStack[bracketStack.length - 1] === "[";
|
|
3896
3904
|
for (let v of css2) {
|
|
3897
3905
|
if (char === v[1] && bracketStack[bracketStack.length - 1] === v[0]) {
|
|
3898
3906
|
is = true;
|
package/dist/node/index.js
CHANGED
|
@@ -3855,7 +3855,7 @@ var notesObj = {
|
|
|
3855
3855
|
exposes: []
|
|
3856
3856
|
};
|
|
3857
3857
|
function getDefault(ss, iss) {
|
|
3858
|
-
let
|
|
3858
|
+
let char = ss.charAt(0);
|
|
3859
3859
|
let css2 = [
|
|
3860
3860
|
['"', '"'],
|
|
3861
3861
|
["'", "'"],
|
|
@@ -3865,16 +3865,24 @@ function getDefault(ss, iss) {
|
|
|
3865
3865
|
["[", "]"]
|
|
3866
3866
|
];
|
|
3867
3867
|
const cs = css2.map((o) => o[0]);
|
|
3868
|
-
let ci = cs.indexOf(
|
|
3868
|
+
let ci = cs.indexOf(char);
|
|
3869
3869
|
if (ci != -1) {
|
|
3870
|
-
let bracketStack = [
|
|
3870
|
+
let bracketStack = [char];
|
|
3871
3871
|
for (let i = 1; i < ss.length; i++) {
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3872
|
+
char = ss[i];
|
|
3873
|
+
ci = cs.indexOf(char);
|
|
3874
|
+
if (ci != -1) {
|
|
3875
|
+
if (ci > 2) {
|
|
3876
|
+
bracketStack.push(char);
|
|
3877
|
+
} else {
|
|
3878
|
+
if (bracketStack[bracketStack.length - 1] === char) {
|
|
3879
|
+
bracketStack.pop();
|
|
3880
|
+
} else {
|
|
3881
|
+
bracketStack.push(char);
|
|
3882
|
+
}
|
|
3883
|
+
}
|
|
3875
3884
|
} else {
|
|
3876
3885
|
let is = false;
|
|
3877
|
-
char === "]" && bracketStack[bracketStack.length - 1] === "[";
|
|
3878
3886
|
for (let v of css2) {
|
|
3879
3887
|
if (char === v[1] && bracketStack[bracketStack.length - 1] === v[0]) {
|
|
3880
3888
|
is = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),d=require("@fangzhongya/utils/name/humpToLine"),g=require("./choice.vue.cjs"),k=require("../../utils/glob.cjs"),y=require("../../utils/common.cjs"),f=require("vue-router"),B=require("../../router/index.cjs"),q={class:"__document-compon"},C={key:0,class:"__document-compon-choice"},N={key:0},E={key:1},
|
|
1
|
+
"use strict";const e=require("vue"),d=require("@fangzhongya/utils/name/humpToLine"),g=require("./choice.vue.cjs"),k=require("../../utils/glob.cjs"),y=require("../../utils/common.cjs"),f=require("vue-router"),B=require("../../router/index.cjs"),q={class:"__document-compon"},C={key:0,class:"__document-compon-choice"},N={key:0},E={key:1},b={key:2},x=e.defineComponent({__name:"index",props:{getName:{type:Function,default(l){return l.id}},getKey:{type:Function,default(l){return l.key}}},emits:["change"],setup(l,{emit:p}){const i=l,u=f.useRoute(),h=B.getPageParams(u),t=e.ref(),n=e.ref([]),a=e.ref(!1),r=p;e.watch(()=>u.query.id,()=>{m()});function m(){let c=d.humpToLine(i.getName(u.query)),o=k.getCompoName(i.getName(u.query),!0,i.getKey(h))||[];if(n.value=[],o.length==1)t.value=o[0],r("change",t.value);else if(o.length==0)t.value=void 0,r("change",t.value);else{n.value=o;for(let s=0;s<o.length;s++){const v=o[s];if(c===d.humpToLine(v.name)){t.value=v,r("change",t.value);break}}}}function _(c){a.value=!1,t.value=c,r("change",t.value),y.setAsideKey(c.key)}return m(),(c,o)=>(e.openBlock(),e.createElementBlock("div",q,[n.value.length?(e.openBlock(),e.createElementBlock("div",C,[a.value?(e.openBlock(),e.createBlock(g,{key:0,onChange:_,value:n.value,choice:t.value},null,8,["value","choice"])):e.createCommentVNode("",!0),e.createElementVNode("div",{onClick:o[0]||(o[0]=s=>a.value=!a.value),class:"__document-compon-choice-but"},e.toDisplayString(a.value?"展开":"隐藏"),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["__document-compon-body",{choice:n.value.length}])},[t.value?.key?(e.openBlock(),e.createElementBlock("div",N,[e.renderSlot(c.$slots,"default",{value:t.value})])):n.value.length?(e.openBlock(),e.createElementBlock("div",E,"请先选择要查看的组件")):(e.openBlock(),e.createElementBlock("div",b,"没有查询到"+e.toDisplayString(e.unref(u).query.id)+"组件",1))],2)]))}});module.exports=x;
|
|
@@ -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"},
|
|
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;
|
|
@@ -1 +1 @@
|
|
|
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");require("@fangzhongya/utils/judge/matchsStart");require("@fangzhongya/utils/judge/matchsEnd");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");require("@fangzhongya/utils/judge/matchsStart");require("@fangzhongya/utils/judge/matchsEnd");const a=require("../../utils/props.cjs"),p={titles:[],propss:[],slots:[],emitss:[],exposes:[]};function x(e,s){let t=e.charAt(0),l=[['"','"'],["'","'"],["`","`"],["(",")"],["{","}"],["[","]"]];const r=l.map(o=>o[0]);let i=r.indexOf(t);if(i!=-1){let o=[t];for(let n=1;n<e.length;n++){if(t=e[n],i=r.indexOf(t),i!=-1)i>2?o.push(t):o[o.length-1]===t?o.pop():o.push(t);else{let c=!1;for(let f of l)if(t===f[1]&&o[o.length-1]===f[0]){c=!0;break}c&&o.pop()}if(o.length===0)return s&&e[n+1]===" ",e.substring(0,n+1)}}else return s?e.substring(0,e.indexOf(" ")):e}function E(e){delete e.problems,delete e.source;let s=e.tag,t=e.name,l=e.description,r=e.default,i="",o="";if(s=="default")t=t.trim(),t=x(t)||t;else if(s=="selectable")t=t.trim();else{if(t.includes("=")){const f=t.split("=");t=f[0];const h=f[1]+" "+l,b=x(h,!0);b?(r=b,l=h.replace(b,"")):r=e.default||f[1]||""}const c=/\s*\((.*)\)\s/gi.exec(l);c&&c.length>0&&(i=c[1],l=l.replace(c[0],""))}return t.endsWith("*")&&(o="*",t=t.substring(0,t.length-1)),e.name=t,e.required=o,e.default=r||"",e.description=l,e.selectable=i,e}function O(e){let s=["title","text","author","date"],t=m(e),l={};s.forEach(r=>{l[r]=t.obj[r]}),g(l),t.arr.forEach(r=>{d(r.key,r.value)})}function g(e){p.titles.push(e)}function T(e){let s=["props","name","type","default","required","selectable","description","descriptions","return"],t=m(e),l={};s.forEach(r=>{l[r]=t.obj[r]}),u(l,"props"),t.arr.forEach(r=>{d(r.key,r.value)})}function y(e){let s=["slot","name","selectable","description","descriptions"],t=m(e),l={};s.forEach(r=>{l[r]=t.obj[r]}),u(l,"slot"),t.arr.forEach(r=>{d(r.key,r.value)})}function k(e){let s=["emits","name","selectable","description","descriptions"],t=m(e),l={};s.forEach(r=>{l[r]=t.obj[r]}),u(l,"emits"),t.arr.forEach(r=>{d(r.key,r.value)})}function j(e){let s=["expose","name","type","return","selectable","description","descriptions"],t=m(e),l={};s.forEach(r=>{l[r]=t.obj[r]}),u(l,"expose"),t.arr.forEach(r=>{d(r.key,r.value)})}function u(e,s){const t=p[s+"name"]||[],l=e.name??e[s]?.name,r=t.indexOf(l);r>=0&&(p[s+"s"].splice(r,1),t.splice(r,1)),p[s+"s"].push(e),t.push(l),p[s+"name"]=t}function S(){Object.keys(p).forEach(e=>{p[e]=[]})}function m(e,s){const t={descriptions:e?.description||""},l=[];return e?.tags&&e.tags?.forEach(r=>{let i=r.tag,o=E(r);if(!t.hasOwnProperty(i))t[i]=o;else{const n={};n[i]=o,l.push({key:i,value:n})}}),{arr:l,obj:t}}function d(e,s){switch(e){case"title":return g(s),!0;case"text":return g(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 t=s?.tags||[],l=t?.length||0;if(l>0)for(let r=0;r<l;r++){const i=t[r]||{};if(w(i.tag,s))break}}),p}function P(e){let s=q.getTextNotes(e);return N(s)}const F=[{label:"属性名",prop:"name",formatter:a.props.name},{label:"说明",prop:"description",formatter:a.props.description},{label:"类型",prop:"type",formatter:a.props.type},{label:"可选值",prop:"selectable",formatter:a.props.selectable},{label:"默认值",prop:"default",formatter:a.props.default},{label:"必传",prop:"required",formatter:a.props.required},{label:"方法返回值",prop:"return",formatter:a.props.return}],v=[{label:"事件名",prop:"name",formatter:a.emits.name},{label:"说明",prop:"description",formatter:a.emits.description},{label:"回调参数",prop:"selectable",formatter:a.emits.selectable}],z=[{label:"方法名",prop:"name",formatter:a.expose.name},{label:"说明",prop:"description",formatter:a.expose.description},{label:"参数",prop:"selectable",formatter:a.expose.selectable},{label:"返回值",prop:"return",formatter(e){return a.expose.return(e)||e.expose.default||""}},{label:"类型",prop:"type",formatter(e){return a.expose.type(e)||"function"}}],A=[{label:"插槽名",prop:"name",formatter:a.slot.name},{label:"说明",prop:"description",formatter:a.slot.description},{label:"作用域参数",prop:"selectable",formatter:a.slot.selectable}];exports.getNotesText=P;exports.temits=v;exports.texpose=z;exports.tprops=F;exports.tslot=A;
|
|
@@ -13,8 +13,8 @@ import "@fangzhongya/utils/basic/array/replaceAfter";
|
|
|
13
13
|
import "@fangzhongya/utils/html/getVueText";
|
|
14
14
|
import "@fangzhongya/utils/judge/matchsStart";
|
|
15
15
|
import "@fangzhongya/utils/judge/matchsEnd";
|
|
16
|
-
import { props as
|
|
17
|
-
const
|
|
16
|
+
import { props as f, emits as g, expose as m, slot as x } from "../../utils/props.js";
|
|
17
|
+
const n = {
|
|
18
18
|
titles: [],
|
|
19
19
|
propss: [],
|
|
20
20
|
slots: [],
|
|
@@ -22,7 +22,7 @@ const p = {
|
|
|
22
22
|
exposes: []
|
|
23
23
|
};
|
|
24
24
|
function k(e, l) {
|
|
25
|
-
let
|
|
25
|
+
let t = e.charAt(0), s = [
|
|
26
26
|
['"', '"'],
|
|
27
27
|
["'", "'"],
|
|
28
28
|
["`", "`"],
|
|
@@ -30,46 +30,46 @@ function k(e, l) {
|
|
|
30
30
|
["{", "}"],
|
|
31
31
|
["[", "]"]
|
|
32
32
|
];
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (t.
|
|
39
|
-
o.push(
|
|
33
|
+
const r = s.map((o) => o[0]);
|
|
34
|
+
let a = r.indexOf(t);
|
|
35
|
+
if (a != -1) {
|
|
36
|
+
let o = [t];
|
|
37
|
+
for (let i = 1; i < e.length; i++) {
|
|
38
|
+
if (t = e[i], a = r.indexOf(t), a != -1)
|
|
39
|
+
a > 2 ? o.push(t) : o[o.length - 1] === t ? o.pop() : o.push(t);
|
|
40
40
|
else {
|
|
41
|
-
let
|
|
42
|
-
for (let
|
|
43
|
-
if (
|
|
44
|
-
|
|
41
|
+
let c = !1;
|
|
42
|
+
for (let u of s)
|
|
43
|
+
if (t === u[1] && o[o.length - 1] === u[0]) {
|
|
44
|
+
c = !0;
|
|
45
45
|
break;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
c && o.pop();
|
|
48
48
|
}
|
|
49
49
|
if (o.length === 0)
|
|
50
|
-
return l && e[
|
|
50
|
+
return l && e[i + 1] === " ", e.substring(0, i + 1);
|
|
51
51
|
}
|
|
52
52
|
} else
|
|
53
53
|
return l ? e.substring(0, e.indexOf(" ")) : e;
|
|
54
54
|
}
|
|
55
55
|
function q(e) {
|
|
56
56
|
delete e.problems, delete e.source;
|
|
57
|
-
let l = e.tag,
|
|
57
|
+
let l = e.tag, t = e.name, s = e.description, r = e.default, a = "", o = "";
|
|
58
58
|
if (l == "default")
|
|
59
|
-
|
|
59
|
+
t = t.trim(), t = k(t) || t;
|
|
60
60
|
else if (l == "selectable")
|
|
61
|
-
|
|
61
|
+
t = t.trim();
|
|
62
62
|
else {
|
|
63
|
-
if (
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
|
|
63
|
+
if (t.includes("=")) {
|
|
64
|
+
const u = t.split("=");
|
|
65
|
+
t = u[0];
|
|
66
|
+
const O = u[1] + " " + s, h = k(O, !0);
|
|
67
|
+
h ? (r = h, s = O.replace(h, "")) : r = e.default || u[1] || "";
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
|
|
69
|
+
const c = /\s*\((.*)\)\s/gi.exec(s);
|
|
70
|
+
c && c.length > 0 && (a = c[1], s = s.replace(c[0], ""));
|
|
71
71
|
}
|
|
72
|
-
return
|
|
72
|
+
return t.endsWith("*") && (o = "*", t = t.substring(0, t.length - 1)), e.name = t, e.required = o, e.default = r || "", e.description = s, e.selectable = a, e;
|
|
73
73
|
}
|
|
74
74
|
function y(e) {
|
|
75
75
|
let l = [
|
|
@@ -80,15 +80,15 @@ function y(e) {
|
|
|
80
80
|
"date"
|
|
81
81
|
// 'description',
|
|
82
82
|
// 'descriptions',
|
|
83
|
-
],
|
|
84
|
-
l.forEach((
|
|
85
|
-
s[
|
|
86
|
-
}),
|
|
87
|
-
|
|
83
|
+
], t = d(e), s = {};
|
|
84
|
+
l.forEach((r) => {
|
|
85
|
+
s[r] = t.obj[r];
|
|
86
|
+
}), E(s), t.arr.forEach((r) => {
|
|
87
|
+
b(r.key, r.value);
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
|
|
90
|
+
function E(e) {
|
|
91
|
+
n.titles.push(e);
|
|
92
92
|
}
|
|
93
93
|
function j(e) {
|
|
94
94
|
let l = [
|
|
@@ -101,27 +101,27 @@ function j(e) {
|
|
|
101
101
|
"description",
|
|
102
102
|
"descriptions",
|
|
103
103
|
"return"
|
|
104
|
-
],
|
|
105
|
-
l.forEach((
|
|
106
|
-
s[
|
|
107
|
-
}),
|
|
108
|
-
|
|
104
|
+
], t = d(e), s = {};
|
|
105
|
+
l.forEach((r) => {
|
|
106
|
+
s[r] = t.obj[r];
|
|
107
|
+
}), p(s, "props"), t.arr.forEach((r) => {
|
|
108
|
+
b(r.key, r.value);
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
function w(e) {
|
|
112
|
-
let l = ["slot", "name", "selectable", "description", "descriptions"],
|
|
113
|
-
l.forEach((
|
|
114
|
-
s[
|
|
115
|
-
}),
|
|
116
|
-
|
|
112
|
+
let l = ["slot", "name", "selectable", "description", "descriptions"], t = d(e), s = {};
|
|
113
|
+
l.forEach((r) => {
|
|
114
|
+
s[r] = t.obj[r];
|
|
115
|
+
}), p(s, "slot"), t.arr.forEach((r) => {
|
|
116
|
+
b(r.key, r.value);
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
function F(e) {
|
|
120
|
-
let l = ["emits", "name", "selectable", "description", "descriptions"],
|
|
121
|
-
l.forEach((
|
|
122
|
-
s[
|
|
123
|
-
}),
|
|
124
|
-
|
|
120
|
+
let l = ["emits", "name", "selectable", "description", "descriptions"], t = d(e), s = {};
|
|
121
|
+
l.forEach((r) => {
|
|
122
|
+
s[r] = t.obj[r];
|
|
123
|
+
}), p(s, "emits"), t.arr.forEach((r) => {
|
|
124
|
+
b(r.key, r.value);
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
function N(e) {
|
|
@@ -133,56 +133,56 @@ function N(e) {
|
|
|
133
133
|
"selectable",
|
|
134
134
|
"description",
|
|
135
135
|
"descriptions"
|
|
136
|
-
],
|
|
137
|
-
l.forEach((
|
|
138
|
-
s[
|
|
139
|
-
}),
|
|
140
|
-
|
|
136
|
+
], t = d(e), s = {};
|
|
137
|
+
l.forEach((r) => {
|
|
138
|
+
s[r] = t.obj[r];
|
|
139
|
+
}), p(s, "expose"), t.arr.forEach((r) => {
|
|
140
|
+
b(r.key, r.value);
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
const
|
|
145
|
-
|
|
143
|
+
function p(e, l) {
|
|
144
|
+
const t = n[l + "name"] || [], s = e.name ?? e[l]?.name, r = t.indexOf(s);
|
|
145
|
+
r >= 0 && (n[l + "s"].splice(r, 1), t.splice(r, 1)), n[l + "s"].push(e), t.push(s), n[l + "name"] = t;
|
|
146
146
|
}
|
|
147
147
|
function P() {
|
|
148
|
-
Object.keys(
|
|
149
|
-
|
|
148
|
+
Object.keys(n).forEach((e) => {
|
|
149
|
+
n[e] = [];
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
const
|
|
152
|
+
function d(e, l) {
|
|
153
|
+
const t = {
|
|
154
154
|
descriptions: e?.description || ""
|
|
155
155
|
}, s = [];
|
|
156
|
-
return e?.tags && e.tags?.forEach((
|
|
157
|
-
let a =
|
|
158
|
-
if (!
|
|
159
|
-
|
|
156
|
+
return e?.tags && e.tags?.forEach((r) => {
|
|
157
|
+
let a = r.tag, o = q(r);
|
|
158
|
+
if (!t.hasOwnProperty(a))
|
|
159
|
+
t[a] = o;
|
|
160
160
|
else {
|
|
161
|
-
const
|
|
162
|
-
|
|
161
|
+
const i = {};
|
|
162
|
+
i[a] = o, s.push({
|
|
163
163
|
key: a,
|
|
164
|
-
value:
|
|
164
|
+
value: i
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
167
|
}), {
|
|
168
168
|
arr: s,
|
|
169
|
-
obj:
|
|
169
|
+
obj: t
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function b(e, l) {
|
|
173
173
|
switch (e) {
|
|
174
174
|
case "title":
|
|
175
|
-
return
|
|
175
|
+
return E(l), !0;
|
|
176
176
|
case "text":
|
|
177
|
-
return
|
|
177
|
+
return E(l), !0;
|
|
178
178
|
case "props":
|
|
179
|
-
return
|
|
179
|
+
return p(l, "props"), !0;
|
|
180
180
|
case "slot":
|
|
181
|
-
return
|
|
181
|
+
return p(l, "slot"), !0;
|
|
182
182
|
case "emits":
|
|
183
|
-
return
|
|
183
|
+
return p(l, "emits"), !0;
|
|
184
184
|
case "expose":
|
|
185
|
-
return
|
|
185
|
+
return p(l, "expose"), !0;
|
|
186
186
|
default:
|
|
187
187
|
return !1;
|
|
188
188
|
}
|
|
@@ -205,14 +205,14 @@ function S(e, l) {
|
|
|
205
205
|
}
|
|
206
206
|
function z(e) {
|
|
207
207
|
return P(), e?.forEach((l) => {
|
|
208
|
-
let
|
|
208
|
+
let t = l?.tags || [], s = t?.length || 0;
|
|
209
209
|
if (s > 0)
|
|
210
|
-
for (let
|
|
211
|
-
const a = r
|
|
210
|
+
for (let r = 0; r < s; r++) {
|
|
211
|
+
const a = t[r] || {};
|
|
212
212
|
if (S(a.tag, l))
|
|
213
213
|
break;
|
|
214
214
|
}
|
|
215
|
-
}),
|
|
215
|
+
}), n;
|
|
216
216
|
}
|
|
217
217
|
function U(e) {
|
|
218
218
|
let l = T(e);
|
|
@@ -222,99 +222,99 @@ const V = [
|
|
|
222
222
|
{
|
|
223
223
|
label: "属性名",
|
|
224
224
|
prop: "name",
|
|
225
|
-
formatter:
|
|
225
|
+
formatter: f.name
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
228
|
label: "说明",
|
|
229
229
|
prop: "description",
|
|
230
|
-
formatter:
|
|
230
|
+
formatter: f.description
|
|
231
231
|
},
|
|
232
232
|
{
|
|
233
233
|
label: "类型",
|
|
234
234
|
prop: "type",
|
|
235
|
-
formatter:
|
|
235
|
+
formatter: f.type
|
|
236
236
|
},
|
|
237
237
|
{
|
|
238
238
|
label: "可选值",
|
|
239
239
|
prop: "selectable",
|
|
240
|
-
formatter:
|
|
240
|
+
formatter: f.selectable
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
label: "默认值",
|
|
244
244
|
prop: "default",
|
|
245
|
-
formatter:
|
|
245
|
+
formatter: f.default
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
248
|
label: "必传",
|
|
249
249
|
prop: "required",
|
|
250
|
-
formatter:
|
|
250
|
+
formatter: f.required
|
|
251
251
|
},
|
|
252
252
|
{
|
|
253
253
|
label: "方法返回值",
|
|
254
254
|
prop: "return",
|
|
255
|
-
formatter:
|
|
255
|
+
formatter: f.return
|
|
256
256
|
}
|
|
257
257
|
], X = [
|
|
258
258
|
{
|
|
259
259
|
label: "事件名",
|
|
260
260
|
prop: "name",
|
|
261
|
-
formatter:
|
|
261
|
+
formatter: g.name
|
|
262
262
|
},
|
|
263
263
|
{
|
|
264
264
|
label: "说明",
|
|
265
265
|
prop: "description",
|
|
266
|
-
formatter:
|
|
266
|
+
formatter: g.description
|
|
267
267
|
},
|
|
268
268
|
{
|
|
269
269
|
label: "回调参数",
|
|
270
270
|
prop: "selectable",
|
|
271
|
-
formatter:
|
|
271
|
+
formatter: g.selectable
|
|
272
272
|
}
|
|
273
273
|
], Y = [
|
|
274
274
|
{
|
|
275
275
|
label: "方法名",
|
|
276
276
|
prop: "name",
|
|
277
|
-
formatter:
|
|
277
|
+
formatter: m.name
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
280
|
label: "说明",
|
|
281
281
|
prop: "description",
|
|
282
|
-
formatter:
|
|
282
|
+
formatter: m.description
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
285
|
label: "参数",
|
|
286
286
|
prop: "selectable",
|
|
287
|
-
formatter:
|
|
287
|
+
formatter: m.selectable
|
|
288
288
|
},
|
|
289
289
|
{
|
|
290
290
|
label: "返回值",
|
|
291
291
|
prop: "return",
|
|
292
292
|
formatter(e) {
|
|
293
|
-
return
|
|
293
|
+
return m.return(e) || e.expose.default || "";
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
296
|
{
|
|
297
297
|
label: "类型",
|
|
298
298
|
prop: "type",
|
|
299
299
|
formatter(e) {
|
|
300
|
-
return
|
|
300
|
+
return m.type(e) || "function";
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
], Z = [
|
|
304
304
|
{
|
|
305
305
|
label: "插槽名",
|
|
306
306
|
prop: "name",
|
|
307
|
-
formatter:
|
|
307
|
+
formatter: x.name
|
|
308
308
|
},
|
|
309
309
|
{
|
|
310
310
|
label: "说明",
|
|
311
311
|
prop: "description",
|
|
312
|
-
formatter:
|
|
312
|
+
formatter: x.description
|
|
313
313
|
},
|
|
314
314
|
{
|
|
315
315
|
label: "作用域参数",
|
|
316
316
|
prop: "selectable",
|
|
317
|
-
formatter:
|
|
317
|
+
formatter: x.selectable
|
|
318
318
|
}
|
|
319
319
|
];
|
|
320
320
|
export {
|
|
@@ -1 +1 @@
|
|
|
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"),
|
|
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 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),t=require("vue-router"),n={class:"__document"},
|
|
1
|
+
"use strict";const e=require("vue"),t=require("vue-router"),n={class:"__document"},o=e.defineComponent({__name:"index",setup(r){return(c,s)=>(e.openBlock(),e.createElementBlock("div",n,[e.createVNode(e.unref(t.RouterView))]))}});module.exports=o;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as e, createElementBlock as o, openBlock as t, createVNode as n, unref as r } from "vue";
|
|
2
|
-
import c from "vue-router";
|
|
2
|
+
import { RouterView as c } from "vue-router";
|
|
3
3
|
const _ = { class: "__document" }, d = /* @__PURE__ */ e({
|
|
4
4
|
__name: "index",
|
|
5
5
|
setup(m) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),c=require("../../directives/adjust/index.cjs"),d=require("../../components/aside/index.vue.cjs"),a=require("../../components/header/index.vue.cjs"),r=require("../../components/main/index.vue.cjs"),u=require("../../utils/glob.cjs"),_=require("vue-router"),l={class:"__document-index"},v={class:"index-aside"},m={class:"index-aside-div"},h={class:"index-body"},p={class:"index-div"},x={class:"index-header"},q={class:"index-main"},N={class:"index-main-div"},
|
|
1
|
+
"use strict";const e=require("vue"),c=require("../../directives/adjust/index.cjs"),d=require("../../components/aside/index.vue.cjs"),a=require("../../components/header/index.vue.cjs"),r=require("../../components/main/index.vue.cjs"),u=require("../../utils/glob.cjs"),_=require("vue-router"),l={class:"__document-index"},v={class:"index-aside"},m={class:"index-aside-div"},h={class:"index-body"},p={class:"index-div"},x={class:"index-header"},q={class:"index-main"},N={class:"index-main-div"},g=e.defineComponent({__name:"index",setup(E){const n=_.useRoute(),t=e.ref({});function s(i){t.value=i}e.watch(()=>n.query?.id,()=>{o()});function o(){n.query?.id&&(t.value=u.getCompoName(n.query.id+"")[0])}return o(),(i,V)=>(e.openBlock(),e.createElementBlock("div",l,[e.withDirectives((e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("div",m,[e.createVNode(d,{value:t.value,onChange:s},null,8,["value"])])])),[[e.unref(c),{right:{}}]]),e.createElementVNode("div",h,[e.createElementVNode("div",p,[e.createElementVNode("div",x,[e.createVNode(a)]),e.createElementVNode("div",q,[e.createElementVNode("div",N,[(e.openBlock(),e.createBlock(r,{key:t.value?.name,value:t.value},null,8,["value"]))])])])])]))}});module.exports=g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),d=require("../../components/compo/info.vue.cjs"),v=require("../../components/choice/index.vue.cjs"),p=require("../../components/test/index.vue.cjs"),g=require("../../components/compo/index.vue.cjs"),m=require("../../utils/glob.cjs"),N=require("vue-router"),y=require("../../router/index.cjs"),V={class:"__document-com __document-single"},f={class:"single-top-li"},h={class:"single-top-li-span"},E={class:"single-top-li-span"},q={class:"single-top-li"},k={class:"single-top-li-span"},x={class:"single-test"},
|
|
1
|
+
"use strict";const e=require("vue"),d=require("../../components/compo/info.vue.cjs"),v=require("../../components/choice/index.vue.cjs"),p=require("../../components/test/index.vue.cjs"),g=require("../../components/compo/index.vue.cjs"),m=require("../../utils/glob.cjs"),N=require("vue-router"),y=require("../../router/index.cjs"),V={class:"__document-com __document-single"},f={class:"single-top-li"},h={class:"single-top-li-span"},E={class:"single-top-li-span"},q={class:"single-top-li"},k={class:"single-top-li-span"},x={class:"single-test"},S={class:"single-compo"},w=e.defineComponent({__name:"index",setup(C){const i=N.useRoute(),a=y.getPageParams(i),n=e.ref({}),s=e.ref(),o=e.ref(!1);function u(t){return t.comkey}function c(t){return(t.id||"").split("/")[0]||""}function r(){o.value=!o.value}function _(t){n.value=t,s.value=m.getTestNameObj(i.query.id+"",a.key,t.key)[0]}return(t,l)=>(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(v,{"get-name":c,"get-key":u,onChange:_},{default:e.withCtx(()=>[e.createVNode(d,{value:n.value},null,8,["value"]),e.createElementVNode("div",{class:"single-top",onClick:r},[e.createElementVNode("div",f,[e.createElementVNode("div",h,e.toDisplayString(s.value?.name),1),e.createElementVNode("div",E,e.toDisplayString(s.value?.value),1)]),e.createElementVNode("div",q,[l[0]||(l[0]=e.createElementVNode("div",{class:"single-top-li-span"},"文件路径",-1)),e.createElementVNode("div",k,e.toDisplayString(s.value?.key),1)])]),e.createElementVNode("div",x,[e.createVNode(p,{value:s.value},null,8,["value"])]),e.withDirectives(e.createElementVNode("div",S,[e.createVNode(g,{value:n.value},null,8,["value"])],512),[[e.vShow,o.value]])]),_:1})]))}});module.exports=w;
|