左侧菜单宽度拖动改变优化

This commit is contained in:
暮光:城中城
2021-12-07 22:48:56 +08:00
parent 1c747054bb
commit 6eda8f48c7
25 changed files with 146 additions and 153 deletions

View File

@@ -1 +1 @@
import{u as S,ak as w,r as c,o as a,c as l,w as t,a as o,m as g,t as n,b as i,F as f,k as s,e as m,d as M}from"./vendor.2a860d56.js";import{m as j}from"./mavon-editor.824ddc3c.js";import"./index.c860d973.js";import{_ as B}from"./main.e2223e67.js";const C={setup(){const _=S(),D=w(()=>_.state.swaggerDoc),u=w(()=>_.state.swaggerDoc.info),e=w(()=>_.state.swaggerMethodStatistic);return{swaggerDoc:D,swaggerDocInfo:u,swaggerMethodStatistic:e,getDescription:I=>j.exports.markdownIt.render(I||"")}}},N=["href"],V=["href"],L=["href"],O=["innerHTML"],T={key:1,style:{"text-align":"center"}};function E(_,D,u,e,p,I){const r=c("a-form-item"),k=c("a-divider"),v=c("a-statistic"),h=c("a-card"),b=c("a-col"),y=c("a-row"),x=c("a-form");return a(),l(h,null,{default:t(()=>[e.swaggerDocInfo?(a(),l(x,{key:0,"label-col":{span:4},"wrapper-col":{span:20}},{default:t(()=>[o(r,{label:"\u6807\u9898"},{default:t(()=>[g(n(e.swaggerDocInfo.title),1)]),_:1}),o(r,{label:"\u7248\u672C"},{default:t(()=>[g(n(e.swaggerDocInfo.version),1)]),_:1}),e.swaggerDocInfo.contact?(a(),l(r,{key:0,label:"\u4F5C\u8005"},{default:t(()=>[e.swaggerDocInfo.contact.name?(a(),i(f,{key:0},[g(n(e.swaggerDocInfo.contact.name),1)],64)):s("",!0),e.swaggerDocInfo.contact.email?(a(),i(f,{key:1},[o(k,{type:"vertical"}),g(n(e.swaggerDocInfo.contact.email),1)],64)):s("",!0),e.swaggerDocInfo.contact.url?(a(),i(f,{key:2},[o(k,{type:"vertical"}),m("a",{href:e.swaggerDocInfo.contact.url,target:"_blank"},n(e.swaggerDocInfo.contact.url),9,N)],64)):s("",!0)]),_:1})):s("",!0),o(r,{label:"host"},{default:t(()=>[g(n(e.swaggerDoc.host),1)]),_:1}),e.swaggerDocInfo.license?(a(),l(r,{key:1,label:"\u8BB8\u53EF\u8BC1"},{default:t(()=>[m("a",{href:e.swaggerDocInfo.license.url,target:"_blank"},n(e.swaggerDocInfo.license.name),9,V)]),_:1})):s("",!0),e.swaggerDocInfo.termsOfService?(a(),l(r,{key:2,label:"\u670D\u52A1\u6761\u6B3E"},{default:t(()=>[m("a",{href:e.swaggerDocInfo.termsOfService,target:"_blank"},n(e.swaggerDocInfo.termsOfService),9,L)]),_:1})):s("",!0),o(r,{label:"\u6587\u6863\u8BF4\u660E"},{default:t(()=>[m("div",{class:"markdown-body",innerHTML:e.getDescription(e.swaggerDocInfo.description)},null,8,O)]),_:1}),o(r,{label:"\u63A5\u53E3\u7EDF\u8BA1"},{default:t(()=>[o(y,{gutter:[16,16]},{default:t(()=>[(a(),i(f,null,M(["get","post","put","delete","head","patch","options","trace","total"],d=>(a(),i(f,null,[e.swaggerMethodStatistic[d]?(a(),l(b,{key:0,span:6},{default:t(()=>[o(h,{size:"small"},{default:t(()=>[o(v,{title:d==="total"?"\u603B\u8BA1":d.toUpperCase()+"\u65B9\u6CD5",value:e.swaggerMethodStatistic[d],suffix:"\u4E2A"},null,8,["title","value"])]),_:2},1024)]),_:2},1024)):s("",!0)],64))),64))]),_:1})]),_:1})]),_:1})):(a(),i("div",T,"\u6682\u65E0\u6587\u6863\u4FE1\u606F\uFF0C\u8BF7\u5148\u9009\u62E9\u6587\u6863"))]),_:1})}var q=B(C,[["render",E]]);export{q as default};
import{u as S,ak as w,r as c,o as a,c as l,w as t,a as o,m as g,t as n,b as i,F as f,k as s,e as m,d as M}from"./vendor.2a860d56.js";import{m as j}from"./mavon-editor.824ddc3c.js";import"./index.c860d973.js";import{_ as B}from"./main.4232e7c8.js";const C={setup(){const _=S(),D=w(()=>_.state.swaggerDoc),u=w(()=>_.state.swaggerDoc.info),e=w(()=>_.state.swaggerMethodStatistic);return{swaggerDoc:D,swaggerDocInfo:u,swaggerMethodStatistic:e,getDescription:I=>j.exports.markdownIt.render(I||"")}}},N=["href"],V=["href"],L=["href"],O=["innerHTML"],T={key:1,style:{"text-align":"center"}};function E(_,D,u,e,p,I){const r=c("a-form-item"),k=c("a-divider"),v=c("a-statistic"),h=c("a-card"),b=c("a-col"),y=c("a-row"),x=c("a-form");return a(),l(h,null,{default:t(()=>[e.swaggerDocInfo?(a(),l(x,{key:0,"label-col":{span:4},"wrapper-col":{span:20}},{default:t(()=>[o(r,{label:"\u6807\u9898"},{default:t(()=>[g(n(e.swaggerDocInfo.title),1)]),_:1}),o(r,{label:"\u7248\u672C"},{default:t(()=>[g(n(e.swaggerDocInfo.version),1)]),_:1}),e.swaggerDocInfo.contact?(a(),l(r,{key:0,label:"\u4F5C\u8005"},{default:t(()=>[e.swaggerDocInfo.contact.name?(a(),i(f,{key:0},[g(n(e.swaggerDocInfo.contact.name),1)],64)):s("",!0),e.swaggerDocInfo.contact.email?(a(),i(f,{key:1},[o(k,{type:"vertical"}),g(n(e.swaggerDocInfo.contact.email),1)],64)):s("",!0),e.swaggerDocInfo.contact.url?(a(),i(f,{key:2},[o(k,{type:"vertical"}),m("a",{href:e.swaggerDocInfo.contact.url,target:"_blank"},n(e.swaggerDocInfo.contact.url),9,N)],64)):s("",!0)]),_:1})):s("",!0),o(r,{label:"host"},{default:t(()=>[g(n(e.swaggerDoc.host),1)]),_:1}),e.swaggerDocInfo.license?(a(),l(r,{key:1,label:"\u8BB8\u53EF\u8BC1"},{default:t(()=>[m("a",{href:e.swaggerDocInfo.license.url,target:"_blank"},n(e.swaggerDocInfo.license.name),9,V)]),_:1})):s("",!0),e.swaggerDocInfo.termsOfService?(a(),l(r,{key:2,label:"\u670D\u52A1\u6761\u6B3E"},{default:t(()=>[m("a",{href:e.swaggerDocInfo.termsOfService,target:"_blank"},n(e.swaggerDocInfo.termsOfService),9,L)]),_:1})):s("",!0),o(r,{label:"\u6587\u6863\u8BF4\u660E"},{default:t(()=>[m("div",{class:"markdown-body",innerHTML:e.getDescription(e.swaggerDocInfo.description)},null,8,O)]),_:1}),o(r,{label:"\u63A5\u53E3\u7EDF\u8BA1"},{default:t(()=>[o(y,{gutter:[16,16]},{default:t(()=>[(a(),i(f,null,M(["get","post","put","delete","head","patch","options","trace","total"],d=>(a(),i(f,null,[e.swaggerMethodStatistic[d]?(a(),l(b,{key:0,span:6},{default:t(()=>[o(h,{size:"small"},{default:t(()=>[o(v,{title:d==="total"?"\u603B\u8BA1":d.toUpperCase()+"\u65B9\u6CD5",value:e.swaggerMethodStatistic[d],suffix:"\u4E2A"},null,8,["title","value"])]),_:2},1024)]),_:2},1024)):s("",!0)],64))),64))]),_:1})]),_:1})]),_:1})):(a(),i("div",T,"\u6682\u65E0\u6587\u6863\u4FE1\u606F\uFF0C\u8BF7\u5148\u9009\u62E9\u6587\u6863"))]),_:1})}var q=B(C,[["render",E]]);export{q as default};

View File

