test_lgq/niucloud/public/web/_nuxt/el-loading.95b1f580.js
2024-01-24 17:36:08 +08:00

2 lines
6.2 KiB
JavaScript

import{p as D,M as q,a as w,q as K,o as L,e as A,y as S,u as g,x as E,h as Y,t as Z,k as F,j as x,z as G,B as H,C as J,r as T,D as Q,c9 as U,P as W,ca as X,ag as ee,bo as b,w as v,a0 as te,f as y,a1 as se,as as ae,bi as C,a9 as ne,ak as P,aA as z,bf as _,bg as B,aY as O,aE as oe,cb as le,b2 as re,c as ce,J as ie,K as de}from"./entry.539d3b49.js";import{E as ue,a as me}from"./el-tooltip.a101b1cd.js";import"./el-popper.6e1fd591.js";import{_ as ve}from"./_plugin-vue_export-helper.c27b6911.js";const fe=D({header:{type:String,default:""},bodyStyle:{type:q([String,Object,Array]),default:""},shadow:{type:String,values:["always","hover","never"],default:"always"}}),pe=w({name:"ElCard"}),be=w({...pe,props:fe,setup(t){const e=K("card");return(s,a)=>(L(),A("div",{class:S([g(e).b(),g(e).is(`${s.shadow}-shadow`)])},[s.$slots.header||s.header?(L(),A("div",{key:0,class:S(g(e).e("header"))},[E(s.$slots,"header",{},()=>[Y(Z(s.header),1)])],2)):F("v-if",!0),x("div",{class:S(g(e).e("body")),style:G(s.bodyStyle)},[E(s.$slots,"default")],6)],2))}});var _e=H(be,[["__file","/home/runner/work/element-plus/element-plus/packages/components/card/src/card.vue"]]);const Ne=J(_e);function ge(t){let e;const s=T(!1),a=Q({...t,originalPosition:"",originalOverflow:"",visible:!1});function l(n){a.text=n}function o(){const n=a.parent,r=d.ns;if(!n.vLoadingAddClassList){let i=n.getAttribute("loading-number");i=Number.parseInt(i)-1,i?n.setAttribute("loading-number",i.toString()):(C(n,r.bm("parent","relative")),n.removeAttribute("loading-number")),C(n,r.bm("parent","hidden"))}c(),p.unmount()}function c(){var n,r;(r=(n=d.$el)==null?void 0:n.parentNode)==null||r.removeChild(d.$el)}function u(){var n;t.beforeClose&&!t.beforeClose()||(s.value=!0,clearTimeout(e),e=window.setTimeout(f,400),a.visible=!1,(n=t.closed)==null||n.call(t))}function f(){if(!s.value)return;const n=a.parent;s.value=!1,n.vLoadingAddClassList=void 0,o()}const p=U(w({name:"ElLoading",setup(n,{expose:r}){const{ns:i}=X("loading"),j=ee();return r({ns:i,zIndex:j}),()=>{const $=a.spinner||a.svg,M=b("svg",{class:"circular",viewBox:a.svgViewBox?a.svgViewBox:"0 0 50 50",...$?{innerHTML:$}:{}},[b("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),R=a.text?b("p",{class:i.b("text")},[a.text]):void 0;return b(ae,{name:i.b("fade"),onAfterLeave:f},{default:v(()=>[te(y("div",{style:{backgroundColor:a.background||""},class:[i.b("mask"),a.customClass,a.fullscreen?"is-fullscreen":""]},[b("div",{class:i.b("spinner")},[M,R])]),[[se,a.visible]])])})}}})),d=p.mount(document.createElement("div"));return{...W(a),setText:l,removeElLoadingChild:c,close:u,handleAfterLeave:f,vm:d,get $el(){return d.$el}}}let h;const ye=function(t={}){if(!ne)return;const e=xe(t);if(e.fullscreen&&h)return h;const s=ge({...e,closed:()=>{var l;(l=e.closed)==null||l.call(e),e.fullscreen&&(h=void 0)}});he(e,e.parent,s),N(e,e.parent,s),e.parent.vLoadingAddClassList=()=>N(e,e.parent,s);let a=e.parent.getAttribute("loading-number");return a?a=`${Number.parseInt(a)+1}`:a="1",e.parent.setAttribute("loading-number",a),e.parent.appendChild(s.$el),P(()=>s.visible.value=e.visible),e.fullscreen&&(h=s),s},xe=t=>{var e,s,a,l;let o;return z(t.target)?o=(e=document.querySelector(t.target))!=null?e:document.body:o=t.target||document.body,{parent:o===document.body||t.body?document.body:o,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:o===document.body&&((s=t.fullscreen)!=null?s:!0),lock:(a=t.lock)!=null?a:!1,customClass:t.customClass||"",visible:(l=t.visible)!=null?l:!0,target:o}},he=async(t,e,s)=>{const{nextZIndex:a}=s.vm.zIndex,l={};if(t.fullscreen)s.originalPosition.value=_(document.body,"position"),s.originalOverflow.value=_(document.body,"overflow"),l.zIndex=a();else if(t.parent===document.body){s.originalPosition.value=_(document.body,"position"),await P();for(const o of["top","left"]){const c=o==="top"?"scrollTop":"scrollLeft";l[o]=`${t.target.getBoundingClientRect()[o]+document.body[c]+document.documentElement[c]-Number.parseInt(_(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])l[o]=`${t.target.getBoundingClientRect()[o]}px`}else s.originalPosition.value=_(e,"position");for(const[o,c]of Object.entries(l))s.$el.style[o]=c},N=(t,e,s)=>{const a=s.vm.ns;["absolute","fixed","sticky"].includes(s.originalPosition.value)?C(e,a.bm("parent","relative")):B(e,a.bm("parent","relative")),t.fullscreen&&t.lock?B(e,a.bm("parent","hidden")):C(e,a.bm("parent","hidden"))},I=Symbol("ElLoading"),V=(t,e)=>{var s,a,l,o;const c=e.instance,u=n=>O(e.value)?e.value[n]:void 0,f=n=>{const r=z(n)&&(c==null?void 0:c[n])||n;return r&&T(r)},m=n=>f(u(n)||t.getAttribute(`element-loading-${le(n)}`)),p=(s=u("fullscreen"))!=null?s:e.modifiers.fullscreen,d={text:m("text"),svg:m("svg"),svgViewBox:m("svgViewBox"),spinner:m("spinner"),background:m("background"),customClass:m("customClass"),fullscreen:p,target:(a=u("target"))!=null?a:p?void 0:t,body:(l=u("body"))!=null?l:e.modifiers.body,lock:(o=u("lock"))!=null?o:e.modifiers.lock};t[I]={options:d,instance:ye(d)}},Ce=(t,e)=>{for(const s of Object.keys(e))oe(e[s])&&(e[s].value=t[s])},Ve={mounted(t,e){e.value&&V(t,e)},updated(t,e){const s=t[I];e.oldValue!==e.value&&(e.value&&!e.oldValue?V(t,e):e.value&&e.oldValue?O(e.value)&&Ce(e.value,s.options):s==null||s.instance.close())},unmounted(t){var e;(e=t[I])==null||e.instance.close()}},k=t=>(ie("data-v-131a88f9"),t=t(),de(),t),we=k(()=>x("span",null,"欢迎页",-1)),ke=k(()=>x("span",null,"个人信息",-1)),Se=k(()=>x("span",null,"我的余额",-1)),Le=k(()=>x("span",null,"我的积分",-1)),Ie=w({__name:"index",setup(t){const e=re();return(s,a)=>{const l=ue,o=me;return L(),ce(o,{"default-active":g(e).route,ellipsis:!1,router:!0,class:"el-menu-vertical-demo w-[200px]"},{default:v(()=>[y(l,{index:"/member",route:"/member",class:"divide-y"},{default:v(()=>[we]),_:1}),y(l,{index:"/member/center",route:"/member/center",class:"divide-y"},{default:v(()=>[ke]),_:1}),y(l,{index:"/member/balance",route:"/member/balance",class:"divide-y"},{default:v(()=>[Se]),_:1}),y(l,{index:"/member/point",route:"/member/point",class:"divide-y"},{default:v(()=>[Le]),_:1})]),_:1},8,["default-active"])}}});const Te=ve(Ie,[["__scopeId","data-v-131a88f9"]]);export{Ne as E,Te as _,Ve as v};