Files
zyplayer-doc/zyplayer-doc-api/src/main/resources/dist/assets/main.0fecd54d.js

2 lines
12 KiB
JavaScript
Raw Normal View History

2023-05-04 20:24:50 +08:00
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.160e93e4.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,[