@@ -1 +1 @@
import{u as S,ak as D,r as i,o as t,c as l,w as o,a as n,m as s,t as c,b as p,F as f,k as r,e as m,d as w}from"./vendor.2a860d56.js";import{m as M}from"./mavon-editor.824ddc3c.js";import"./index.c860d973.js";import{_ as j}from"./main.e2223e67.js";const B={setup(){const _=S(),A=D(()=>_.state.openApiDoc),u=D(()=>_.state.openApiDoc.info),e=D(()=>_.state.openApiMethodStatistic);return{openApiDoc:A,openApiDocInfo:u,openApiMethodStatistic:e,getDescription:I=>M.exports.markdownIt.render(I||"")}}},C=["href"],N=["href"],V=["href"],L=["innerHTML"],O={key:1,style:{"text-align":"center"}};function T(_,A,u,e,v,I){const a=i("a-form-item"),k=i("a-divider"),b=i("a-statistic"),h=i("a-card"),y=i("a-col"),g=i("a-row"),x=i("a-form");return t(),l(h,null,{default:o(()=>[e.openApiDocInfo?(t(),l(x,{key:0,"label-col":{span:4},"wrapper-col":{span:20}},{default:o(()=>[n(a,{label:"\u6807\u9898"},{default:o(()=>[s(c(e.openApiDocInfo.title),1)]),_:1}),n(a,{label:"\u7248\u672C"},{default:o(()=>[s(c(e.openApiDocInfo.version),1)]),_:1}),e.openApiDocInfo.contact?(t(),l(a,{key:0,label:"\u4F5C\u8005"},{default:o(()=>[e.openApiDocInfo.contact.name?(t(),p(f,{key:0},[s(c(e.openApiDocInfo.contact.name),1)],64)):r("",!0),e.openApiDocInfo.contact.email?(t(),p(f,{key:1},[n(k,{type:"vertical"}),s(c(e.openApiDocInfo.contact.email),1)],64)):r("",!0),e.openApiDocInfo.contact.url?(t(),p(f,{key:2},[n(k,{type:"vertical"}),m("a",{href:e.openApiDocInfo.contact.url,target:"_blank"},c(e.openApiDocInfo.contact.url),9,C)],64)):r("",!0)]),_:1})):r("",!0),n(a,{label:"host"},{default:o(()=>[s(c(e.openApiDoc.host),1)]),_:1}),e.openApiDocInfo.license?(t(),l(a,{key:1,label:"\u8BB8\u53EF\u8BC1"},{default:o(()=>[m("a",{href:e.openApiDocInfo.license.url,target:"_blank"},c(e.openApiDocInfo.license.name),9,N)]),_:1})):r("",!0),e.openApiDocInfo.termsOfService?(t(),l(a,{key:2,label:"\u670D\u52A1\u6761\u6B3E"},{default:o(()=>[m("a",{href:e.openApiDocInfo.termsOfService,target:"_blank"},c(e.openApiDocInfo.termsOfService),9,V)]),_:1})):r("",!0),n(a,{label:"\u6587\u6863\u8BF4\u660E"},{default:o(()=>[m("div",{class:"markdown-body",innerHTML:e.getDescription(e.openApiDocInfo.description)},null,8,L)]),_:1}),n(a,{label:"\u63A5\u53E3\u7EDF\u8BA1"},{default:o(()=>[n(g,{gutter:[16,16]},{default:o(()=>[(t(),p(f,null,w(["get","post","put","delete","head","patch","options","trace","total"],d=>(t(),p(f,null,[e.openApiMethodStatistic[d]?(t(),l(y,{key:0,span:6},{default:o(()=>[n(h,{size:"small"},{default:o(()=>[n(b,{title:d==="total"?"\u603B\u8BA1":d.toUpperCase()+"\u65B9\u6CD5",value:e.openApiMethodStatistic[d],suffix:"\u4E2A"},null,8,["title","value"])]),_:2},1024)]),_:2},1024)):r("",!0)],64))),64))]),_:1})]),_:1})]),_:1})):(t(),p("div",O,"\u6682\u65E0\u6587\u6863\u4FE1\u606F\uFF0C\u8BF7\u5148\u9009\u62E9\u6587\u6863"))]),_:1})}var U=j(B,[["render",T]]);export{U as default};
import{u as S,ak as D,r as i,o as t,c as l,w as o,a as n,m as s,t as c,b as p,F as f,k as r,e as m,d as w}from"./vendor.2a860d56.js";import{m as M}from"./mavon-editor.824ddc3c.js";import"./index.c860d973.js";import{_ as j}from"./main.4232e7c8.js";const B={setup(){const _=S(),A=D(()=>_.state.openApiDoc),u=D(()=>_.state.openApiDoc.info),e=D(()=>_.state.openApiMethodStatistic);return{openApiDoc:A,openApiDocInfo:u,openApiMethodStatistic:e,getDescription:I=>M.exports.markdownIt.render(I||"")}}},C=["href"],N=["href"],V=["href"],L=["innerHTML"],O={key:1,style:{"text-align":"center"}};function T(_,A,u,e,v,I){const a=i("a-form-item"),k=i("a-divider"),b=i("a-statistic"),h=i("a-card"),y=i("a-col"),g=i("a-row"),x=i("a-form");return t(),l(h,null,{default:o(()=>[e.openApiDocInfo?(t(),l(x,{key:0,"label-col":{span:4},"wrapper-col":{span:20}},{default:o(()=>[n(a,{label:"\u6807\u9898"},{default:o(()=>[s(c(e.openApiDocInfo.title),1)]),_:1}),n(a,{label:"\u7248\u672C"},{default:o(()=>[s(c(e.openApiDocInfo.version),1)]),_:1}),e.openApiDocInfo.contact?(t(),l(a,{key:0,label:"\u4F5C\u8005"},{default:o(()=>[e.openApiDocInfo.contact.name?(t(),p(f,{key:0},[s(c(e.openApiDocInfo.contact.name),1)],64)):r("",!0),e.openApiDocInfo.contact.email?(t(),p(f,{key:1},[n(k,{type:"vertical"}),s(c(e.openApiDocInfo.contact.email),1)],64)):r("",!0),e.openApiDocInfo.contact.url?(t(),p(f,{key:2},[n(k,{type:"vertical"}),m("a",{href:e.openApiDocInfo.contact.url,target:"_blank"},c(e.openApiDocInfo.contact.url),9,C)],64)):r("",!0)]),_:1})):r("",!0),n(a,{label:"host"},{default:o(()=>[s(c(e.openApiDoc.host),1)]),_:1}),e.openApiDocInfo.license?(t(),l(a,{key:1,label:"\u8BB8\u53EF\u8BC1"},{default:o(()=>[m("a",{href:e.openApiDocInfo.license.url,target:"_blank"},c(e.openApiDocInfo.license.name),9,N)]),_:1})):r("",!0),e.openApiDocInfo.termsOfService?(t(),l(a,{key:2,label:"\u670D\u52A1\u6761\u6B3E"},{default:o(()=>[m("a",{href:e.openApiDocInfo.termsOfService,target:"_blank"},c(e.openApiDocInfo.termsOfService),9,V)]),_:1})):r("",!0),n(a,{label:"\u6587\u6863\u8BF4\u660E"},{default:o(()=>[m("div",{class:"markdown-body",innerHTML:e.getDescription(e.openApiDocInfo.description)},null,8,L)]),_:1}),n(a,{label:"\u63A5\u53E3\u7EDF\u8BA1"},{default:o(()=>[n(g,{gutter:[16,16]},{default:o(()=>[(t(),p(f,null,w(["get","post","put","delete","head","patch","options","trace","total"],d=>(t(),p(f,null,[e.openApiMethodStatistic[d]?(t(),l(y,{key:0,span:6},{default:o(()=>[n(h,{size:"small"},{default:o(()=>[n(b,{title:d==="total"?"\u603B\u8BA1":d.toUpperCase()+"\u65B9\u6CD5",value:e.openApiMethodStatistic[d],suffix:"\u4E2A"},null,8,["title","value"])]),_:2},1024)]),_:2},1024)):r("",!0)],64))),64))]),_:1})]),_:1})]),_:1})):(t(),p("div",O,"\u6682\u65E0\u6587\u6863\u4FE1\u606F\uFF0C\u8BF7\u5148\u9009\u62E9\u6587\u6863"))]),_:1})}var U=j(B,[["render",T]]);export{U as default};

View File

@@ -1 +1 @@
import{v as L,u as y,y as a,H as j,r as g,o as h,c as v,w as D,B as k,e as x}from"./vendor.2a860d56.js";import{D as I,s as _}from"./DocContent.0e8f3aea.js";import{m as M}from"./mavon-editor.824ddc3c.js";import"./index.c860d973.js";import{_ as q}from"./main.e2223e67.js";import"./logUtil.532ff0b3.js";const S={components:{DocContent:I},setup(){const r=L(),s=y();let d=a("doc"),t=a([]),n=a([]),c=a({url:"",description:"",method:"",consumes:"",produces:""}),o=a(!1),i=0,l;const m=()=>{let P=r.query.path+"."+r.query.method;if(Object.keys(s.state.swaggerUrlMethodMap).length<=0){console.log("\u6587\u6863\u5C1A\u672A\u52A0\u8F7D\uFF0C\u7B49\u5F85\u52A0\u8F7D\u5B8C\u6210"),l||(l=setInterval(()=>{if(o.value||i++>50){clearInterval(l);return}Object.keys(s.state.swaggerUrlMethodMap).length>0&&(console.log("\u6587\u6863\u5185\u5BB9\u6539\u53D8\uFF0C\u91CD\u65B0\u52A0\u8F7D\u6587\u6863"),m())},1e3));return}let e=s.state.swaggerUrlMethodMap[P];if(!e){k.error("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u7684\u6587\u6863");return}o.value=!0,s.commit("addTableName",{key:r.fullPath,val:e.summary});let u="",p="";e.consumes&&e.consumes.length>0&&(u=e.consumes.join(" ")),e.produces&&e.produces.length>0&&(p=e.produces.join(" "));let w=M.exports.markdownIt.render(e.description||e.summary||"");c.value={url:e.url,description:w,method:e.method||"",consumes:u,produces:p};let f=s.state.swaggerDefinitions;t.value=_.getRequestParamList(e.parameters,f),n.value=_.getResponseParamList(e.responses,f)};return j(()=>{m()}),{docInfoShow:c,activePage:d,changePage:()=>{},isLoadSuccess:o,requestParamList:t,responseParamList:n}}},C=x("div",{style:{padding:"20px 0",height:"100px"}},null,-1);function b(r,s,d,t,n,c){const o=g("DocContent"),i=g("a-spin");return t.isLoadSuccess?(h(),v(o,{key:0,docInfoShow:t.docInfoShow,requestParamList:t.requestParamList,responseParamList:t.responseParamList},null,8,["docInfoShow","requestParamList","responseParamList"])):(h(),v(i,{key:1,tip:"\u6587\u6863\u6570\u636E\u52A0\u8F7D\u4E2D..."},{default:D(()=>[C]),_:1}))}var A=q(S,[["render",b]]);export{A as default};
import{v as L,u as y,y as a,H as j,r as g,o as h,c as v,w as D,B as k,e as x}from"./vendor.2a860d56.js";import{D as I,s as _}from"./DocContent.9af89d36.js";import{m as M}from"./mavon-editor.824ddc3c.js";import"./index.c860d973.js";import{_ as q}from"./main.4232e7c8.js";import"./logUtil.532ff0b3.js";const S={components:{DocContent:I},setup(){const r=L(),s=y();let d=a("doc"),t=a([]),n=a([]),c=a({url:"",description:"",method:"",consumes:"",produces:""}),o=a(!1),i=0,l;const m=()=>{let P=r.query.path+"."+r.query.method;if(Object.keys(s.state.swaggerUrlMethodMap).length<=0){console.log("\u6587\u6863\u5C1A\u672A\u52A0\u8F7D\uFF0C\u7B49\u5F85\u52A0\u8F7D\u5B8C\u6210"),l||(l=setInterval(()=>{if(o.value||i++>50){clearInterval(l);return}Object.keys(s.state.swaggerUrlMethodMap).length>0&&(console.log("\u6587\u6863\u5185\u5BB9\u6539\u53D8\uFF0C\u91CD\u65B0\u52A0\u8F7D\u6587\u6863"),m())},1e3));return}let e=s.state.swaggerUrlMethodMap[P];if(!e){k.error("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u7684\u6587\u6863");return}o.value=!0,s.commit("addTableName",{key:r.fullPath,val:e.summary});let u="",p="";e.consumes&&e.consumes.length>0&&(u=e.consumes.join(" ")),e.produces&&e.produces.length>0&&(p=e.produces.join(" "));let w=M.exports.markdownIt.render(e.description||e.summary||"");c.value={url:e.url,description:w,method:e.method||"",consumes:u,produces:p};let f=s.state.swaggerDefinitions;t.value=_.getRequestParamList(e.parameters,f),n.value=_.getResponseParamList(e.responses,f)};return j(()=>{m()}),{docInfoShow:c,activePage:d,changePage:()=>{},isLoadSuccess:o,requestParamList:t,responseParamList:n}}},C=x("div",{style:{padding:"20px 0",height:"100px"}},null,-1);function b(r,s,d,t,n,c){const o=g("DocContent"),i=g("a-spin");return t.isLoadSuccess?(h(),v(o,{key:0,docInfoShow:t.docInfoShow,requestParamList:t.requestParamList,responseParamList:t.responseParamList},null,8,["docInfoShow","requestParamList","responseParamList"])):(h(),v(i,{key:1,tip:"\u6587\u6863\u6570\u636E\u52A0\u8F7D\u4E2D..."},{default:D(()=>[C]),_:1}))}var A=q(S,[["render",b]]);export{A as default};

