Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-23 04:19:20 +08:00
v3-admin-vite/static/vxe-b1KXxwBC.js

5 lines
436 KiB
JavaScript
Raw Normal View History

import{d as at,_ as zt,ah as d,ai as pn,m as $t,B as vt,f as Re,n as ae,at as Rh,S as St,r as Ue,a6 as yr,H as qt,c as vn,Z as an,A as Xi,a1 as Mh,b as hd,aw as md,a7 as Dh,ax as kh}from"./vue-BiR7ZKfy.js";import{g as gd,a as Ih,d as Fh}from"./element-ld5q79O4.js";var Nh={cookies:{path:"/"},treeOptions:{parentKey:"parentId",key:"id",children:"children"},parseDateFormat:"yyyy-MM-dd HH:mm:ss",firstDayOfWeek:1},Ro=Nh;function Ph(e,t,n){if(e)if(e.forEach)e.forEach(t,n);else for(var o=0,s=e.length;o<s;o++)t.call(n,e[o],o,e)}var Rn=Ph,Lh=Object.prototype.toString,vd=Lh,Ah=vd;function Vh(e){return function(t){return"[object "+e+"]"===Ah.call(t)}}var jl=Vh,_h=jl,Bh=Array.isArray||_h("Array"),Bt=Bh;function Hh(e,t){return e&&e.hasOwnProperty?e.hasOwnProperty(t):!1}var to=Hh,Wh=to;function zh(e,t,n){if(e)for(var o in e)Wh(e,o)&&t.call(n,e[o],o,e)}var ql=zh,jh=Bt,qh=Rn,Gh=ql;function Yh(e,t,n){return e&&(jh(e)?qh:Gh)(e,t,n)}var nn=Yh;function Uh(e){return function(t){return typeof t===e}}var Yr=Uh,Xh=Yr,Kh=Xh("function"),Ln=Kh,Zh=nn;function Jh(e,t){var n=Object[e];return function(o){var s=[];if(o){if(n)return n(o);Zh(o,t>1?function(u){s.push([""+u,o[u]])}:function(){s.push(arguments[t])})}return s}}var Ki=Jh,Qh=Ki,em=Qh("keys",1),Mo=em,tm=vd,nm=ql,om=Rn;function ci(e,t){var n=e.__proto__.constructor;return t?new n(t):new n}function us(e,t){return t?bd(e,t):e}function bd(e,t){if(e)switch(tm.call(e)){case"[object Object]":{var n=Object.create(Object.getPrototypeOf(e));return nm(e,function(c,f){n[f]=us(c,t)}),n}case"[object Date]":case"[object RegExp]":return ci(e,e.valueOf());case"[object Array]":case"[object Arguments]":{var o=[];return om(e,function(c){o.push(us(c,t))}),o}case"[object Set]":{var s=ci(e);return s.forEach(function(c){s.add(us(c,t))}),s}case"[object Map]":{var u=ci(e);return u.forEach(function(c,f){u.set(f,us(c,t))}),u}}return e}function rm(e,t){return e&&bd(e,t)}var Zi=rm,lm=Rn,sm=Mo,im=Bt,am=Zi,lc=Object.assign;function sc(e,t,n){for(var o=t.length,s,u=1;u<o;u++)s=t[u],lm(sm(t[u]),n?function(c){e[c]=am(s[c],n)}:function(c){e[c]=s[c]});return e}var cm=function(e){if(e){var t=arguments;if(e===!0){if(t.length>1)return e=im(e[1])?[]:{},sc(e,t,!0)}else return lc?lc.apply(Object,t):sc(e,t)}return e},no=cm,um=Ro,dm=Rn,fm=nn,pm=Ln,hm=no,mr=function(){};function mm(){dm(arguments,function(e){fm(e,function(t,n){mr[n]=pm(t)?function(){var o=t.apply(mr.$context,arguments);return mr.$context=null,o}:t})})}function gm(e){return hm(um,e)}mr.VERSION="3.5.25";mr.mixin=mm;mr.setup=gm;var vm=mr;function bm(e,t,n){for(var o=e.length-1;o>=0;o--)t.call(n,e[o],o,e)}var Ji=bm,xm=Ji,Cm=Mo;function ym(e,t,n){xm(Cm(e),function(o){t.call(n,e[o],o,e)})}var xd=ym;function wm(e){return e===null}var Do=wm,Em=Do;function Sm(e,t){return function(n){return Em(n)?t:n[e]}}var Ur=Sm,Om=nn,Tm=Ln,$m=Ur;function Rm(e,t,n){var o={};if(e)if(t)Tm(t)||(t=$m(t)),Om(e,function(s,u){o[u]=t.call(n,s,u,e)});else return e;return o}var Mm=Rm;function Dm(e){return e?e.constructor===Object:!1}var Xr=Dm,ic=Bt,ac=Xr,km=nn;function Cd(e,t){return ac(e)&&ac(t)||ic(e)&&ic(t)?(km(t,function(n,o){e[o]=Cd(e[o],n)}),e):t}var Im=function(e){e||(e={});for(var t=arguments,n=t.length,o,s=1;s<n;s++)o=t[s],o&&Cd(e,o);return e},Fm=Im,Nm=nn;function Pm(e,t,n){var o=[];if(e&&arguments.length>1){if(e.map)return e.map(t,n);Nm(e,function(){o.push(t.apply(n,arguments))})}return o}var Kr=Pm,Lm=to,Am=Bt;function Vm(e,t,n,o,s){return function(u,c,f){if(u&&c){if(e&&u[e])return u[e](c,f);if(t&&Am(u)){for(var i=0,m=u.length;i<m;i++)if(!!c.call(f,u[i],i,u)===o)return[!0,!1,i,u[i]][n]}else for(var p in u)if(Lm(u,p)&&!!c.call(f,u[p],p,u)===o)return[!0,!1,p,u[p]][n]}return s}}var Is=Vm,_m=Is,Bm=_m("some",1,0,!0,!1),yd=Bm,Hm=Is,Wm=Hm("every",1,1,!1,!0),wd=Wm,zm=to;function jm(e,t){if(e){if(e.includes)return e.includes(t);for(var n in e)if(zm(e,n)&&t===e[n])return!0}return!1}var Gl=jm,cc=Bt,uc=Gl;function qm(e,t){var n,o=0;if(cc(e)&&cc(t)){for(n=t.length;o<n;o++)if(!uc(e,t[o]))return!1;return!0}return uc(e,t)}var Ed=qm,dc=nn,Gm=Gl,Ym=Ln,Um=Ur;function Xm(e,t,n){var o=[];if(t){Ym(t)||(t=Um(t));var s,u
`;function ed(e){return e.property||["seq","checkbox","radio"].indexOf(e.type)>-1}const oh=e=>{const t=[];return e.forEach(n=>{n.childNodes&&n.childNodes.length?(t.push(n),t.push(...oh(n.childNodes))):t.push(n)}),t},Lk=e=>{let t=1;const n=(u,c)=>{if(c&&(u._level=c._level+1,t<u._level&&(t=u._level)),u.childNodes&&u.childNodes.length){let f=0;u.childNodes.forEach(i=>{n(i,u),f+=i._colSpan}),u._colSpan=f}else u._colSpan=1};e.forEach(u=>{u._level=1,n(u)});const o=[];for(let u=0;u<t;u++)o.push([]);return oh(e).forEach(u=>{u.childNodes&&u.childNodes.length?u._rowSpan=1:u._rowSpan=t-u._level+1,o[u._level-1].push(u)}),o};function Ak(e){return e===!0?"full":e||"default"}function Lr(e){return e==="TRUE"||e==="true"||e===!0}function Cs(e,t){const{footerFilterMethod:n}=e;return n?t.filter((o,s)=>n({items:o,$rowIndex:s})):t}function Vk(e,t){if(t){if(e.type==="seq")return` ${t}`;switch(e.cellType){case"string":if(!isNaN(t))return` ${t}`;break;case"number":break;default:if(t.length>=12&&!isNaN(t))return` ${t}`;break}}return t}function Ar(e){return/[",\s\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}function In(e,t){return e.getElementsByTagName(t)}function td(e){return`#${e}@${l.uniqueId()}`}function rh(e,t){return e.replace(/#\d+@\d+/g,n=>l.hasOwnProp(t,n)?t[n]:n)}function nd(e,t){return rh(e,t).replace(/^"+$/g,o=>'"'.repeat(Math.ceil(o.length/2)))}function lh(e,t,n){const o=t.split(ar),s=[];let u=[];if(o.length){const c={},f=Date.now();o.forEach(i=>{if(i){const m={};i=i.replace(/("")|(\n)/g,(b,M)=>{const V=td(f);return c[V]=M?'"':`
`,V}).replace(/"(.*?)"/g,(b,M)=>{const V=td(f);return c[V]=rh(M,c),V});const p=i.split(n);u.length?(p.forEach((b,M)=>{M<u.length&&(m[u[M]]=nd(b.trim(),c))}),s.push(m)):u=p.map(b=>nd(b.trim(),c))}})}return{fields:u,rows:s}}function _k(e,t){return lh(e,t,",")}function Bk(e,t){return lh(e,t," ")}function Hk(e,t){const o=new DOMParser().parseFromString(t,"text/html"),s=In(o,"body"),u=[],c=[];if(s.length){const f=In(s[0],"table");if(f.length){const i=In(f[0],"thead");if(i.length){l.arrayEach(In(i[0],"tr"),p=>{l.arrayEach(In(p,"th"),b=>{c.push(b.textContent)})});const m=In(f[0],"tbody");m.length&&l.arrayEach(In(m[0],"tr"),p=>{const b={};l.arrayEach(In(p,"td"),(M,V)=>{c[V]&&(b[c[V]]=M.textContent||"")}),u.push(b)})}}}return{fields:c,rows:u}}function Wk(e,t){const o=new DOMParser().parseFromString(t,"application/xml"),s=In(o,"Worksheet"),u=[],c=[];if(s.length){const f=In(s[0],"Table");if(f.length){const i=In(f[0],"Row");i.length&&(l.arrayEach(In(i[0],"Cell"),m=>{c.push(m.textContent)}),l.arrayEach(i,(m,p)=>{if(p){const b={},M=In(m,"Cell");l.arrayEach(M,(V,N)=>{c[N]&&(b[c[N]]=V.textContent)}),u.push(b)}}))}}return{fields:c,rows:u}}function od(e){l.eachTree(e,t=>{delete t._level,delete t._colSpan,delete t._rowSpan,delete t._children,delete t.childNodes},{children:"children"})}function zk(e,t){const n=[];return e.forEach(o=>{const s=o.property;s&&n.push(s)}),t.some(o=>n.indexOf(o)>-1)}const jk=["exportData","importByFile","importData","saveFile","readFile","print","openImport","openExport","openPrint"],qk={setupTable(e){const{props:t,reactData:n,internalData:o}=e,{computeTreeOpts:s,computePrintOpts:u,computeExportOpts:c,computeImportOpts:f,computeCustomOpts:i,computeSeqOpts:m,computeRadioOpts:p,computeCheckboxOpts:b,computeColumnOpts:M}=e.getComputeMaps(),V=vt("$xegrid",null),N=H=>{const S=s.value,$=S.children||S.childrenField;return H[$]&&H[$].length},O=(H,S,$,z)=>{const ve=m.value.seqMethod||$.seqMethod;return ve?ve({row:H,rowIndex:e.getRowIndex(H),$rowIndex:S,column:$,columnIndex:e.getColumnIndex($),$columnIndex:z}):e.getRowSeq(H)};function j(H,S){const $=M.value,z=S.headerExportMethod||$.headerExportMethod;return z?z({column:S,options:H,$table:e}):(H.original?S.property:S.getTitle())||""}const w=H=>l.isBoolean(H)?H?"TRUE":"FALSE":H,T=(H,S,$)=>{const{isAllExpand:z,mode:K}=H,{treeConfig:ve}=t,Ie=p.value,Oe=b.value,Ae=s.value,He=M.value;if(Pr||(Pr=document.createElement("div")),ve){const fe=Ae.children||Ae.childrenField,P=[],Q=new Map;return l.eachTree($,(pe,Ee,Fe,se,re,ue)=>{const we=pe._row||pe,_=re&&re._row?re._row:re;if(z||!_||Q.has(_)&&e.isTreeExpandByRow(_)){const I=N(we),J={_row:we,_level:ue.length-1,_hasChild:I,_expand:I&&e.isTreeExpandByRow(we)};S.forEach((X,ce)=>{let ke="";const Se=X.editRender||X.cellRender;let be=X.exportMethod;if(!be&&Se&&Se.name){const W=nt.renderer.get(Se.name);W&&(be=W.exportMethod)}if(be||(be=He.exportMethod),be)ke=be({$table:e,row:we,column:X,options:H});else switch(X.type){case"seq":ke=K==="all"?se.map((W,ee)=>ee%2===0?Number(W)+1:".").join(""):O(we,Ee,X,ce);break;case"checkbox":ke=w(e.isCheckedByCheckboxRow(we)),J._checkboxLabel=Oe.labelField?l.get(we,Oe.labelField):"",J._checkboxDisabled=Oe.checkMethod&&!Oe.checkMethod({row:we});break;case"radio":ke=w(e.isCheckedByRadioRow(we)),J._radioLabel=Ie.labelField?l.get(we,Ie.labelField):"",J._radioDisabled=Ie.checkMethod&&!Ie.checkMethod({row:we});break;default:if(H.original)ke=Gn(we,X);else if(ke=e.getCellLabel(we,X),X.type==="html")Pr.innerHTML=ke,ke=Pr.innerText.trim();else{const W=e.getCell(we,X);W&&(ke=W.innerText.trim())}}J[X.id]=l.toValueString(ke)}),Q.set(we,1),P.push(Object.assign(J,we))}},{children:fe}),P}return $.map((fe,P)=>{const Q={_row:fe};return S.forEach((pe,Ee)=>{let Fe="";const se=pe.editRender||pe.cellRender;let re=pe.exportMethod;if(!re&&se&&se.name){const ue=nt.renderer.get(se.name);ue&&(re=ue.exportMethod)}if(re)Fe=re({$table:e,row:fe,column:pe,options:H});else switch(pe.type){case"seq":Fe=K==="all"?P+1:O(fe,P,pe,Ee);break;case"checkbox":Fe=w(e.isCheckedByCheckboxRow(fe)),Q._checkboxLabel=Oe.labelField?l.get(fe,Oe.labelField):"
 `)}},w=()=>{e.autosize&&ae(()=>{const F=O.value,{minRows:G,maxRows:me}=F,Te=m.value,$e=wo.clientHeight,ie=getComputedStyle(Te),he=l.toNumber(ie.lineHeight),de=l.toNumber(ie.paddingTop),ne=l.toNumber(ie.paddingBottom),H=l.toNumber(ie.borderTopWidth),S=l.toNumber(ie.borderBottomWidth),$=de+ne+H+S,z=($e-$)/he,K=z&&/[0-9]/.test(""+z)?z:Math.floor(z)+1;let ve=K;K<G?ve=G:K>me&&(ve=me),Te.style.height=`${ve*he+$}px`})},T=F=>{const G=f.inputValue;b.dispatchEvent(F.type,{value:G},F)},y=(F,G)=>{f.inputValue=F,n("update:modelValue",F),l.toValueString(e.modelValue)!==F&&(M.dispatchEvent("change",{value:F},G),o&&s&&o.triggerItemEvent(G,s.itemConfig.field,F))},E=F=>{const{immediate:G}=e,Te=F.target.value;f.inputValue=Te,G&&y(Te,F),b.dispatchEvent("input",{value:Te},F),w()},A=F=>{const{immediate:G}=e;G?T(F):y(f.inputValue,F)},q=F=>{const{immediate:G}=e,{inputValue:me}=f;G||y(me,F),b.dispatchEvent("blur",{value:me},F)};M={dispatchEvent(F,G,me){n(F,Object.assign({$textarea:b,$event:me},G))},focus(){return m.value.focus(),ae()},blur(){return m.value.blur(),ae()}},Object.assign(b,M),at(()=>e.modelValue,F=>{f.inputValue=F,j()}),ae(()=>{const{autosize:F}=e;F&&(j(),w())});const k=()=>{const{className:F,resize:G,placeholder:me,disabled:Te,maxlength:$e,autosize:ie,showWordCount:he,countMethod:de,rows:ne,cols:H}=e,{inputValue:S}=f,$=c.value,z=N.value,K=V.value;return d("div",{ref:i,class:["vxe-textarea",F,{[`size--${$}`]:$,"is--autosize":ie,"is--count":he,"is--disabled":Te,"def--rows":!l.eqNull(ne),"def--cols":!l.eqNull(H)}]},[d("textarea",{ref:m,class:"vxe-textarea--inner",value:S,name:e.name,placeholder:me?_t(me):null,maxlength:$e,readonly:e.readonly,disabled:Te,rows:ne,cols:H,style:G?{resize:G}:null,onInput:E,onChange:A,onKeydown:T,onKeyup:T,onClick:T,onFocus:T,onBlur:q}),he?d("span",{class:["vxe-textarea--count",{"is--error":z}]},de?`${de({value:S})}`:`${K}${$e?`/${$e}`:""}`):null])};return b.renderVN=k,b},render(){return this.renderVN()}}),Wa=Object.assign(Il,{install:function(e){e.component(Il.name,Il)}}),F1=Wa;Mt.component(Il.name,Il);const Fl=$t({name:"VxeButtonGroup",props:{options:Array,mode:String,status:String,round:Boolean,circle:Boolean,className:[String,Function],disabled:Boolean,size:{type:String,default:()=>v.buttonGroup.size||v.size}},emits:["click"],setup(e,t){const{slots:n,emit:o}=t,s=l.uniqueId(),u={},c={xID:s,props:e,context:t,getComputeMaps:()=>u};Qt(e);const f={dispatchEvent(p,b,M){o(p,Object.assign({$buttonGroup:c,$event:M},b))}};Object.assign(c,f,{handleClick(p,b){const{options:M}=e,{name:V}=p,N=M?M.find(O=>O.name===V):null;f.dispatchEvent("click",Object.assign(Object.assign({},p),{option:N}),b)}});const m=()=>{const{className:p,options:b}=e,M=n.default;return d("div",{class:["vxe-button-group",p?l.isFunction(p)?p({$buttonGroup:c}):p:""]},M?M({}):b?b.map((V,N)=>d(hn,Object.assign({key:N},V))):[])};return c.renderVN=m,qt("$xebuttongroup",c),m}}),za=Object.assign(Fl,{install(e){e.component(Fl.name,Fl)}}),N1=za;Mt.component(Fl.name,Fl);function gh(e){return Qp(),new Promise(t=>{if(e&&e.id&&dr.some(n=>n.props.id===e.id))t("exist");else{const n=e.onHide,o=Object.assign(e,{key:l.uniqueId(),modelValue:!0,onHide(s){const u=vr.modals;n&&n(s),vr.modals=u.filter(c=>c.key!==o.key),t(s.type)}});vr.modals.push(o)}})}function vh(e){return l.find(dr,t=>t.props.id===e)}function P1(e){const t=e?[vh(e)]:dr,n=[];return t.forEach(o=>{o&&n.push(o.close())}),Promise.all(n)}function ja(e,t,n,o){let s;return l.isObject(t)?s=t:s={content:l.toValueString(t),title:n},gh(Object.assign(Object.assign(Object.assign({},e),o),s))}function L1(e,t,n){return ja({type:"alert",showFooter:!0},e,t,n)}function A1(e,t,n){return ja({type:"confirm",status:"question",showFooter:!0},e,t,n)}function V1(e,t){return ja({type:"message",mask:!1,lockView:!1,showHeader:!1},e,"",t)}const bh={get:vh,close:P1,open:gh,alert:L1,confirm:A1,message:V1},_1=bh,qa=Object.assign(Go,{install:function(e){e.component(Go.name,Go),nt.modal=bh}}),B1=qa;Mt.component(Go.name,Go);const hr=[],Nl=$t({name:"VxeDrawer",props:{modelValue:Boolean,id:String,title:String,loading:{type:Boolean,def