Files
zyplayer-doc/zyplayer-doc-api/src/main/resources/dist/assets/main.8a6f02ce.js
暮光:城中城 d2705f0313 build
2021-12-28 23:59:05 +08:00

2 lines
12 KiB
JavaScript

import{z as k,r as h,o as r,c as p,w as g,a as _,P as E,b as v,F as A,d as T,e as w,f as y,K as R,g as $,h as x,i as M,j as I,A as S,l as V}from"./vendor.af29ba15.js";const N=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function a(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=a(i);fetch(i.href,o)}};N();var b=(e,t)=>{const a=e.__vccOpts||e;for(const[n,i]of t)a[n]=i;return a};const C={name:"app",components:{},data(){return{locale:k}},methods:{}};function j(e,t,a,n,i,o){const s=h("router-view"),u=h("a-config-provider");return r(),p(u,{locale:i.locale},{default:g(()=>[_(s)]),_:1},8,["locale"])}var q=b(C,[["render",j]]);const K="modulepreload",O={},G="",l=function(t,a){return!a||a.length===0?t():Promise.all(a.map(n=>{if(n=`${G}${n}`,n in O)return;O[n]=!0;const i=n.endsWith(".css"),o=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${o}`))return;const s=document.createElement("link");if(s.rel=i?"stylesheet":K,i||(s.as="script",s.crossOrigin=""),s.href=n,document.head.appendChild(s),i)return new Promise((u,m)=>{s.addEventListener("load",u),s.addEventListener("error",m)})})).then(()=>t())};const U={name:"PageTableView",components:{PlusOutlined:E},data(){return{pageList:[],linkList:[],activePage:"",multiPage:!0,ignoreParamPath:["/data/export"],apiRequestIndex:1}},computed:{pageTabNameMap(){return this.$store.state.pageTabNameMap}},created(){let{name:e,path:t,fullPath:a}=this.$route;this.pageList.push({name:e,path:t,fullPath:a});let n=this.getRouteRealPath(this.$route);this.linkList.push(n),this.activePage=n,this.$router.push(this.$route.fullPath)},watch:{$route:function(e,t){let a=this.getRouteRealPath(e);if(this.activePage=a,this.linkList.indexOf(a)<0){this.linkList.push(a);let{name:i,path:o,fullPath:s}=e;this.pageList.push({name:i,path:o,fullPath:s})}let n=this.pageList.find(i=>this.getRouteRealPath(i)===a);n.fullPath=e.fullPath}},methods:{isIgnoreParamPath(e){return this.ignoreParamPath.indexOf(e)>=0},getRouteRealPath(e){return this.isIgnoreParamPath(e.path)?e.path:e.fullPath},changePage(e){let t=this.pageList.find(a=>a.fullPath===e);this.activePage=this.getRouteRealPath(t),this.$router.push(t.fullPath)},editPage(e,t){this[t](e)},editPageTab(e,t){t==="add"?this.addPageTab():this.removePageTab(e)},addPageTab(){this.$router.push({path:"/custom/request",query:{id:this.apiRequestIndex++}})},removePageTab(e){if(this.pageList.length===1){this.$message.warning("\u8FD9\u662F\u6700\u540E\u4E00\u9875\uFF0C\u4E0D\u80FD\u518D\u5173\u95ED\u4E86\u5566");return}this.pageList=this.pageList.filter(a=>this.getRouteRealPath(a)!==e),this.linkList=this.linkList.filter(a=>a!==e);let t=this.linkList.indexOf(this.activePage);t<0&&(t=this.linkList.length-1,this.activePage=this.linkList[t],this.$router.push(this.activePage))}}},W={class:"page-layout"},B={class:"page-body"};function F(e,t,a,n,i,o){const s=h("plus-outlined"),u=h("a-tooltip"),m=h("a-tab-pane"),c=h("a-tabs"),L=h("router-view");return r(),v("div",W,[_(c,{type:"editable-card",activeKey:i.activePage,"onUpdate:activeKey":t[0]||(t[0]=d=>i.activePage=d),onTabClick:o.changePage,onEdit:o.editPageTab,style:{padding:"5px 10px 0"}},{addIcon:g(()=>[_(u,{title:"\u65B0\u5EFA\u4E00\u4E2AAPI\u63A5\u53E3"},{default:g(()=>[_(s)]),_:1})]),default:g(()=>[(r(!0),v(A,null,T(i.pageList,d=>(r(),p(m,{closable:"",tab:o.pageTabNameMap[d.fullPath]||d.name,name:o.getRouteRealPath(d),fullPath:d.fullPath,key:d.fullPath},null,8,["tab","name","fullPath"]))),128))]),_:1},8,["activeKey","onTabClick","onEdit"]),w("div",B,[_(L,null,{default:g(({Component:d,route:D})=>[(r(),p(R,null,[(r(),p(y(d),{key:D.fullPath}))],1024))]),_:1})])])}var H=b(U,[["render",F]]);const z={name:"PageTableView",components:{},data(){return{pageList:[],linkList:[],activePage:"",multiPage:!0,ignoreParamPath:[],apiRequestIndex:1}},computed:{pageTabNameMap(){return this.$store.state.pageTabNameMap}},created(){let{name:e,path:t,fullPath:a}=this.$route;this.pageList.push({name:e,path:t,fullPath:a});let n=this.getRouteRealPath(this.$route);this.linkList.push(n),this.activePage=n,this.$router.push(this.$route.fullPath)},watch:{$route:function(e,t){let a=this.getRouteRealPath(e);if(this.activePage=a,this.linkList.indexOf(a)<0){this.linkList.push(a);let{name:i,path:o,fullPath:s}=e;this.pageList.push({name:i,path:o,fullPath:s})}let n=this.pageList.find(i=>this.getRouteRealPath(i)===a);n.fullPath=e.fullPath}},methods:{isIgnoreParamPath(e){return this.ignoreParamPath.indexOf(e)>=0},getRouteRealPath(e){return this.isIgnoreParamPath(e.path)?e.path:e.fullPath},changePage(e){let t=this.pageList.find(a=>a.fullPath===e);this.activePage=this.getRouteRealPath(t),this.$router.push(t.fullPath)},editPage(e,t){this[t](e)},editPageTab(e,t){this.removePageTab(e)},removePageTab(e){if(this.pageList.length===1){this.$message.warning("\u8FD9\u662F\u6700\u540E\u4E00\u9875\uFF0C\u4E0D\u80FD\u518D\u5173\u95ED\u4E86\u5566");return}this.pageList=this.pageList.filter(a=>this.getRouteRealPath(a)!==e),this.linkList=this.linkList.filter(a=>a!==e);let t=this.linkList.indexOf(this.activePage);t<0&&(t=this.linkList.length-1,this.activePage=this.linkList[t],this.$router.push(this.activePage))}}},J={class:"page-layout"},Q={class:"page-body"};function X(e,t,a,n,i,o){const s=h("a-tab-pane"),u=h("a-tabs"),m=h("router-view");return r(),v("div",J,[_(u,{type:"editable-card","hide-add":"",activeKey:i.activePage,"onUpdate:activeKey":t[0]||(t[0]=c=>i.activePage=c),onTabClick:o.changePage,onEdit:o.editPageTab,style:{padding:"5px 10px 0"}},{default:g(()=>[(r(!0),v(A,null,T(i.pageList,c=>(r(),p(s,{closable:"",tab:o.pageTabNameMap[c.fullPath]||c.name,name:o.getRouteRealPath(c),fullPath:c.fullPath,key:c.fullPath},null,8,["tab","name","fullPath"]))),128))]),_:1},8,["activeKey","onTabClick","onEdit"]),w("div",Q,[_(m,null,{default:g(({Component:c,route:L})=>[(r(),p(R,null,[(r(),p(y(c),{key:L.fullPath}))],1024))]),_:1})])])}var Y=b(z,[["render",X]]);const Z={name:"EmptyLayout",components:{},props:[],data(){return{}},methods:{}};function ee(e,t,a,n,i,o){const s=h("router-view");return r(),p(s,null,{default:g(({Component:u,route:m})=>[(r(),p(R,null,[(r(),p(y(u),{key:m.fullPath}))],1024))]),_:1})}var f=b(Z,[["render",ee]]);let te=[{path:"/",name:"\u4E3B\u9875",component:()=>l(()=>import("./GlobalLayout.8059a0b1.js"),["assets/GlobalLayout.8059a0b1.js","assets/custom.75470d4e.js","assets/vendor.af29ba15.js","assets/api-logo.923795a3.js"]),redirect:"/manage",children:[{path:"/doc",name:"\u6587\u6863\u7BA1\u7406",component:H,children:[{path:"/manage",name:"\u6587\u6863\u5730\u5740\u7BA1\u7406",meta:{icon:"FileTextOutlined"},component:()=>l(()=>import("./DocManage.4d791184.js"),["assets/DocManage.4d791184.js","assets/custom.75470d4e.js","assets/vendor.af29ba15.js","assets/index.00076c23.js","assets/index.1abd215d.js","assets/EditGlobalParam.622c2bb5.js"])},{path:"/setting",name:"\u7CFB\u7EDF\u8BBE\u7F6E",meta:{icon:"SettingOutlined"},component:f,children:[{path:"/setting/globalParam",name:"\u5168\u5C40\u53C2\u6570",component:()=>l(()=>import("./GlobalParam.c3528cdd.js"),["assets/GlobalParam.c3528cdd.js","assets/custom.75470d4e.js","assets/vendor.af29ba15.js","assets/EditGlobalParam.622c2bb5.js"])},{path:"/setting/view",name:"\u5C55\u793A\u914D\u7F6E",meta:{hidden:!0},component:()=>l(()=>import("./SettingView.1c4752a0.js"),["assets/SettingView.1c4752a0.js","assets/vendor.af29ba15.js"])}]},{path:"/swagger",name:"swagger\u6587\u6863",meta:{hidden:!0,icon:"SettingOutlined"},component:f,children:[{path:"/swagger/info",name:"Swagger\u6587\u6863\u4FE1\u606F",component:()=>l(()=>import("./DocInfo.a3347cdd.js"),["assets/DocInfo.a3347cdd.js","assets/vendor.af29ba15.js","assets/index.1abd215d.js"])},{path:"/swagger/view",name:"Swagger\u6587\u6863\u5C55\u793A",component:()=>l(()=>import("./DocView.1ab49162.js"),["assets/DocView.1ab49162.js","assets/vendor.af29ba15.js","assets/DocContent.4d0505a2.js","assets/logUtil.2d61b852.js","assets/index.1abd215d.js","assets/unitConvert.699229d7.js","assets/index.00076c23.js","assets/custom.75470d4e.js"])}]},{path:"/openapi",name:"openApi\u6587\u6863",meta:{hidden:!0,icon:"SettingOutlined"},component:f,children:[{path:"/openapi/info",name:"OpenApi\u6587\u6863\u4FE1\u606F",component:()=>l(()=>import("./DocInfo.2b6bc6ec.js"),["assets/DocInfo.2b6bc6ec.js","assets/vendor.af29ba15.js","assets/index.1abd215d.js"])},{path:"/openapi/view",name:"OpenApi\u6587\u6863\u5C55\u793A",component:()=>l(()=>import("./DocView.49e0e1e3.js"),["assets/DocView.49e0e1e3.js","assets/vendor.af29ba15.js","assets/DocContent.dfc05575.js","assets/logUtil.2d61b852.js","assets/index.1abd215d.js","assets/unitConvert.699229d7.js","assets/index.00076c23.js","assets/custom.75470d4e.js"])}]},{path:"/custom",name:"API\u8BF7\u6C42",meta:{hidden:!0},component:f,children:[{path:"/custom/request",name:"\u63A5\u53E3\u8BF7\u6C42",component:()=>l(()=>import("./ApiRequest.5d426f76.js"),["assets/ApiRequest.5d426f76.js","assets/vendor.af29ba15.js","assets/index.1abd215d.js","assets/unitConvert.699229d7.js","assets/index.00076c23.js","assets/custom.75470d4e.js"])}]}]}]},{path:"/share",name:"\u5F00\u653E\u6587\u6863",component:()=>l(()=>import("./GlobalLayout.8edc6631.js"),["assets/GlobalLayout.8edc6631.js","assets/vendor.af29ba15.js","assets/custom.75470d4e.js","assets/api-logo.923795a3.js"]),children:[{path:"/doc",name:"\u5F00\u653E\u6587\u6863\u7BA1\u7406",component:Y,children:[{path:"/share/home",name:"\u5F00\u653E\u6587\u6863\u4F7F\u7528\u8BF4\u660E",meta:{icon:"FileTextOutlined"},component:()=>l(()=>import("./ShareHome.3ab02483.js"),["assets/ShareHome.3ab02483.js","assets/vendor.af29ba15.js","assets/index.1abd215d.js"])},{path:"/doc",name:"\u5F00\u653E\u6587\u6863\u67E5\u770B",meta:{hidden:!0},component:f,children:[{path:"/share/swagger/view",name:"Swagger\u5F00\u653E\u6587\u6863\u5C55\u793A",component:()=>l(()=>import("./DocView.dc2aa36d.js"),["assets/DocView.dc2aa36d.js","assets/vendor.af29ba15.js","assets/DocContent.4d0505a2.js","assets/logUtil.2d61b852.js","assets/index.1abd215d.js"])},{path:"/share/openapi/view",name:"OpenApi\u5F00\u653E\u6587\u6863\u5C55\u793A",component:()=>l(()=>import("./DocView.e820631a.js"),["assets/DocView.e820631a.js","assets/vendor.af29ba15.js","assets/DocContent.dfc05575.js","assets/logUtil.2d61b852.js","assets/index.1abd215d.js"])}]}]}]}];var ae=$({state(){return{docChangedNum:1,userInfo:{},pageTabNameMap:{},apiDoc:{},globalParam:[],docGlobalParam:[],leftAsideWidth:0,swaggerDoc:{},swaggerDefinitions:{},swaggerUrlMethodMap:{},swaggerMethodStatistic:{},openApiDoc:{},openApiComponents:{},openApiUrlMethodMap:{},openApiMethodStatistic:{},customRequestDoc:{}}},getters:{getDocChangedNum:e=>()=>e.docChangedNum,getLeftAsideWidth:e=>()=>e.leftAsideWidth,getApiDoc:e=>()=>e.apiDoc},mutations:{setUserInfo(e,t){e.userInfo=t},setGlobalParam(e,t){e.globalParam=t},setDocGlobalParam(e,t){e.docGlobalParam=t},setGlobalParamOnChange(e,t,a){a&&a>0?e.apiDoc.id===a&&(e.docGlobalParam=t):e.globalParam=t},setApiDoc(e,t){e.apiDoc=t},addDocChangedNum(e){e.docChangedNum++},setLeftAsideWidth(e,t){e.leftAsideWidth=t},setSwaggerDoc(e,t){e.swaggerDoc=t,e.swaggerDefinitions=t.definitions||{}},setSwaggerUrlMethodMap(e,t){e.swaggerUrlMethodMap=t},setSwaggerMethodStatistic(e,t){e.swaggerMethodStatistic=t},setOpenApiDoc(e,t){e.openApiDoc=t,e.openApiComponents=t.components||{}},setOpenApiUrlMethodMap(e,t){e.openApiUrlMethodMap=t},setOpenApiMethodStatistic(e,t){e.openApiMethodStatistic=t},setCustomRequestDoc(e,t){e.customRequestDoc=t},addTableName(e,t){let a=Object.assign({},e.pageTabNameMap);a[t.key]=t.val,e.pageTabNameMap=a}}});const ie=x({history:M(),routes:te}),P=I(q);P.config.productionTip=!1;P.use(S);P.use(ie);P.use(ae);P.mount("#app");P.directive("highlight",{updated(e){e.querySelectorAll("pre code").forEach(a=>{V.highlightBlock(a)})}});export{b as _};