View File

@@ -1 +1 @@
import{v as y,u as j,y as n,H as D,r as h,o as v,c as g,w as k,B as w,e as x}from"./vendor.2a860d56.js";import{D as I,o as _}from"./DocContent.c8055936.js";import{m as M}from"./mavon-editor.824ddc3c.js";import"./index.c860d973.js";import{_ as q}from"./main.e2223e67.js";import"./logUtil.532ff0b3.js";const S={components:{DocContent:I},setup(){const a=y(),t=j();let p=n("doc"),o=n([]),r=n([]),i=n({url:"",description:"",method:"",consumes:"",produces:""}),s=n(!1),c=0,l;const d=()=>{let P=a.query.path+"."+a.query.method;if(Object.keys(t.state.openApiUrlMethodMap).length<=0){console.log("\u6587\u6863\u5C1A\u672A\u52A0\u8F7D\uFF0C\u7B49\u5F85\u52A0\u8F7D\u5B8C\u6210"),l||(l=setInterval(()=>{if(s.value||c++>50){clearInterval(l);return}Object.keys(t.state.openApiUrlMethodMap).length>0&&(console.log("\u6587\u6863\u5185\u5BB9\u6539\u53D8\uFF0C\u91CD\u65B0\u52A0\u8F7D\u6587\u6863"),d())},1e3));return}let e=t.state.openApiUrlMethodMap[P];if(!e){w.error("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u7684\u6587\u6863");return}s.value=!0,t.commit("addTableName",{key:a.fullPath,val:e.summary});let m="",u="";e.consumes&&e.consumes.length>0&&(m=e.consumes.join(" ")),e.produces&&e.produces.length>0&&(u=e.produces.join(" "));let L=M.exports.markdownIt.render(e.description||e.summary||"");i.value={url:e.url,description:L,method:e.method||"",consumes:m,produces:u};let f=t.state.openApiDefinitions;o.value=_.getRequestParamList(e.parameters,f),r.value=_.getResponseParamList(e.responses,f)};return D(()=>{d()}),{docInfoShow:i,activePage:p,changePage:()=>{},isLoadSuccess:s,requestParamList:o,responseParamList:r}}},A=x("div",{style:{padding:"20px 0",height:"100px"}},null,-1);function C(a,t,p,o,r,i){const s=h("DocContent"),c=h("a-spin");return o.isLoadSuccess?(v(),g(s,{key:0,docInfoShow:o.docInfoShow,requestParamList:o.requestParamList,responseParamList:o.responseParamList},null,8,["docInfoShow","requestParamList","responseParamList"])):(v(),g(c,{key:1,tip:"\u6587\u6863\u6570\u636E\u52A0\u8F7D\u4E2D..."},{default:k(()=>[A]),_:1}))}var V=q(S,[["render",C]]);export{V as default};
import{v as y,u as j,y as n,H as D,r as h,o as v,c as g,w as k,B as w,e as x}from"./vendor.2a860d56.js";import{D as I,o as _}from"./DocContent.658bc0f2.js";import{m as M}from"./mavon-editor.824ddc3c.js";import"./index.c860d973.js";import{_ as q}from"./main.4232e7c8.js";import"./logUtil.532ff0b3.js";const S={components:{DocContent:I},setup(){const a=y(),t=j();let p=n("doc"),o=n([]),r=n([]),i=n({url:"",description:"",method:"",consumes:"",produces:""}),s=n(!1),c=0,l;const d=()=>{let P=a.query.path+"."+a.query.method;if(Object.keys(t.state.openApiUrlMethodMap).length<=0){console.log("\u6587\u6863\u5C1A\u672A\u52A0\u8F7D\uFF0C\u7B49\u5F85\u52A0\u8F7D\u5B8C\u6210"),l||(l=setInterval(()=>{if(s.value||c++>50){clearInterval(l);return}Object.keys(t.state.openApiUrlMethodMap).length>0&&(console.log("\u6587\u6863\u5185\u5BB9\u6539\u53D8\uFF0C\u91CD\u65B0\u52A0\u8F7D\u6587\u6863"),d())},1e3));return}let e=t.state.openApiUrlMethodMap[P];if(!e){w.error("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u7684\u6587\u6863");return}s.value=!0,t.commit("addTableName",{key:a.fullPath,val:e.summary});let m="",u="";e.consumes&&e.consumes.length>0&&(m=e.consumes.join(" ")),e.produces&&e.produces.length>0&&(u=e.produces.join(" "));let L=M.exports.markdownIt.render(e.description||e.summary||"");i.value={url:e.url,description:L,method:e.method||"",consumes:m,produces:u};let f=t.state.openApiDefinitions;o.value=_.getRequestParamList(e.parameters,f),r.value=_.getResponseParamList(e.responses,f)};return D(()=>{d()}),{docInfoShow:i,activePage:p,changePage:()=>{},isLoadSuccess:s,requestParamList:o,responseParamList:r}}},A=x("div",{style:{padding:"20px 0",height:"100px"}},null,-1);function C(a,t,p,o,r,i){const s=h("DocContent"),c=h("a-spin");return o.isLoadSuccess?(v(),g(s,{key:0,docInfoShow:o.docInfoShow,requestParamList:o.requestParamList,responseParamList:o.responseParamList},null,8,["docInfoShow","requestParamList","responseParamList"])):(v(),g(c,{key:1,tip:"\u6587\u6863\u6570\u636E\u52A0\u8F7D\u4E2D..."},{default:k(()=>[A]),_:1}))}var V=q(S,[["render",C]]);export{V as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
var G=Object.defineProperty;var V=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var w=(c,e,l)=>e in c?G(c,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):c[e]=l,I=(c,e)=>{for(var l in e||(e={}))K.call(e,l)&&w(c,l,e[l]);if(V)for(var l of V(e))N.call(e,l)&&w(c,l,e[l]);return c};import{z as D}from"./custom.ece90331.js";import{u as P,y as x,H as U,r as v,o,b as r,e as A,a as s,w as n,F as y,B as F,c as k,t as B,k as C,m as d}from"./vendor.2a860d56.js";import{_ as S}from"./main.e2223e67.js";const j={setup(){const c=P();let e=x([]),l=x(!1);const a=async()=>{i.value={},l.value=!0,D.docApiGlobalParamList().then(t=>{setTimeout(()=>l.value=!1,500),e.value=t.data||[],c.commit("setGlobalParam",e.value)})};let i=x({}),T=x();const p=()=>{i.value.isEdit&&f(i.value);let t={isEdit:!0};e.value.unshift(t),i.value=t,setTimeout(()=>{let _=document.getElementsByClassName("ant-table-body")[0];_.scrollTop=0},0)},g=t=>{i.value.isEdit&&f(i.value),t.isEdit=!0,i.value=I({},t)},f=t=>{t.isEdit=!1,t.id?e.value.forEach(_=>_.isEdit=!1):e.value=e.value.filter(_=>_!==t),i.value={}},L=t=>{if(!i.value.paramKey||!i.value.paramValue){F.error("\u53C2\u6570\u540D\u6216\u53C2\u6570\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}D.docApiGlobalParamUpdate(i.value).then(_=>{t.isEdit=!1,a()})},h=async t=>{D.docApiGlobalParamUpdate({id:t.id,yn:0}).then(_=>{a()})};return U(()=>{a()}),{docList:e,docListLoading:l,docEdit:i,tableRef:T,searchDocList:a,deleteDoc:h,editDoc:g,saveEditDoc:L,cancelEditDoc:f,addDocLine:p,docListColumns:[{title:"\u53C2\u6570\u540D\u79F0",dataIndex:"paramKey",width:250},{title:"\u53C2\u6570\u503C",dataIndex:"paramValue"},{title:"\u53C2\u6570\u4F4D\u7F6E",dataIndex:"paramType",width:120},{title:"\u64CD\u4F5C",dataIndex:"operation",fixed:"right",width:170}]}}},z={style:{"margin-bottom":"10px","text-align":"right"}},H=d("\u5237\u65B0"),M=d("\u65B0\u5EFA"),R={key:1},q={key:1},J=d("Form"),O=d("Header"),Q=d("Cookie"),W=d("Form"),X=d("Header"),Y=d("Cookie"),Z=d("\u53D6\u6D88"),$=d("\u4FDD\u5B58"),ee=d("\u7F16\u8F91"),ae=d("\u5220\u9664");function te(c,e,l,a,i,T){const p=v("a-button"),g=v("a-input"),f=v("a-select-option"),L=v("a-select"),h=v("a-tag"),t=v("a-popconfirm"),_=v("a-table");return o(),r(y,null,[A("div",z,[s(p,{onClick:a.searchDocList,type:"primary"},{default:n(()=>[H]),_:1},8,["onClick"]),s(p,{onClick:a.addDocLine},{default:n(()=>[M]),_:1},8,["onClick"])]),s(_,{dataSource:a.docList,columns:a.docListColumns,size:"middle",id:"paramTable",loading:a.docListLoading,pagination:!1,scroll:{x:1e3,y:"calc(100vh - 240px)"}},{bodyCell:n(({column:b,text:E,record:m})=>[b.dataIndex==="paramKey"?(o(),r(y,{key:0},[m.isEdit?(o(),k(g,{key:0,placeholder:"\u8BF7\u8F93\u5165\u53C2\u6570\u540D\u79F0",value:a.docEdit.paramKey,"onUpdate:value":e[0]||(e[0]=u=>a.docEdit.paramKey=u)},null,8,["value"])):(o(),r("span",R,B(E),1))],64)):C("",!0),b.dataIndex==="paramValue"?(o(),r(y,{key:1},[m.isEdit?(o(),k(g,{key:0,rows:1,placeholder:"\u8BF7\u8F93\u5165\u53C2\u6570\u503C",value:a.docEdit.paramValue,"onUpdate:value":e[1]||(e[1]=u=>a.docEdit.paramValue=u)},null,8,["value"])):(o(),r("span",q,B(E),1))],64)):C("",!0),b.dataIndex==="paramType"?(o(),r(y,{key:2},[m.isEdit?(o(),k(L,{key:0,placeholder:"\u53C2\u6570\u4F4D\u7F6E",value:a.docEdit.paramType,"onUpdate:value":e[2]||(e[2]=u=>a.docEdit.paramType=u),style:{width:"110px"}},{default:n(()=>[s(f,{value:1},{default:n(()=>[J]),_:1}),s(f,{value:2},{default:n(()=>[O]),_:1}),s(f,{value:3},{default:n(()=>[Q]),_:1})]),_:1},8,["value"])):(o(),r(y,{key:1},[E===1?(o(),k(h,{key:0,color:"green"},{default:n(()=>[W]),_:1})):E===2?(o(),k(h,{key:1,color:"pink"},{default:n(()=>[X]),_:1})):E===3?(o(),k(h,{key:2,color:"pink"},{default:n(()=>[Y]),_:1})):C("",!0)],64))],64)):C("",!0),b.dataIndex==="operation"?(o(),r(y,{key:3},[m.isEdit?(o(),r(y,{key:0},[s(p,{type:"link",onClick:u=>a.cancelEditDoc(m)},{default:n(()=>[Z]),_:2},1032,["onClick"]),s(p,{type:"link",onClick:u=>a.saveEditDoc(m)},{default:n(()=>[$]),_:2},1032,["onClick"])],64)):(o(),r(y,{key:1},[s(p,{type:"link",onClick:u=>a.editDoc(m)},{default:n(()=>[ee]),_:2},1032,["onClick"]),s(t,{title:"\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",onConfirm:u=>a.deleteDoc(m)},{default:n(()=>[s(p,{type:"link",danger:""},{default:n(()=>[ae]),_:1})]),_:2},1032,["onConfirm"])],64))],64)):C("",!0)]),_:1},8,["dataSource","columns","loading","scroll"])],64)}var de=S(j,[["render",te]]);export{de as default};
var G=Object.defineProperty;var V=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var w=(c,e,l)=>e in c?G(c,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):c[e]=l,I=(c,e)=>{for(var l in e||(e={}))K.call(e,l)&&w(c,l,e[l]);if(V)for(var l of V(e))N.call(e,l)&&w(c,l,e[l]);return c};import{z as D}from"./custom.ece90331.js";import{u as P,y as x,H as U,r as v,o,b as r,e as A,a as s,w as n,F as y,B as F,c as k,t as B,k as C,m as d}from"./vendor.2a860d56.js";import{_ as S}from"./main.4232e7c8.js";const j={setup(){const c=P();let e=x([]),l=x(!1);const a=async()=>{i.value={},l.value=!0,D.docApiGlobalParamList().then(t=>{setTimeout(()=>l.value=!1,500),e.value=t.data||[],c.commit("setGlobalParam",e.value)})};let i=x({}),T=x();const p=()=>{i.value.isEdit&&f(i.value);let t={isEdit:!0};e.value.unshift(t),i.value=t,setTimeout(()=>{let _=document.getElementsByClassName("ant-table-body")[0];_.scrollTop=0},0)},g=t=>{i.value.isEdit&&f(i.value),t.isEdit=!0,i.value=I({},t)},f=t=>{t.isEdit=!1,t.id?e.value.forEach(_=>_.isEdit=!1):e.value=e.value.filter(_=>_!==t),i.value={}},L=t=>{if(!i.value.paramKey||!i.value.paramValue){F.error("\u53C2\u6570\u540D\u6216\u53C2\u6570\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}D.docApiGlobalParamUpdate(i.value).then(_=>{t.isEdit=!1,a()})},h=async t=>{D.docApiGlobalParamUpdate({id:t.id,yn:0}).then(_=>{a()})};return U(()=>{a()}),{docList:e,docListLoading:l,docEdit:i,tableRef:T,searchDocList:a,deleteDoc:h,editDoc:g,saveEditDoc:L,cancelEditDoc:f,addDocLine:p,docListColumns:[{title:"\u53C2\u6570\u540D\u79F0",dataIndex:"paramKey",width:250},{title:"\u53C2\u6570\u503C",dataIndex:"paramValue"},{title:"\u53C2\u6570\u4F4D\u7F6E",dataIndex:"paramType",width:120},{title:"\u64CD\u4F5C",dataIndex:"operation",fixed:"right",width:170}]}}},z={style:{"margin-bottom":"10px","text-align":"right"}},H=d("\u5237\u65B0"),M=d("\u65B0\u5EFA"),R={key:1},q={key:1},J=d("Form"),O=d("Header"),Q=d("Cookie"),W=d("Form"),X=d("Header"),Y=d("Cookie"),Z=d("\u53D6\u6D88"),$=d("\u4FDD\u5B58"),ee=d("\u7F16\u8F91"),ae=d("\u5220\u9664");function te(c,e,l,a,i,T){const p=v("a-button"),g=v("a-input"),f=v("a-select-option"),L=v("a-select"),h=v("a-tag"),t=v("a-popconfirm"),_=v("a-table");return o(),r(y,null,[A("div",z,[s(p,{onClick:a.searchDocList,type:"primary"},{default:n(()=>[H]),_:1},8,["onClick"]),s(p,{onClick:a.addDocLine},{default:n(()=>[M]),_:1},8,["onClick"])]),s(_,{dataSource:a.docList,columns:a.docListColumns,size:"middle",id:"paramTable",loading:a.docListLoading,pagination:!1,scroll:{x:1e3,y:"calc(100vh - 240px)"}},{bodyCell:n(({column:b,text:E,record:m})=>[b.dataIndex==="paramKey"?(o(),r(y,{key:0},[m.isEdit?(o(),k(g,{key:0,placeholder:"\u8BF7\u8F93\u5165\u53C2\u6570\u540D\u79F0",value:a.docEdit.paramKey,"onUpdate:value":e[0]||(e[0]=u=>a.docEdit.paramKey=u)},null,8,["value"])):(o(),r("span",R,B(E),1))],64)):C("",!0),b.dataIndex==="paramValue"?(o(),r(y,{key:1},[m.isEdit?(o(),k(g,{key:0,rows:1,placeholder:"\u8BF7\u8F93\u5165\u53C2\u6570\u503C",value:a.docEdit.paramValue,"onUpdate:value":e[1]||(e[1]=u=>a.docEdit.paramValue=u)},null,8,["value"])):(o(),r("span",q,B(E),1))],64)):C("",!0),b.dataIndex==="paramType"?(o(),r(y,{key:2},[m.isEdit?(o(),k(L,{key:0,placeholder:"\u53C2\u6570\u4F4D\u7F6E",value:a.docEdit.paramType,"onUpdate:value":e[2]||(e[2]=u=>a.docEdit.paramType=u),style:{width:"110px"}},{default:n(()=>[s(f,{value:1},{default:n(()=>[J]),_:1}),s(f,{value:2},{default:n(()=>[O]),_:1}),s(f,{value:3},{default:n(()=>[Q]),_:1})]),_:1},8,["value"])):(o(),r(y,{key:1},[E===1?(o(),k(h,{key:0,color:"green"},{default:n(()=>[W]),_:1})):E===2?(o(),k(h,{key:1,color:"pink"},{default:n(()=>[X]),_:1})):E===3?(o(),k(h,{key:2,color:"pink"},{default:n(()=>[Y]),_:1})):C("",!0)],64))],64)):C("",!0),b.dataIndex==="operation"?(o(),r(y,{key:3},[m.isEdit?(o(),r(y,{key:0},[s(p,{type:"link",onClick:u=>a.cancelEditDoc(m)},{default:n(()=>[Z]),_:2},1032,["onClick"]),s(p,{type:"link",onClick:u=>a.saveEditDoc(m)},{default:n(()=>[$]),_:2},1032,["onClick"])],64)):(o(),r(y,{key:1},[s(p,{type:"link",onClick:u=>a.editDoc(m)},{default:n(()=>[ee]),_:2},1032,["onClick"]),s(t,{title:"\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",onConfirm:u=>a.deleteDoc(m)},{default:n(()=>[s(p,{type:"link",danger:""},{default:n(()=>[ae]),_:1})]),_:2},1032,["onConfirm"])],64))],64)):C("",!0)]),_:1},8,["dataSource","columns","loading","scroll"])],64)}var de=S(j,[["render",te]]);export{de as default};

View File

@@ -1 +1 @@
import{_ as e}from"./main.e2223e67.js";import{o as t,b as o}from"./vendor.2a860d56.js";const n={name:"SettingView",components:{},data(){return{}},computed:{},mounted(){},methods:{}};function r(a,s,c,m,d,i){return t(),o("div",null," \u5C55\u793A\u914D\u7F6E\u9875\u9762 ")}var u=e(n,[["render",r]]);export{u as default};
import{_ as e}from"./main.4232e7c8.js";import{o as t,b as o}from"./vendor.2a860d56.js";const n={name:"SettingView",components:{},data(){return{}},computed:{},mounted(){},methods:{}};function r(a,s,c,m,d,i){return t(),o("div",null," \u5C55\u793A\u914D\u7F6E\u9875\u9762 ")}var u=e(n,[["render",r]]);export{u as default};

View File

@@ -1 +1 @@
import{u as p,y as g,H as f,G as x,o as i,b as l,e as _,F as w,d as L,aq as N,ar as C,t as H,ak as I,r as m,a as v,w as u,c as S,k as A}from"./vendor.2a860d56.js";import{m as T}from"./mavon-editor.824ddc3c.js";import"./index.c860d973.js";import{_ as y}from"./main.e2223e67.js";const D={props:{heading:{type:Array,default:[]}},setup(r){const s=p();let a=g("100px");f(()=>{window.onresize=()=>{n()},setTimeout(()=>{n()},100)}),x(s.getters.getLeftAsideWidth,()=>{n()});let e=g();const n=()=>{a.value=window.getComputedStyle(e.value,null).width};return{navigationRef:e,navigationWidth:a,headingItemClick:t=>{t.node.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})}}}},b={class:"navigation"},j={ref:"navigationRef",style:{display:"inline-block",width:"100%",height:"1px"}},q=["onClick"];function B(r,s,a,e,n,c){return i(),l("div",b,[_("div",j,null,512),_("div",{class:"navigation-heading",style:N({width:e.navigationWidth})},[(i(!0),l(w,null,L(a.heading,t=>(i(),l("div",{class:C("heading-item heading-"+t.level),onClick:o=>e.headingItemClick(t)},H(t.text),11,q))),256))],4)])}var M=y(D,[["render",B]]);const R={components:{Navigation:M},setup(){const r=p(),s=I(()=>r.state.apiDoc);let a=g();x(r.getters.getApiDoc,()=>{setTimeout(()=>{c(".share-instruction")},100)});const e=t=>T.exports.markdownIt.render(t||"");let n=g([]);const c=t=>{if(!document.querySelector(t))return[];let o=document.querySelector(t).querySelectorAll("h1,h2,h3,h4,h5,h6");if(o.length<=0)return[];let d=[];o.forEach(h=>{let k=h.innerHTML.replace(/^\s+/g,"").replace(/\s+$/g,"").replace(/<\/?[^>]+(>|$)/g,"");d.push({node:h,level:parseInt(h.tagName.replace(/[h]/i,""),10),text:k})}),n.value=d};return f(()=>{}),{apiDoc:s,navigationRef:a,navigationList:n,markdownToHtml:e}}},V={key:0},W=["innerHTML"],$={key:1,style:{"text-align":"center"}};function z(r,s,a,e,n,c){const t=m("Navigation"),o=m("a-col"),d=m("a-row");return e.apiDoc.shareInstruction?(i(),l("div",V,[v(d,null,{default:u(()=>[e.navigationList.length>0?(i(),S(o,{key:0,xs:0,sm:4,md:4,lg:6,xl:6},{default:u(()=>[v(t,{ref:"navigationRef",heading:e.navigationList},null,8,["heading"])]),_:1})):A("",!0),v(o,{xs:24,sm:e.navigationList.length>0?20:24,md:e.navigationList.length>0?20:24,lg:e.navigationList.length>0?18:24,xl:e.navigationList.length>0?18:24},{default:u(()=>[_("div",{class:"markdown-body share-instruction",innerHTML:e.markdownToHtml(e.apiDoc.shareInstruction),style:{margin:"0 auto","max-width":"1000px"}},null,8,W)]),_:1},8,["sm","md","lg","xl"])]),_:1})])):(i(),l("div",$,"\u6B22\u8FCE\u8BBF\u95EE\u5F00\u653EAPI\u6587\u6863"))}var J=y(R,[["render",z]]);export{J as default};
import{u as p,y as g,H as f,G as x,o as i,b as l,e as _,F as w,d as L,aq as N,ar as C,t as H,ak as I,r as m,a as v,w as u,c as S,k as A}from"./vendor.2a860d56.js";import{m as T}from"./mavon-editor.824ddc3c.js";import"./index.c860d973.js";import{_ as y}from"./main.4232e7c8.js";const D={props:{heading:{type:Array,default:[]}},setup(r){const s=p();let a=g("100px");f(()=>{window.onresize=()=>{n()},setTimeout(()=>{n()},100)}),x(s.getters.getLeftAsideWidth,()=>{n()});let e=g();const n=()=>{a.value=window.getComputedStyle(e.value,null).width};return{navigationRef:e,navigationWidth:a,headingItemClick:t=>{t.node.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})}}}},b={class:"navigation"},j={ref:"navigationRef",style:{display:"inline-block",width:"100%",height:"1px"}},q=["onClick"];function B(r,s,a,e,n,c){return i(),l("div",b,[_("div",j,null,512),_("div",{class:"navigation-heading",style:N({width:e.navigationWidth})},[(i(!0),l(w,null,L(a.heading,t=>(i(),l("div",{class:C("heading-item heading-"+t.level),onClick:o=>e.headingItemClick(t)},H(t.text),11,q))),256))],4)])}var M=y(D,[["render",B]]);const R={components:{Navigation:M},setup(){const r=p(),s=I(()=>r.state.apiDoc);let a=g();x(r.getters.getApiDoc,()=>{setTimeout(()=>{c(".share-instruction")},100)});const e=t=>T.exports.markdownIt.render(t||"");let n=g([]);const c=t=>{if(!document.querySelector(t))return[];let o=document.querySelector(t).querySelectorAll("h1,h2,h3,h4,h5,h6");if(o.length<=0)return[];let d=[];o.forEach(h=>{let k=h.innerHTML.replace(/^\s+/g,"").replace(/\s+$/g,"").replace(/<\/?[^>]+(>|$)/g,"");d.push({node:h,level:parseInt(h.tagName.replace(/[h]/i,""),10),text:k})}),n.value=d};return f(()=>{}),{apiDoc:s,navigationRef:a,navigationList:n,markdownToHtml:e}}},V={key:0},W=["innerHTML"],$={key:1,style:{"text-align":"center"}};function z(r,s,a,e,n,c){const t=m("Navigation"),o=m("a-col"),d=m("a-row");return e.apiDoc.shareInstruction?(i(),l("div",V,[v(d,null,{default:u(()=>[e.navigationList.length>0?(i(),S(o,{key:0,xs:0,sm:4,md:4,lg:6,xl:6},{default:u(()=>[v(t,{ref:"navigationRef",heading:e.navigationList},null,8,["heading"])]),_:1})):A("",!0),v(o,{xs:24,sm:e.navigationList.length>0?20:24,md:e.navigationList.length>0?20:24,lg:e.navigationList.length>0?18:24,xl:e.navigationList.length>0?18:24},{default:u(()=>[_("div",{class:"markdown-body share-instruction",innerHTML:e.markdownToHtml(e.apiDoc.shareInstruction),style:{margin:"0 auto","max-width":"1000px"}},null,8,W)]),_:1},8,["sm","md","lg","xl"])]),_:1})])):(i(),l("div",$,"\u6B22\u8FCE\u8BBF\u95EE\u5F00\u653EAPI\u6587\u6863"))}var J=y(R,[["render",z]]);export{J as default};

View File

@@ -1 +0,0 @@
var x=Object.defineProperty,M=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var L=(r,t,a)=>t in r?x(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a,y=(r,t)=>{for(var a in t||(t={}))j.call(t,a)&&L(r,a,t[a]);if(E)for(var a of E(t))C.call(t,a)&&L(r,a,t[a]);return r},O=(r,t)=>M(r,b(t));const D=["get","head","post","put","patch","delete","options","trace"];function P(r){let t={},a={},h={},f=r.paths;return f?(Object.keys(f).forEach(o=>{let i=f[o];for(let e of D){if(!i[e]||!i[e].tags)continue;let p=e.toLowerCase();h[p]=(h[p]||0)+1,h.total=(h.total||0)+1,i[e].tags.forEach(c=>{let s=t[c];s||(s=t[c]={});let n=s[o];n||(n=s[o]={});let g=o+"."+e;n[e]=i[e],n[e].path=g,n[e].url=o,n[e].method=e,a[g]=i[e]})}}),{urlMethodMap:a,tagPathMap:t,methodStatistic:h}):{urlMethodMap:a,tagPathMap:t,methodStatistic:h}}function U(r,t,a,h){let f=[],o=1,i=r.tags||[];return i.length<=0&&Object.keys(t).forEach(e=>i.push({name:e})),i.forEach(e=>{let p=1,c=[],s=t[e.name];!s||(Object.keys(s).forEach(n=>{let g=1,d=s[n];Object.keys(d).forEach(m=>{let u=o+"_"+p+"_"+g,l=d[m];if(!w(n,l,a))return;l.treeId=u;let T=l.summary||l.path;c.push({title:T,key:u,isLeaf:!0,method:l.method,query:O(y({},h),{path:l.url,method:l.method})}),g++}),p++}),c.length>0&&f.push({title:e.name,key:o,children:c}),o++)}),[{key:"main",title:r.info.title||"Swagger\u63A5\u53E3\u6587\u6863",children:f}]}function w(r,t,a){if(!a||!r||(r=r.toLowerCase(),a=a.toLowerCase(),r.indexOf(a)>=0))return!0;let h=t.path+t.method+t.summary+t.description+t.tags;return h&&h.toLowerCase().indexOf(a)>=0}const _=["get","head","post","put","patch","delete","options","trace"];function S(r){let t={},a={},h={},f=r.paths;return f?(Object.keys(f).forEach(o=>{let i=f[o];for(let e of _){if(!i[e]||!i[e].tags)continue;let p=e.toLowerCase();h[p]=(h[p]||0)+1,h.total=(h.total||0)+1,i[e].tags.forEach(c=>{let s=t[c];s||(s=t[c]={});let n=s[o];n||(n=s[o]={});let g=o+"."+e;n[e]=i[e],n[e].path=g,n[e].url=o,n[e].method=e,a[g]=i[e]})}}),{urlMethodMap:a,tagPathMap:t,methodStatistic:h}):{urlMethodMap:a,tagPathMap:t,methodStatistic:h}}function A(r,t,a,h){let f=[],o=1,i=r.tags||[];return i.length<=0&&Object.keys(t).forEach(e=>i.push({name:e})),i.forEach(e=>{let p=1,c=[],s=t[e.name];!s||(Object.keys(s).forEach(n=>{let g=1,d=s[n];Object.keys(d).forEach(m=>{let u=o+"_"+p+"_"+g,l=d[m];if(!k(n,l,a))return;l.treeId=u;let T=l.summary||l.path;c.push({title:T,key:u,isLeaf:!0,method:l.method,query:O(y({},h),{path:l.url,method:l.method})}),g++}),p++}),c.length>0&&f.push({title:e.name,key:o,children:c}),o++)}),[{key:"main",title:r.info.title||"Swagger\u63A5\u53E3\u6587\u6863",children:f}]}function k(r,t,a){if(!a||!r||(r=r.toLowerCase(),a=a.toLowerCase(),r.indexOf(a)>=0))return!0;let h=t.path+t.method+t.summary+t.description+t.tags;return h&&h.toLowerCase().indexOf(a)>=0}var $="assets/api-logo.952f0c92.png";export{$ as _,P as a,S as b,A as c,U as g};

View File

@@ -0,0 +1 @@
var x=Object.defineProperty,E=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var b=(r,e,t)=>e in r?x(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,y=(r,e)=>{for(var t in e||(e={}))k.call(e,t)&&b(r,t,e[t]);if(L)for(var t of L(e))M.call(e,t)&&b(r,t,e[t]);return r},v=(r,e)=>E(r,O(e));import{_ as R}from"./main.4232e7c8.js";import{H as j,y as T,o as z,b as C,e as w}from"./vendor.2a860d56.js";const D=["get","head","post","put","patch","delete","options","trace"];function W(r){let e={},t={},o={},h=r.paths;return h?(Object.keys(h).forEach(n=>{let s=h[n];for(let a of D){if(!s[a]||!s[a].tags)continue;let d=a.toLowerCase();o[d]=(o[d]||0)+1,o.total=(o.total||0)+1,s[a].tags.forEach(c=>{let i=e[c];i||(i=e[c]={});let l=i[n];l||(l=i[n]={});let f=n+"."+a;l[a]=s[a],l[a].path=f,l[a].url=n,l[a].method=a,t[f]=s[a]})}}),{urlMethodMap:t,tagPathMap:e,methodStatistic:o}):{urlMethodMap:t,tagPathMap:e,methodStatistic:o}}function H(r,e,t,o){let h=[],n=1,s=r.tags||[];return s.length<=0&&Object.keys(e).forEach(a=>s.push({name:a})),s.forEach(a=>{let d=1,c=[],i=e[a.name];!i||(Object.keys(i).forEach(l=>{let f=1,p=i[l];Object.keys(p).forEach(g=>{let m=n+"_"+d+"_"+f,u=p[g];if(!I(l,u,t))return;u.treeId=m;let _=u.summary||u.path;c.push({title:_,key:m,isLeaf:!0,method:u.method,query:v(y({},o),{path:u.url,method:u.method})}),f++}),d++}),c.length>0&&h.push({title:a.name,key:n,children:c}),n++)}),[{key:"main",title:r.info.title||"Swagger\u63A5\u53E3\u6587\u6863",children:h}]}function I(r,e,t){if(!t||!r||(r=r.toLowerCase(),t=t.toLowerCase(),r.indexOf(t)>=0))return!0;let o=e.path+e.method+e.summary+e.description+e.tags;return o&&o.toLowerCase().indexOf(t)>=0}const $=["get","head","post","put","patch","delete","options","trace"];function V(r){let e={},t={},o={},h=r.paths;return h?(Object.keys(h).forEach(n=>{let s=h[n];for(let a of $){if(!s[a]||!s[a].tags)continue;let d=a.toLowerCase();o[d]=(o[d]||0)+1,o.total=(o.total||0)+1,s[a].tags.forEach(c=>{let i=e[c];i||(i=e[c]={});let l=i[n];l||(l=i[n]={});let f=n+"."+a;l[a]=s[a],l[a].path=f,l[a].url=n,l[a].method=a,t[f]=s[a]})}}),{urlMethodMap:t,tagPathMap:e,methodStatistic:o}):{urlMethodMap:t,tagPathMap:e,methodStatistic:o}}function G(r,e,t,o){let h=[],n=1,s=r.tags||[];return s.length<=0&&Object.keys(e).forEach(a=>s.push({name:a})),s.forEach(a=>{let d=1,c=[],i=e[a.name];!i||(Object.keys(i).forEach(l=>{let f=1,p=i[l];Object.keys(p).forEach(g=>{let m=n+"_"+d+"_"+f,u=p[g];if(!B(l,u,t))return;u.treeId=m;let _=u.summary||u.path;c.push({title:_,key:m,isLeaf:!0,method:u.method,query:v(y({},o),{path:u.url,method:u.method})}),f++}),d++}),c.length>0&&h.push({title:a.name,key:n,children:c}),n++)}),[{key:"main",title:r.info.title||"Swagger\u63A5\u53E3\u6587\u6863",children:h}]}function B(r,e,t){if(!t||!r||(r=r.toLowerCase(),t=t.toLowerCase(),r.indexOf(t)>=0))return!0;let o=e.path+e.method+e.summary+e.description+e.tags;return o&&o.toLowerCase().indexOf(t)>=0}const P={emits:["update:value","change"],setup(r,{emit:e}){j(()=>{n()});let t=T(300),o=T(),h=T();const n=()=>{let s=o.value,a=h.value;s.onmousedown=d=>{let c=d.clientX;return s.style.background="#ccc",a.style.background="#aaa",s.left=s.offsetLeft,document.onmousemove=i=>{let l=i.clientX,f=c-l;(f<0&&t.value<600||f>0&&t.value>300)&&(c=l,t.value-=f,t.value<300&&(t.value=300),e("update:value",t.value),e("change",t.value))},document.onmouseup=()=>{s.style.background="#fafafa",a.style.background="#ccc",document.onmousemove=null,document.onmouseup=null},!1}};return{leftAsideWidth:t,leftResizeRef:o,leftResizeBarRef:h}}},U={ref:"leftResizeRef",class:"left-resize"},A={ref:"leftResizeBarRef"};function S(r,e,t,o,h,n){return z(),C("div",U,[w("i",A,"...",512)],512)}var J=R(P,[["render",S],["__scopeId","data-v-33303c20"]]),K="assets/api-logo.952f0c92.png";export{J as L,K as _,W as a,V as b,G as c,H as g};

View File

@@ -1,4 +1,4 @@
import"./mavon-editor.824ddc3c.js";import"./index.c860d973.js";import{_ as K}from"./main.e2223e67.js";import{al as M,ap as J,y as A,r as T,o as g,b as I,e as Z,a as b,w as _,c as L,k as D,F as B,m as R,t as q,d as X}from"./vendor.2a860d56.js";import{a as z}from"./index.7873781e.js";function Q(e,t={}){t.filter=t.filter||(()=>!0);function c(){return s()||k()||o()||p()}function r(){return m(/\s*/),s(!0)||o()||F()||d(!1)}function x(){const i=v(),n=[];let a,w=r();for(;w;){if(w.node.type==="Element"){if(a)throw new Error("Found multiple root nodes");a=w.node}w.excluded||n.push(w.node),w=r()}if(!a)throw new Error("Failed to parse XML");return{declaration:i?i.node:null,root:a,children:n}}function v(){return d(!0)}function d(i){const n=m(i?/^<\?(xml)\s*/:/^<\?([\w-:.]+)\s*/);if(!n)return;const a={name:n[1],type:"ProcessingInstruction",attributes:{}};for(;!(y()||h("?>"));){const w=f();if(!w)return a;a.attributes[w.name]=w.value}return m(/\?>/),{excluded:i?!1:t.filter(a)===!1,node:a}}function s(i){const n=m(/^<([\w-:.]+)\s*/);if(!n)return;const a={type:"Element",name:n[1],attributes:{},children:[]};for(;!(y()||h(">")||h("?>")||h("/>"));){const l=f();if(!l)return a;a.attributes[l.name]=l.value}const w=i?!1:t.filter(a)===!1;if(m(/^\s*\/>/))return a.children=null,{excluded:w,node:a};if(m(/\??>/),!w){let l=c();for(;l;)l.excluded||a.children.push(l.node),l=c()}return m(/^<\/[\w-:.]+>/),{excluded:w,node:a}}function F(){const i=m(/^<!DOCTYPE\s+[^>]*>/);if(i){const n={type:"DocumentType",content:i[0]};return{excluded:t.filter(n)===!1,node:n}}}function p(){if(e.startsWith("<![CDATA[")){const i=e.indexOf("]]>");if(i>-1){const n=i+3,a={type:"CDATA",content:e.substring(0,n)};return e=e.slice(n),{excluded:t.filter(a)===!1,node:a}}}}function o(){const i=m(/^<!--[\s\S]*?-->/);if(i){const n={type:"Comment",content:i[0]};return{excluded:t.filter(n)===!1,node:n}}}function k(){const i=m(/^([^<]+)/);if(i){const n={type:"Text",content:i[1]};return{excluded:t.filter(n)===!1,node:n}}}function f(){const i=m(/([\w:-]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);if(!!i)return{name:i[1],value:u(i[2])}}function u(i){return i.replace(/^['"]|['"]$/g,"")}function m(i){const n=e.match(i);if(!!n)return e=e.slice(n[0].length),n}function y(){return e.length===0}function h(i){return e.indexOf(i)===0}return e=e.trim(),x()}var $=Q;function j(e){if(!e.options.indentation&&!e.options.lineSeparator)return;e.content+=e.options.lineSeparator;let t;for(t=0;t<e.level;t++)e.content+=e.options.indentation}function S(e,t){e.content+=t}function H(e,t,c){if(typeof e.content=="string")ee(e,t,c);else if(e.type==="Element")te(e,t,c);else if(e.type==="ProcessingInstruction")Y(e,t);else throw new Error("Unknown node type: "+e.type)}function ee(e,t,c){c||(e.content=e.content.trim()),e.content.length>0&&(!c&&t.content.length>0&&j(t),S(t,e.content))}function te(e,t,c){if(!c&&t.content.length>0&&j(t),S(t,"<"+e.name),W(t,e.attributes),e.children===null){const r=t.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";S(t,r)}else if(e.children.length===0)S(t,"></"+e.name+">");else{S(t,">"),t.level++;let r=e.attributes["xml:space"]==="preserve";if(!r&&t.options.collapseContent){let x=!1,v=!1,d=!1;e.children.forEach(function(s,F){s.type==="Text"?(s.content.includes(`
import"./mavon-editor.824ddc3c.js";import"./index.c860d973.js";import{_ as K}from"./main.4232e7c8.js";import{al as M,ap as J,y as A,r as T,o as g,b as I,e as Z,a as b,w as _,c as L,k as D,F as B,m as R,t as q,d as X}from"./vendor.2a860d56.js";import{a as z}from"./index.7873781e.js";function Q(e,t={}){t.filter=t.filter||(()=>!0);function c(){return s()||k()||o()||p()}function r(){return m(/\s*/),s(!0)||o()||F()||d(!1)}function x(){const i=v(),n=[];let a,w=r();for(;w;){if(w.node.type==="Element"){if(a)throw new Error("Found multiple root nodes");a=w.node}w.excluded||n.push(w.node),w=r()}if(!a)throw new Error("Failed to parse XML");return{declaration:i?i.node:null,root:a,children:n}}function v(){return d(!0)}function d(i){const n=m(i?/^<\?(xml)\s*/:/^<\?([\w-:.]+)\s*/);if(!n)return;const a={name:n[1],type:"ProcessingInstruction",attributes:{}};for(;!(y()||h("?>"));){const w=f();if(!w)return a;a.attributes[w.name]=w.value}return m(/\?>/),{excluded:i?!1:t.filter(a)===!1,node:a}}function s(i){const n=m(/^<([\w-:.]+)\s*/);if(!n)return;const a={type:"Element",name:n[1],attributes:{},children:[]};for(;!(y()||h(">")||h("?>")||h("/>"));){const l=f();if(!l)return a;a.attributes[l.name]=l.value}const w=i?!1:t.filter(a)===!1;if(m(/^\s*\/>/))return a.children=null,{excluded:w,node:a};if(m(/\??>/),!w){let l=c();for(;l;)l.excluded||a.children.push(l.node),l=c()}return m(/^<\/[\w-:.]+>/),{excluded:w,node:a}}function F(){const i=m(/^<!DOCTYPE\s+[^>]*>/);if(i){const n={type:"DocumentType",content:i[0]};return{excluded:t.filter(n)===!1,node:n}}}function p(){if(e.startsWith("<![CDATA[")){const i=e.indexOf("]]>");if(i>-1){const n=i+3,a={type:"CDATA",content:e.substring(0,n)};return e=e.slice(n),{excluded:t.filter(a)===!1,node:a}}}}function o(){const i=m(/^<!--[\s\S]*?-->/);if(i){const n={type:"Comment",content:i[0]};return{excluded:t.filter(n)===!1,node:n}}}function k(){const i=m(/^([^<]+)/);if(i){const n={type:"Text",content:i[1]};return{excluded:t.filter(n)===!1,node:n}}}function f(){const i=m(/([\w:-]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);if(!!i)return{name:i[1],value:u(i[2])}}function u(i){return i.replace(/^['"]|['"]$/g,"")}function m(i){const n=e.match(i);if(!!n)return e=e.slice(n[0].length),n}function y(){return e.length===0}function h(i){return e.indexOf(i)===0}return e=e.trim(),x()}var $=Q;function j(e){if(!e.options.indentation&&!e.options.lineSeparator)return;e.content+=e.options.lineSeparator;let t;for(t=0;t<e.level;t++)e.content+=e.options.indentation}function S(e,t){e.content+=t}function H(e,t,c){if(typeof e.content=="string")ee(e,t,c);else if(e.type==="Element")te(e,t,c);else if(e.type==="ProcessingInstruction")Y(e,t);else throw new Error("Unknown node type: "+e.type)}function ee(e,t,c){c||(e.content=e.content.trim()),e.content.length>0&&(!c&&t.content.length>0&&j(t),S(t,e.content))}function te(e,t,c){if(!c&&t.content.length>0&&j(t),S(t,"<"+e.name),W(t,e.attributes),e.children===null){const r=t.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";S(t,r)}else if(e.children.length===0)S(t,"></"+e.name+">");else{S(t,">"),t.level++;let r=e.attributes["xml:space"]==="preserve";if(!r&&t.options.collapseContent){let x=!1,v=!1,d=!1;e.children.forEach(function(s,F){s.type==="Text"?(s.content.includes(`
`)?(v=!0,s.content=s.content.trim()):(F===0||F===e.children.length-1)&&s.content.trim().length===0&&(s.content=""),s.content.length>0&&(x=!0)):d=!0}),x&&(!d||!v)&&(r=!0)}e.children.forEach(function(x){H(x,t,c||r,t.options)}),t.level--,!c&&!r&&j(t),S(t,"</"+e.name+">")}}function W(e,t){Object.keys(t).forEach(function(c){const r=t[c].replace(/"/g,"&quot;");S(e," "+c+'="'+r+'"')})}function Y(e,t){t.content.length>0&&j(t),S(t,"<?"+e.name),W(t,e.attributes),S(t,"?>")}function ne(e,t={}){t.indentation="indentation"in t?t.indentation:" ",t.collapseContent=t.collapseContent===!0,t.lineSeparator="lineSeparator"in t?t.lineSeparator:`\r
`,t.whiteSpaceAtEndOfSelfclosingTag=!!t.whiteSpaceAtEndOfSelfclosingTag;const r=$(e,{filter:t.filter}),x={content:"",level:0,options:t};return r.declaration&&Y(r.declaration,x),r.children.forEach(function(v){H(v,x,!1)}),x.content.replace(/\r\n/g,`
`).replace(/\n/g,t.lineSeparator)}var Le=ne;const ae={props:{paramList:{type:Array,required:!0},showType:{type:Boolean}},components:{CloseOutlined:M,UploadOutlined:J},emits:["update:selected"],setup(e,{attrs:t,slots:c,emit:r,expose:x}){let v=A(e.paramList),d=1e4;(v.value.length<=0||!v.value[v.value.length-1].isLastRow)&&e.paramList.push({name:"",value:void 0,type:"integer",key:++d,isLastRow:!0});let s=A([]);v.value.forEach(l=>{l.value=l.value||l.example||void 0,(l.enum&&l.type==="array"||l.type==="file"||l.subType==="MultipartFile")&&(l.value=[]),s.value.push(l.key)});const F=(l,C)=>{s.value=l},p=l=>{l.isLastRow&&(l.isLastRow=!1,e.paramList.push({name:"",value:void 0,type:"integer",key:++d,isLastRow:!0}),s.value.push(d))},o=l=>{if(!l.isLastRow){let C=e.paramList.findIndex(P=>P===l);e.paramList.splice(C,1)}};let k=A([]);k.value.push({title:"\u53C2\u6570\u540D",dataIndex:"name",width:250}),e.showType,k.value.push({title:"\u53C2\u6570\u503C",dataIndex:"value"}),k.value.push({title:"",dataIndex:"action",width:40});const f=(l,C)=>(C.type!=="array"?C.value=[l]:C.value=[...C.value,l],!1),u=(l,C)=>{C.value=C.value.filter(P=>P!==l)},m=l=>l.type==="file"||l.subType==="file"||l.subType==="MultipartFile";let y=A(!1),h=A("");const i=()=>{y.value=!0,h.value=v.value.filter(l=>l.name||l.value).map(l=>m(l)?(l.name||"")+":":(l.name||"")+":"+(l.value||"")).join(`

View File

@@ -5,9 +5,9 @@
<link rel="icon" href="api-logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>API文档管理</title>
<script type="module" crossorigin src="assets/main.e2223e67.js"></script>
<script type="module" crossorigin src="assets/main.4232e7c8.js"></script>
<link rel="modulepreload" href="assets/vendor.2a860d56.js">
<link rel="stylesheet" href="assets/style.d5d70d4b.css">
<link rel="stylesheet" href="assets/style.a6d9edcc.css">
</head>
<body>
<div id="app"></div>

View File

@@ -1,17 +1,15 @@
<template>
<a-layout class="api-menu-trigger">
<a-layout-sider theme="light" :trigger="null" collapsible v-model:collapsed="appMenuCollapsed" :width="rightAsideWidth" style="height: 100vh;overflow: auto;">
<div class="logo">
<a-layout-sider theme="light" :trigger="null" collapsible v-model:collapsed="appMenuCollapsed" :width="leftAsideWidth" style="height: 100vh;overflow: auto;">
<div class="header-border logo">
<img src="../../assets/api-logo.png">
<h1>API接口文档管理</h1>
</div>
<menu-layout :collapsed="appMenuCollapsed"></menu-layout>
</a-layout-sider>
<div ref="rightResize" class="right-resize" v-show="!appMenuCollapsed">
<i ref="rightResizeBar">...</i>
</div>
<LeftResize v-model:value="leftAsideWidth" v-show="!appMenuCollapsed"></LeftResize>
<a-layout>
<a-layout-header style="border-bottom: 2px solid #eee;background: #fff; padding: 0; box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);-webkit-box-shadow:0 1px 4px rgba(0, 21, 41, 0.08);">
<a-layout-header class="header-border">
<a-row type="flex">
<a-col flex="auto">
<MenuUnfoldOutlined class="trigger" v-if="appMenuCollapsed" @click="appMenuCollapsed = !appMenuCollapsed"/>
@@ -33,57 +31,32 @@
import HeaderAvatar from './HeaderAvatar.vue'
import MenuLayout from './MenuLayout.vue'
import GlobalFooter from './GlobalFooter.vue'
import LeftResize from './components/LeftResize.vue'
import {BarChartOutlined, MenuFoldOutlined, MenuUnfoldOutlined} from '@ant-design/icons-vue';
const minHeight = window.innerHeight - 64 - 122;
export default {
name: 'GlobalLayout',
components: {HeaderAvatar, MenuLayout, GlobalFooter, BarChartOutlined, MenuFoldOutlined, MenuUnfoldOutlined},
components: {
LeftResize,
HeaderAvatar,
MenuLayout,
GlobalFooter,
BarChartOutlined,
MenuFoldOutlined,
MenuUnfoldOutlined
},
data() {
return {
minHeight: minHeight + 'px',
appMenuCollapsed: false,
rightAsideWidth: 300
leftAsideWidth: 300
}
},
computed: {},
mounted() {
this.dragChangeRightAsideWidth();
},
methods: {
dragChangeRightAsideWidth: function() {
// 保留this引用
let resize = this.$refs.rightResize;
let resizeBar = this.$refs.rightResizeBar;
resize.onmousedown = e => {
let startX = e.clientX;
// 颜色改变提醒
resize.style.background = "#ccc";
resizeBar.style.background = "#aaa";
resize.left = resize.offsetLeft;
document.onmousemove = e2 => {
// 计算并应用位移量
let endX = e2.clientX;
let moveLen = startX - endX;
if ((moveLen < 0 && this.rightAsideWidth < 600) || (moveLen > 0 && this.rightAsideWidth > 280)) {
startX = endX;
this.rightAsideWidth -= moveLen;
if (this.rightAsideWidth < 280) {
this.rightAsideWidth = 280;
}
}
};
document.onmouseup = () => {
// 颜色恢复
resize.style.background = "#fafafa";
resizeBar.style.background = "#ccc";
document.onmousemove = null;
document.onmouseup = null;
};
return false;
};
}
},
methods: {},
}
</script>
@@ -100,6 +73,14 @@
color: #1890ff;
}
.header-border {
border-bottom: 2px solid #eee;
background: #fff;
padding: 0;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
-webkit-box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}
.logo {
height: 64px;
position: relative;
@@ -108,11 +89,13 @@
-webkit-transition: all .3s;
transition: all .3s;
overflow: hidden;
/*background: #fff;*/
background: #1d4e89;
}
.logo h1 {
color: #fff;
/*color: #2c3e50;*/
font-size: 20px;
margin: 0 0 0 12px;
font-family: "Myriad Pro", "Helvetica Neue", Arial, Helvetica, sans-serif;
@@ -132,27 +115,5 @@
.api-menu-trigger {
min-height: 100%;
}
.right-resize {
width: 5px;
cursor: w-resize;
background: #fafafa;
}
.right-resize i{
margin-top: 300px;
width: 5px;
height: 35px;
display: inline-block;
word-wrap: break-word;
word-break: break-all;
line-height: 8px;
border-radius: 5px;
background: #ccc;
color: #888;
}
</style>
<style>
.ant-layout-sider {
transition: none;
}
</style>

View File

@@ -0,0 +1,83 @@
<template>
<div ref="leftResizeRef" class="left-resize">
<i ref="leftResizeBarRef">...</i>
</div>
</template>
<script>
import {computed, onMounted, ref, watch} from 'vue';
export default {
emits: ['update:value', 'change'],
setup(props, {emit}) {
onMounted(() => {
dragChangeRightAsideWidth();
});
let leftAsideWidth = ref(300);
let leftResizeRef = ref();
let leftResizeBarRef = ref();
const dragChangeRightAsideWidth = () => {
// 保留this引用
let resize = leftResizeRef.value;
let resizeBar = leftResizeBarRef.value;
resize.onmousedown = e => {
let startX = e.clientX;
// 颜色改变提醒
resize.style.background = "#ccc";
resizeBar.style.background = "#aaa";
resize.left = resize.offsetLeft;
document.onmousemove = e2 => {
// 计算并应用位移量
let endX = e2.clientX;
let moveLen = startX - endX;
if ((moveLen < 0 && leftAsideWidth.value < 600) || (moveLen > 0 && leftAsideWidth.value > 300)) {
startX = endX;
leftAsideWidth.value -= moveLen;
if (leftAsideWidth.value < 300) {
leftAsideWidth.value = 300;
}
emit('update:value', leftAsideWidth.value);
emit('change', leftAsideWidth.value);
}
};
document.onmouseup = () => {
// 颜色恢复
resize.style.background = "#fafafa";
resizeBar.style.background = "#ccc";
document.onmousemove = null;
document.onmouseup = null;
};
return false;
};
};
return {
leftAsideWidth,
leftResizeRef,
leftResizeBarRef
};
},
};
</script>
<style scoped>
.left-resize {
width: 5px;
height: 100vh;
cursor: w-resize;
background: #fafafa;
}
.left-resize i {
margin-top: 300px;
width: 5px;
height: 35px;
display: inline-block;
word-wrap: break-word;
word-break: break-all;
line-height: 8px;
border-radius: 5px;
background: #ccc;
color: #888;
}
</style>

View File

@@ -1,17 +1,15 @@
<template>
<a-layout class="api-menu-trigger">
<a-layout-sider theme="light" :trigger="null" collapsible v-model:collapsed="appMenuCollapsed" :width="leftAsideWidth" style="height: 100vh;overflow: auto;">
<div class="logo">
<div class="header-border logo">
<img src="../../assets/api-logo.png">
<h1>API开放文档</h1>
</div>
<menu-layout :collapsed="appMenuCollapsed"></menu-layout>
</a-layout-sider>
<div ref="rightResize" class="right-resize" v-show="!appMenuCollapsed">
<i ref="rightResizeBar">...</i>
</div>
<LeftResize v-model:value="leftAsideWidth" @change="leftAsideWidthChange" v-show="!appMenuCollapsed"></LeftResize>
<a-layout>
<a-layout-header style="border-bottom: 2px solid #eee;background: #fff; padding: 0; box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);-webkit-box-shadow:0 1px 4px rgba(0, 21, 41, 0.08);">
<a-layout-header class="header-border">
<a-row type="flex">
<a-col flex="auto">
<MenuUnfoldOutlined class="trigger" v-if="appMenuCollapsed" @click="turnLeftCollapse"/>
@@ -30,11 +28,12 @@
<script>
import MenuLayout from './MenuLayout.vue'
import LeftResize from '../layouts/components/LeftResize.vue'
import {BarChartOutlined, MenuFoldOutlined, MenuUnfoldOutlined} from '@ant-design/icons-vue';
const minHeight = window.innerHeight - 64 - 122;
export default {
components: {MenuLayout, BarChartOutlined, MenuFoldOutlined, MenuUnfoldOutlined},
components: {MenuLayout, LeftResize, BarChartOutlined, MenuFoldOutlined, MenuUnfoldOutlined},
data() {
return {
minHeight: minHeight + 'px',
@@ -44,7 +43,6 @@
},
computed: {},
mounted() {
this.dragChangeLeftAsideWidth();
},
methods: {
turnLeftCollapse() {
@@ -59,39 +57,6 @@
},
leftAsideWidthChange(width) {
this.$store.commit('setLeftAsideWidth', width);
},
dragChangeLeftAsideWidth: function() {
// 保留this引用
let resize = this.$refs.rightResize;
let resizeBar = this.$refs.rightResizeBar;
resize.onmousedown = e => {
let startX = e.clientX;
// 颜色改变提醒
resize.style.background = "#ccc";
resizeBar.style.background = "#aaa";
resize.left = resize.offsetLeft;
document.onmousemove = e2 => {
// 计算并应用位移量
let endX = e2.clientX;
let moveLen = startX - endX;
if ((moveLen < 0 && this.leftAsideWidth < 600) || (moveLen > 0 && this.leftAsideWidth > 280)) {
startX = endX;
this.leftAsideWidth -= moveLen;
if (this.leftAsideWidth < 280) {
this.leftAsideWidth = 280;
}
this.leftAsideWidthChange(this.leftAsideWidth);
}
};
document.onmouseup = () => {
// 颜色恢复
resize.style.background = "#fafafa";
resizeBar.style.background = "#ccc";
document.onmousemove = null;
document.onmouseup = null;
};
return false;
};
}
},
}
@@ -109,6 +74,13 @@
.trigger:hover {
color: #1890ff;
}
.header-border {
border-bottom: 2px solid #eee;
background: #fff;
padding: 0;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
-webkit-box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}
.logo {
height: 64px;
@@ -142,27 +114,4 @@
.api-menu-trigger {
min-height: 100%;
}
.right-resize {
width: 5px;
cursor: w-resize;
background: #fafafa;
}
.right-resize i{
margin-top: 300px;
width: 5px;
height: 35px;
display: inline-block;
word-wrap: break-word;
word-break: break-all;
line-height: 8px;
border-radius: 5px;
background: #ccc;
color: #888;
}
</style>
<style>
.ant-layout-sider {
transition: none;
}
</style>