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

5 lines
441 KiB
JavaScript
Raw Permalink Normal View History

import{g as dC}from"./element-BtlHndxu.js";import{w as at,V as Wt,aa as m,ac as hn,t as Dt,i as vt,c as Ee,n as ie,aq as fC,G as wt,r as ze,a0 as Eo,p as Kt,f as Cn,P as un,U as wd,af as pC,g as Tv,W as Rv,a2 as hC}from"./vue-YISEtOLz.js";var zi,Pf;function br(){if(Pf)return zi;Pf=1;var e={keyId:1,cookies:{path:"/"},treeOptions:{parentKey:"parentId",key:"id",children:"children"},parseDateFormat:"yyyy-MM-dd HH:mm:ss",firstDayOfWeek:1};return zi=e,zi}var ji,Af;function On(){if(Af)return ji;Af=1;function e(t,n,o){if(t)if(t.forEach)t.forEach(n,o);else for(var u=0,a=t.length;u<a;u++)n.call(o,t[u],u,t)}return ji=e,ji}var Gi,Vf;function Dv(){if(Vf)return Gi;Vf=1;var e=Object.prototype.toString;return Gi=e,Gi}var Ui,qf;function Zl(){if(qf)return Ui;qf=1;var e=Dv();function t(n){return function(o){return"[object "+n+"]"===e.call(o)}}return Ui=t,Ui}var Yi,Bf;function $t(){if(Bf)return Yi;Bf=1;var e=Zl(),t=Array.isArray||e("Array");return Yi=t,Yi}var Xi,Hf;function sr(){if(Hf)return Xi;Hf=1;function e(t,n){return t&&t.hasOwnProperty?t.hasOwnProperty(n):!1}return Xi=e,Xi}var Ki,$f;function Jl(){if($f)return Ki;$f=1;var e=sr();function t(n,o,u){if(n)for(var a in n)e(n,a)&&o.call(u,n[a],a,n)}return Ki=t,Ki}var Zi,_f;function dn(){if(_f)return Zi;_f=1;var e=$t(),t=On(),n=Jl();function o(u,a,s){return u&&(e(u)?t:n)(u,a,s)}return Zi=o,Zi}var Ji,Wf;function Ko(){if(Wf)return Ji;Wf=1;function e(t){return function(n){return typeof n===t}}return Ji=e,Ji}var Qi,zf;function Pn(){if(zf)return Qi;zf=1;var e=Ko(),t=e("function");return Qi=t,Qi}var es,jf;function Sd(){if(jf)return es;jf=1;var e=dn();function t(n,o){var u=Object[n];return function(a){var s=[];if(a){if(u)return u(a);e(a,o>1?function(p){s.push([""+p,a[p]])}:function(){s.push(arguments[o])})}return s}}return es=t,es}var ts,Gf;function Fr(){if(Gf)return ts;Gf=1;var e=Sd(),t=e("keys",1);return ts=t,ts}var ns,Uf;function Od(){if(Uf)return ns;Uf=1;var e=Dv(),t=Jl(),n=On();function o(p,r){var d=p.__proto__.constructor;return r?new d(r):new d}function u(p,r){return r?a(p,r):p}function a(p,r){if(p)switch(e.call(p)){case"[object Object]":{var d=Object.create(Object.getPrototypeOf(p));return t(p,function(w,C){d[C]=u(w,r)}),d}case"[object Date]":case"[object RegExp]":return o(p,p.valueOf());case"[object Array]":case"[object Arguments]":{var i=[];return n(p,function(w){i.push(u(w,r))}),i}case"[object Set]":{var h=o(p);return h.forEach(function(w){h.add(u(w,r))}),h}case"[object Map]":{var v=o(p);return v.forEach(function(w,C){v.set(C,u(w,r))}),v}}return p}function s(p,r){return p&&a(p,r)}return ns=s,ns}var rs,Yf;function ar(){if(Yf)return rs;Yf=1;var e=On(),t=Fr(),n=$t(),o=Od(),u=Object.assign;function a(p,r,d){for(var i=r.length,h,v=1;v<i;v++)h=r[v],e(t(r[v]),d?function(w){p[w]=o(h[w],d)}:function(w){p[w]=h[w]});return p}var s=function(p){if(p){var r=arguments;if(p===!0){if(r.length>1)return p=n(p[1])?[]:{},a(p,r,!0)}else return u?u.apply(Object,r):a(p,r)}return p};return rs=s,rs}var os,Xf;function mC(){if(Xf)return os;Xf=1;var e=br(),t=On(),n=dn(),o=Pn(),u=ar(),a=function(){};function s(){t(arguments,function(i){n(i,function(h,v){a[v]=o(h)?function(){var w=h.apply(a.$context,arguments);return a.$context=null,w}:h})})}function p(i){return u(e,i)}function r(){return e}var d="3.7.4";return a.VERSION=d,a.version=d,a.mixin=s,a.setup=p,a.setConfig=p,a.getConfig=r,os=a,os}var ls,Kf;function Td(){if(Kf)return ls;Kf=1;function e(t,n,o){for(var u=t.length-1;u>=0;u--)n.call(o,t[u],u,t)}return ls=e,ls}var is,Zf;function Mv(){if(Zf)return is;Zf=1;var e=Td(),t=Fr();function n(o,u,a){e(t(o),function(s){u.call(a,o[s],s,o)})}return is=n,is}var ss,Jf;function Nr(){if(Jf)return ss;Jf=1;function e(t){return t===null}return ss=e,ss}var as,Qf;function Zo(){if(Qf)return as;Qf=1;var e=Nr();function t(n,o){return function(u){return e(u)?o:u[n]}}return as=t,as}var cs,ep;function gC(){if(ep)return cs;ep=1;var e=dn(),t=Pn(),n=Zo();function o(u,a,s){var p={};if(u)if(a)t(a)||(a=n(a)),e(u,function(r,d){p[d]=a.call(s,r,d,u)});else return u;return p}return cs=o,cs}var us,tp;function Jo(){if(tp)return us;tp=1;function e(t){ret
`;function fv(e){return e.property||["seq","checkbox","radio"].indexOf(e.type)>-1}const $x=e=>{const t=[];return e.forEach(n=>{n.childNodes&&n.childNodes.length?(t.push(n),t.push(...$x(n.childNodes))):t.push(n)}),t},jE=e=>{let t=1;const n=(a,s)=>{if(s&&(a._level=s._level+1,t<a._level&&(t=a._level)),a.childNodes&&a.childNodes.length){let p=0;a.childNodes.forEach(r=>{n(r,a),p+=r._colSpan}),a._colSpan=p}else a._colSpan=1};e.forEach(a=>{a._level=1,n(a)});const o=[];for(let a=0;a<t;a++)o.push([]);return $x(e).forEach(a=>{a.childNodes&&a.childNodes.length?a._rowSpan=1:a._rowSpan=t-a._level+1,o[a._level-1].push(a)}),o};function GE(e){return e===!0?"full":e||"default"}function Bo(e){return e==="TRUE"||e==="true"||e===!0}function fi(e,t){const{footerFilterMethod:n}=e;return n?t.filter((o,u)=>n({items:o,$rowIndex:u})):t}function UE(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 Ho(e){return/[",\s\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}function Wn(e,t){return e.getElementsByTagName(t)}function pv(e){return`#${e}@${c.uniqueId()}`}function _x(e,t){return e.replace(/#\d+@\d+/g,n=>c.hasOwnProp(t,n)?t[n]:n)}function hv(e,t){return _x(e,t).replace(/^"+$/g,o=>'"'.repeat(Math.ceil(o.length/2)))}function Wx(e,t,n){const o=t.split(uo),u=[];let a=[];if(o.length){const s={},p=Date.now();o.forEach(r=>{if(r){const d={};r=r.replace(/("")|(\n)/g,(h,v)=>{const w=pv(p);return s[w]=v?'"':`
`,w}).replace(/"(.*?)"/g,(h,v)=>{const w=pv(p);return s[w]=_x(v,s),w});const i=r.split(n);a.length?(i.forEach((h,v)=>{v<a.length&&(d[a[v]]=hv(h.trim(),s))}),u.push(d)):a=i.map(h=>hv(h.trim(),s))}})}return{fields:a,rows:u}}function YE(e,t){return Wx(e,t,",")}function XE(e,t){return Wx(e,t," ")}function KE(e,t){const o=new DOMParser().parseFromString(t,"text/html"),u=Wn(o,"body"),a=[],s=[];if(u.length){const p=Wn(u[0],"table");if(p.length){const r=Wn(p[0],"thead");if(r.length){c.arrayEach(Wn(r[0],"tr"),i=>{c.arrayEach(Wn(i,"th"),h=>{s.push(h.textContent)})});const d=Wn(p[0],"tbody");d.length&&c.arrayEach(Wn(d[0],"tr"),i=>{const h={};c.arrayEach(Wn(i,"td"),(v,w)=>{s[w]&&(h[s[w]]=v.textContent||"")}),a.push(h)})}}}return{fields:s,rows:a}}function ZE(e,t){const o=new DOMParser().parseFromString(t,"application/xml"),u=Wn(o,"Worksheet"),a=[],s=[];if(u.length){const p=Wn(u[0],"Table");if(p.length){const r=Wn(p[0],"Row");r.length&&(c.arrayEach(Wn(r[0],"Cell"),d=>{s.push(d.textContent)}),c.arrayEach(r,(d,i)=>{if(i){const h={},v=Wn(d,"Cell");c.arrayEach(v,(w,C)=>{s[C]&&(h[s[C]]=w.textContent)}),a.push(h)}}))}}return{fields:s,rows:a}}function mv(e){c.eachTree(e,t=>{delete t._level,delete t._colSpan,delete t._rowSpan,delete t._children,delete t.childNodes},{children:"children"})}function JE(e,t){const n=[];return e.forEach(o=>{const u=o.property;u&&n.push(u)}),t.some(o=>n.indexOf(o)>-1)}const QE=["exportData","importByFile","importData","saveFile","readFile","print","openImport","openExport","openPrint"],ew={setupTable(e){const{props:t,reactData:n,internalData:o}=e,{computeTreeOpts:u,computePrintOpts:a,computeExportOpts:s,computeImportOpts:p,computeCustomOpts:r,computeSeqOpts:d,computeRadioOpts:i,computeCheckboxOpts:h,computeColumnOpts:v}=e.getComputeMaps(),w=vt("$xegrid",null),C=F=>{const D=u.value,N=D.children||D.childrenField;return F[N]&&F[N].length},y=(F,D,N,W)=>{const ce=d.value.seqMethod||N.seqMethod;return ce?ce({row:F,rowIndex:e.getRowIndex(F),$rowIndex:D,column:N,columnIndex:e.getColumnIndex(N),$columnIndex:W}):e.getRowSeq(F)};function A(F,D){const N=v.value,W=D.headerExportMethod||N.headerExportMethod;return W?W({column:D,options:F,$table:e}):(F.original?D.property:D.getTitle())||""}const E=F=>c.isBoolean(F)?F?"TRUE":"FALSE":F,S=(F,D,N)=>{const{isAllExpand:W,mode:G}=F,{treeConfig:ce}=t,Te=i.value,ve=h.value,Fe=u.value,Ae=v.value;if(qo||(qo=document.createElement("div")),ce){const ue=Fe.children||Fe.childrenField,B=[],re=new Map;return c.eachTree(N,(ae,me,De,oe,le,se)=>{const ge=ae._row||ae,Ce=le&&le._row?le._row:le;if(W||!Ce||re.has(Ce)&&e.isTreeExpandByRow(Ce)){const be=C(ge),Ve={_row:ge,_level:se.length-1,_hasChild:be,_expand:be&&e.isTreeExpandByRow(ge)};D.forEach((Ge,Ue)=>{let We="";const Ne=Ge.editRender||Ge.cellRender;let Me=Ge.exportMethod;if(!Me&&Ne&&Ne.name){const J=nt.renderer.get(Ne.name);J&&(Me=J.exportMethod)}if(Me||(Me=Ae.exportMethod),Me)We=Me({$table:e,row:ge,column:Ge,options:F});else switch(Ge.type){case"seq":We=G==="all"?oe.map((J,de)=>de%2===0?Number(J)+1:".").join(""):y(ge,me,Ge,Ue);break;case"checkbox":We=E(e.isCheckedByCheckboxRow(ge)),Ve._checkboxLabel=ve.labelField?c.get(ge,ve.labelField):"",Ve._checkboxDisabled=ve.checkMethod&&!ve.checkMethod({row:ge});break;case"radio":We=E(e.isCheckedByRadioRow(ge)),Ve._radioLabel=Te.labelField?c.get(ge,Te.labelField):"",Ve._radioDisabled=Te.checkMethod&&!Te.checkMethod({row:ge});break;default:if(F.original)We=Jn(ge,Ge);else if(We=e.getCellLabel(ge,Ge),Ge.type==="html")qo.innerHTML=We,We=qo.innerText.trim();else{const J=e.getCell(ge,Ge);J&&(We=J.innerText.trim())}}Ve[Ge.id]=c.toValueString(We)}),re.set(ge,1),B.push(Object.assign(Ve,ge))}},{children:ue}),B}return N.map((ue,B)=>{const re={_row:ue};return D.forEach((ae,me)=>{let De="";const oe=ae.editRender||ae.cellRender;let le=ae.exportMethod;if(!le&&oe&&oe.name){const se=nt.renderer.get(oe.name);se&&(le=se.exportMethod)}if(le)De=le({$table:e,row:ue,column:ae,options:F});else switch(ae.type){case"seq":De=G==="all"?B+1:y(ue,B,ae,me);break;case"checkbox":De=E(e.isCheckedByCheckboxRow(ue)),re._checkboxLabel=ve.label
 `)}},E=()=>{e.autosize&&ie(()=>{const k=y.value,{minRows:$,maxRows:Q}=k,pe=d.value,fe=Tr.clientHeight,K=getComputedStyle(pe),U=c.toNumber(K.lineHeight),X=c.toNumber(K.paddingTop),Y=c.toNumber(K.paddingBottom),F=c.toNumber(K.borderTopWidth),D=c.toNumber(K.borderBottomWidth),N=X+Y+F+D,W=(fe-N)/U,G=W&&/[0-9]/.test(""+W)?W:Math.floor(W)+1;let ce=G;G<$?ce=$:G>Q&&(ce=Q),pe.style.height=`${ce*U+N}px`})},S=k=>{const $=p.inputValue;h.dispatchEvent(k.type,{value:$},k)},R=(k,$)=>{p.inputValue=k,n("update:modelValue",k),c.toValueString(e.modelValue)!==k&&(v.dispatchEvent("change",{value:k},$),o&&u&&o.triggerItemEvent($,u.itemConfig.field,k))},M=k=>{const{immediate:$}=e,pe=k.target.value;p.inputValue=pe,$&&R(pe,k),h.dispatchEvent("input",{value:pe},k),E()},L=k=>{const{immediate:$}=e;$?S(k):R(p.inputValue,k)},H=k=>{const{immediate:$}=e,{inputValue:Q}=p;$||R(Q,k),h.dispatchEvent("blur",{value:Q},k)};v={dispatchEvent(k,$,Q){n(k,Object.assign({$textarea:h,$event:Q},$))},focus(){return d.value.focus(),ie()},blur(){return d.value.blur(),ie()}},Object.assign(h,v),at(()=>e.modelValue,k=>{p.inputValue=k,A()}),ie(()=>{const{autosize:k}=e;k&&(A(),E())});const I=()=>{const{className:k,resize:$,placeholder:Q,disabled:pe,maxlength:fe,autosize:K,showWordCount:U,countMethod:X,rows:Y,cols:F}=e,{inputValue:D}=p,N=s.value,W=C.value,G=w.value;return m("div",{ref:r,class:["vxe-textarea",k,{[`size--${N}`]:N,"is--autosize":K,"is--count":U,"is--disabled":pe,"def--rows":!c.eqNull(Y),"def--cols":!c.eqNull(F)}]},[m("textarea",{ref:d,class:"vxe-textarea--inner",value:D,name:e.name,placeholder:Q?Ht(Q):null,maxlength:fe,readonly:e.readonly,disabled:pe,rows:Y,cols:F,style:$?{resize:$}:null,onInput:M,onChange:L,onKeydown:S,onKeyup:S,onClick:S,onFocus:S,onBlur:H}),U?m("span",{class:["vxe-textarea--count",{"is--error":W}]},X?`${X({value:D})}`:`${G}${fe?`/${fe}`:""}`):null])};return h.renderVN=I,h},render(){return this.renderVN()}}),bf=Object.assign(Bl,{install:function(e){e.component(Bl.name,Bl)}}),_w=bf;Mt.component(Bl.name,Bl);const Hl=Dt({name:"VxeButtonGroup",props:{options:Array,mode:String,status:String,round:Boolean,circle:Boolean,className:[String,Function],disabled:Boolean,size:{type:String,default:()=>x.buttonGroup.size||x.size}},emits:["click"],setup(e,t){const{slots:n,emit:o}=t,u=c.uniqueId(),a={},s={xID:u,props:e,context:t,getComputeMaps:()=>a};tn(e);const p={dispatchEvent(i,h,v){o(i,Object.assign({$buttonGroup:s,$event:v},h))}};Object.assign(s,p,{handleClick(i,h){const{options:v}=e,{name:w}=i,C=v?v.find(y=>y.name===w):null;p.dispatchEvent("click",Object.assign(Object.assign({},i),{option:C}),h)}});const d=()=>{const{className:i,options:h}=e,v=n.default;return m("div",{class:["vxe-button-group",i?c.isFunction(i)?i({$buttonGroup:s}):i:""]},v?v({}):h?h.map((w,C)=>m(mn,Object.assign({key:C},w))):[])};return s.renderVN=d,Kt("$xebuttongroup",s),d}}),xf=Object.assign(Hl,{install(e){e.component(Hl.name,Hl)}}),Ww=xf;Mt.component(Hl.name,Hl);function eC(e){return Vx(),new Promise(t=>{if(e&&e.id&&ho.some(n=>n.props.id===e.id))t("exist");else{const n=e.onHide,o=Object.assign(e,{key:c.uniqueId(),modelValue:!0,onHide(u){const a=bo.modals;n&&n(u),bo.modals=a.filter(s=>s.key!==o.key),t(u.type)}});bo.modals.push(o)}})}function tC(e){return c.find(ho,t=>t.props.id===e)}function zw(e){const t=e?[tC(e)]:ho,n=[];return t.forEach(o=>{o&&n.push(o.close())}),Promise.all(n)}function Cf(e,t,n,o){let u;return c.isObject(t)?u=t:u={content:c.toValueString(t),title:n},eC(Object.assign(Object.assign(Object.assign({},e),o),u))}function jw(e,t,n){return Cf({type:"alert",showFooter:!0},e,t,n)}function Gw(e,t,n){return Cf({type:"confirm",status:"question",showFooter:!0},e,t,n)}function Uw(e,t){return Cf({type:"message",mask:!1,lockView:!1,showHeader:!1},e,"",t)}const nC={get:tC,close:zw,open:eC,alert:jw,confirm:Gw,message:Uw},Yw=nC,yf=Object.assign(Ur,{install:function(e){e.component(Ur.name,Ur),nt.modal=nC}}),Xw=yf;Mt.component(Ur.name,Ur);const vo=[],$l=Dt({name:"VxeDrawer",props:{modelValue:Boolean,id:String,title:String,loading:{type:Boolean,default:null},className:String,positio