Files
zyplayer-doc/zyplayer-doc-api/src/main/resources/dist/assets/main.5fd30069.js
2023-10-15 08:36:55 +08:00

2 lines
12 KiB
JavaScript

import{z as w,r as p,o as l,c as u,w as m,a as _,P as k,b as P,F as y,d as R,e as A,f as b,K as L,g as D,h as E,i as O,j as $,A as x,l as M}from"./vendor.6399378c.js";const C=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const n of o.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&s(n)}).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 s(i){if(i.ep)return;i.ep=!0;const o=a(i);fetch(i.href,o)}};C();var f=(e,t)=>{const a=e.__vccOpts||e;for(const[s,i]of t)a[s]=i;return a};const I={name:"app",components:{},data(){return{locale:w}},methods:{}};function V(e,t,a,s,i,o){const n=p("router-view"),h=p("a-config-provider");return l(),u(h,{locale:i.locale},{default:m(()=>[_(n)]),_:1},8,["locale"])}var N=f(I,[["render",V]]);const S="modulepreload",T={},q="",c=function(t,a){return!a||a.length===0?t():Promise.all(a.map(s=>{if(s=`${q}${s}`,s in T)return;T[s]=!0;const i=s.endsWith(".css"),o=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${o}`))return;const n=document.createElement("link");if(n.rel=i?"stylesheet":S,i||(n.as="script",n.crossOrigin=""),n.href=s,document.head.appendChild(n),i)return new Promise((h,d)=>{n.addEventListener("load",h),n.addEventListener("error",d)})})).then(()=>t())};const j={name:"PageTableView",components:{PlusOutlined:k},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,query:s}=this.$route,i={name:e,path:t,fullPath:a,query:s};this.pageList.push(i);let o=this.getRouteRealPath(this.$route);this.linkList.push(o),this.activePage=o,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:n,query:h}=e;this.pageList.push({name:i,path:o,fullPath:n,query:h})}let s=this.pageList.find(i=>this.getRouteRealPath(i)===a);s.fullPath=e.fullPath,this.$store.commit("setActivePage",s)}},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))}}},K={class:"page-layout"},G={class:"page-body"};function U(e,t,a,s,i,o){const n=p("a-tab-pane"),h=p("a-tabs"),d=p("router-view");return l(),P("div",K,[_(h,{type:"editable-card","hide-add":"",activeKey:i.activePage,"onUpdate:activeKey":t[0]||(t[0]=r=>i.activePage=r),onTabClick:o.changePage,onEdit:o.editPageTab,style:{padding:"5px 10px 0"}},{default:m(()=>[(l(!0),P(y,null,R(i.pageList,r=>(l(),u(n,{closable:"",tab:o.pageTabNameMap[r.fullPath]||r.name,name:o.getRouteRealPath(r),fullPath:r.fullPath,key:r.fullPath},null,8,["tab","name","fullPath"]))),128))]),_:1},8,["activeKey","onTabClick","onEdit"]),A("div",G,[_(d,null,{default:m(({Component:r,route:v})=>[(l(),u(L,null,[(l(),u(b(r),{key:v.fullPath}))],1024))]),_:1})])])}var W=f(j,[["render",U]]);const B={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 s=this.getRouteRealPath(this.$route);this.linkList.push(s),this.activePage=s,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:n}=e;this.pageList.push({name:i,path:o,fullPath:n})}let s=this.pageList.find(i=>this.getRouteRealPath(i)===a);s.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))}}},F={class:"page-layout"},H={class:"page-body"};function z(e,t,a,s,i,o){const n=p("a-tab-pane"),h=p("a-tabs"),d=p("router-view");return l(),P("div",F,[_(h,{type:"editable-card","hide-add":"",activeKey:i.activePage,"onUpdate:activeKey":t[0]||(t[0]=r=>i.activePage=r),onTabClick:o.changePage,onEdit:o.editPageTab,style:{padding:"5px 10px 0"}},{default:m(()=>[(l(!0),P(y,null,R(i.pageList,r=>(l(),u(n,{closable:"",tab:o.pageTabNameMap[r.fullPath]||r.name,name:o.getRouteRealPath(r),fullPath:r.fullPath,key:r.fullPath},null,8,["tab","name","fullPath"]))),128))]),_:1},8,["activeKey","onTabClick","onEdit"]),A("div",H,[_(d,null,{default:m(({Component:r,route:v})=>[(l(),u(L,null,[(l(),u(b(r),{key:v.fullPath}))],1024))]),_:1})])])}var J=f(B,[["render",z]]);const Q={name:"EmptyLayout",components:{},props:[],data(){return{}},methods:{}};function X(e,t,a,s,i,o){const n=p("router-view");return l(),u(n,null,{default:m(({Component:h,route:d})=>[(l(),u(L,null,[(l(),u(b(h),{key:d.fullPath}))],1024))]),_:1})}var Y=f(Q,[["render",X]]);let Z=[{path:"/",name:"\u4E3B\u9875",component:()=>c(()=>import("./GlobalLayout.2de3b47d.js"),["assets/GlobalLayout.2de3b47d.js","assets/custom.471d0de0.js","assets/vendor.6399378c.js","assets/api-logo.e800ca99.js"]),redirect:"/manage",children:[{path:"/doc",name:"\u6587\u6863\u7BA1\u7406",component:W,children:[{path:"/manage",name:"\u6587\u6863\u5730\u5740\u7BA1\u7406",meta:{icon:"FileTextOutlined"},component:()=>c(()=>import("./DocManage.a533db9b.js"),["assets/DocManage.a533db9b.js","assets/custom.471d0de0.js","assets/vendor.6399378c.js","assets/index.ff4a24c0.js","assets/index.086d0536.js","assets/EditGlobalParam.ede9d5a9.js"])},{path:"/setting",name:"\u7CFB\u7EDF\u8BBE\u7F6E",meta:{icon:"SettingOutlined"},component:Y,children:[{path:"/setting/globalParam",name:"\u5168\u5C40\u53C2\u6570",component:()=>c(()=>import("./GlobalParam.1c8aaa70.js"),["assets/GlobalParam.1c8aaa70.js","assets/custom.471d0de0.js","assets/vendor.6399378c.js","assets/EditGlobalParam.ede9d5a9.js"])},{path:"/setting/view",name:"\u5C55\u793A\u914D\u7F6E",meta:{hidden:!0},component:()=>c(()=>import("./SettingView.20a81c98.js"),["assets/SettingView.20a81c98.js","assets/vendor.6399378c.js"])}]},{path:"/swagger/info",name:"Swagger\u6587\u6863\u4FE1\u606F",meta:{hidden:!0},component:()=>c(()=>import("./DocInfo.3c0ecd1f.js"),["assets/DocInfo.3c0ecd1f.js","assets/vendor.6399378c.js","assets/index.086d0536.js"])},{path:"/swagger/view",name:"Swagger\u6587\u6863\u5C55\u793A",meta:{hidden:!0},component:()=>c(()=>import("./DocView.30c1d926.js"),["assets/DocView.30c1d926.js","assets/vendor.6399378c.js","assets/DocContent.a9f68c91.js","assets/logUtil.6309fa68.js","assets/index.086d0536.js","assets/unitConvert.f432b2c8.js","assets/index.ff4a24c0.js","assets/custom.471d0de0.js"])},{path:"/openapi/info",name:"OpenApi\u6587\u6863\u4FE1\u606F",meta:{hidden:!0},component:()=>c(()=>import("./DocInfo.a6a45177.js"),["assets/DocInfo.a6a45177.js","assets/vendor.6399378c.js","assets/index.086d0536.js"])},{path:"/openapi/view",name:"OpenApi\u6587\u6863\u5C55\u793A",meta:{hidden:!0},component:()=>c(()=>import("./DocView.886e96fc.js"),["assets/DocView.886e96fc.js","assets/vendor.6399378c.js","assets/DocContent.6940f3d1.js","assets/logUtil.6309fa68.js","assets/index.086d0536.js","assets/unitConvert.f432b2c8.js","assets/index.ff4a24c0.js","assets/custom.471d0de0.js"])},{path:"/custom/request",name:"\u63A5\u53E3\u8BF7\u6C42",meta:{hidden:!0},component:()=>c(()=>import("./ApiRequest.d7d8c646.js"),["assets/ApiRequest.d7d8c646.js","assets/vendor.6399378c.js","assets/index.086d0536.js","assets/unitConvert.f432b2c8.js","assets/index.ff4a24c0.js","assets/custom.471d0de0.js"])}]}]},{path:"/share",name:"\u5F00\u653E\u6587\u6863",component:()=>c(()=>import("./GlobalLayout.5837e500.js"),["assets/GlobalLayout.5837e500.js","assets/vendor.6399378c.js","assets/custom.471d0de0.js","assets/api-logo.e800ca99.js"]),children:[{path:"/doc",name:"\u5F00\u653E\u6587\u6863\u7BA1\u7406",component:J,children:[{path:"/share/home",name:"\u5F00\u653E\u6587\u6863\u4F7F\u7528\u8BF4\u660E",meta:{icon:"FileTextOutlined"},component:()=>c(()=>import("./ShareHome.f7a7e61e.js"),["assets/ShareHome.f7a7e61e.js","assets/vendor.6399378c.js","assets/index.086d0536.js"])},{path:"/share/swagger/view",name:"Swagger\u5F00\u653E\u6587\u6863\u5C55\u793A",meta:{hidden:!0},component:()=>c(()=>import("./DocView.b621f695.js"),["assets/DocView.b621f695.js","assets/vendor.6399378c.js","assets/DocContent.a9f68c91.js","assets/logUtil.6309fa68.js","assets/index.086d0536.js"])},{path:"/share/openapi/view",name:"OpenApi\u5F00\u653E\u6587\u6863\u5C55\u793A",meta:{hidden:!0},component:()=>c(()=>import("./DocView.450b6e2d.js"),["assets/DocView.450b6e2d.js","assets/vendor.6399378c.js","assets/DocContent.6940f3d1.js","assets/logUtil.6309fa68.js","assets/index.086d0536.js"])}]}]}];var ee=D({state(){return{docChangedNum:1,customRequestChange:{},userInfo:{},pageTabNameMap:{},apiDoc:{},globalParam:[],docGlobalParam:[],leftAsideWidth:0,swaggerDoc:{},swaggerDefinitions:{},swaggerUrlMethodMap:{},swaggerMethodStatistic:{},openApiDoc:{},openApiComponents:{},openApiUrlMethodMap:{},openApiMethodStatistic:{},customRequestDoc:{},activePage:{}}},getters:{getCustomRequestChange:e=>()=>e.customRequestChange,getDocChangedNum:e=>()=>e.docChangedNum,getLeftAsideWidth:e=>()=>e.leftAsideWidth,getApiDoc:e=>()=>e.apiDoc,getActivePage:e=>()=>e.activePage},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},setCustomRequestChange(e,t){e.customRequestChange=t},setActivePage(e,t){e.activePage=t}}});const te=E({history:O(),routes:Z}),g=$(N);g.config.productionTip=!1;g.use(x);g.use(te);g.use(ee);g.mount("#app");g.directive("highlight",{updated(e){e.querySelectorAll("pre code").forEach(a=>{M.highlightBlock(a)})}});g.directive("autofocus",{updated(e){setTimeout(()=>e.focus(),0)}});export{f as _};