test_lgq/niucloud/public/web/_nuxt/center.dcaa76aa.js

7 lines
20 KiB
JavaScript
Raw Normal View History

2024-01-24 17:36:08 +08:00
import{_ as Ce,E as Se,v as Pe}from"./el-loading.95b1f580.js";import{p as z,M as $,a as N,q,s as R,aN as Re,aO as fe,aP as Le,aQ as me,am as ve,aR as Ue,aA as ae,o as h,e as S,y as b,u as e,j as P,z as M,x as T,t as j,k as E,c as O,w as _,A as Fe,E as V,B as K,C as ye,aa as Q,aS as U,af as Te,r as te,F as De,G as Oe,aT as ge,al as W,f as C,aU as Ne,ap as Be,aV as je,aW as Ae,aX as Ie,O as Me,ai as Z,aY as Ve,aZ as qe,a_ as We,aj as oe,a$ as ze,aI as He,v as Ke,b0 as Xe,b1 as ne,ay as x,W as Ge,D as Ye,b2 as Je,a0 as Qe,V as I,I as Ze,h as le,b3 as xe,b4 as et,R as tt,b5 as re,b6 as ie}from"./entry.539d3b49.js";import{t as se,i as he,d as st}from"./index.e7365e3c.js";import{u as X}from"./use-form-item.aa386fad.js";import{c as at,E as ot,a as nt,b as lt}from"./el-overlay.172e9766.js";import{E as rt}from"./el-input.60ea0dae.js";import{E as it}from"./el-button.b86b6ea8.js";import{_ as ut}from"./default_headimg.8342a3b1.js";import{_ as dt}from"./_plugin-vue_export-helper.c27b6911.js";import"./el-tooltip.a101b1cd.js";import"./el-popper.6e1fd591.js";import"./index.68b3a059.js";import"./vnode.48eda29e.js";import"./_initCloneObject.18c5d913.js";var ct=1,pt=4;function ft(n){return at(n,ct|pt)}const mt=z({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:n=>n>=0&&n<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:{type:Boolean,default:!1},duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:$(String),default:"round"},textInside:{type:Boolean,default:!1},width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:$([String,Array,Function]),default:""},format:{type:$(Function),default:n=>`${n}%`}}),vt=["aria-valuenow"],yt={viewBox:"0 0 100 100"},gt=["d","stroke","stroke-width"],ht=["d","stroke","opacity","stroke-linecap","stroke-width"],bt={key:0},kt=N({name:"ElProgress"}),_t=N({...kt,props:mt,setup(n){const s=n,o={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},t=q("progress"),f=R(()=>({width:`${s.percentage}%`,animationDuration:`${s.duration}s`,backgroundColor:L(s.percentage)})),m=R(()=>(s.strokeWidth/s.width*100).toFixed(1)),v=R(()=>["circle","dashboard"].includes(s.type)?Number.parseInt(`${50-Number.parseFloat(m.value)/2}`,10):0),c=R(()=>{const r=v.value,D=s.type==="dashboard";return`
M 50 50
m 0 ${D?"":"-"}${r}
a ${r} ${r} 0 1 1 0 ${D?"-":""}${r*2}
a ${r} ${r} 0 1 1 0 ${D?"":"-"}${r*2}
`}),y=R(()=>2*Math.PI*v.value),d=R(()=>s.type==="dashboard"?.75:1),w=R(()=>`${-1*y.value*(1-d.value)/2}px`),g=R(()=>({strokeDasharray:`${y.value*d.value}px, ${y.value}px`,strokeDashoffset:w.value})),l=R(()=>({strokeDasharray:`${y.value*d.value*(s.percentage/100)}px, ${y.value}px`,strokeDashoffset:w.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),u=R(()=>{let r;return s.color?r=L(s.percentage):r=o[s.status]||o.default,r}),a=R(()=>s.status==="warning"?Re:s.type==="line"?s.status==="success"?fe:Le:s.status==="success"?me:ve),p=R(()=>s.type==="line"?12+s.strokeWidth*.4:s.width*.111111+2),k=R(()=>s.format(s.percentage));function i(r){const D=100/r.length;return r.map((F,A)=>ae(F)?{color:F,percentage:(A+1)*D}:F).sort((F,A)=>F.percentage-A.percentage)}const L=r=>{var D;const{color:B}=s;if(Ue(B))return B(r);if(ae(B))return B;{const F=i(B);for(const A of F)if(A.percentage>r)return A.color;return(D=F[F.length-1])==null?void 0:D.color}};return(r,D)=>(h(),S("div",{class:b([e(t).b(),e(t).m(r.type),e(t).is(r.status),{[e(t).m("without-text")]:!r.showText,[e(t).m("text-inside")]:r.textInside}]),role:"progressbar","aria-valuenow":r.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[r.type==="line"?(h(),S("div",{key:0,class:b(e(t).b("bar"))},[P("div",{class:b(e(t).be("bar","outer")),style:M({height:`${r.strokeWidth}px`})},[P("div",{class:b([e(t).be("bar","inner"),{[e(t).bem("bar","inner","indeterminate")]:r.indeterminate}]),style:M(e(f))},[(r.showText||r.$slots.default)&&r.textInside?(h(),S("div",{key:0,class:b(e(t).be("bar","innerText"))},[T(r.$slots,"default",{percentage:r.percentage},()=>[P("span",null,j(e(k)),1)])],2)):E("v-if",!0)],6)],6)],2)):(h(),S("div",{key:1,class:b(e(t).b("circle")),style:M({height:`${r.width}px`,width:`${r.width}px`})},[(h(),S("svg",yt,[P("path",{class:b(e(t).be("circle","track")),d:e(c),stroke:`var(${e(t).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-width":e(m),fill:"none",style:M(e(g))},null,14,gt),P("path",{class:b(e(t).be("circle","path")),d:e(c),stroke:e(u),fill:"none",opacity:r.percentage?1:0,"stroke-linecap":r.strokeLinecap,"stroke-width":e(m),style:M(e(l))},null,14,ht)]))],6)),(r.showText||r.$slots.default)&&!r.textInside?(h(),S("div",{key:2,class:b(e(t).e("text")),style:M({fontSize:`${e(p)}px`})},[T(r.$slots,"default",{percentage:r.percentage},()=>[r.status?(h(),O(e(V),{key:1},{default:_(()=>[(h(),O(Fe(e(a))))]),_:1})):(h(),S("span",bt,j(e(k)),1))])],6)):E("v-if",!0)],10,vt))}});var $t=K(_t,[["__file","/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]);const wt=ye($t),be=Symbol("uploadContextKey"),Et="ElUpload";class Ct extends Error{constructor(s,o,t,f){super(s),this.name="UploadAjaxError",this.status=o,this.method=t,this.url=f}}function ue(n,s,o){let t;return o.response?t=`${o.response.error||o.response}`:o.responseText?t=`${o.responseText}`:t=`fail to ${s.method} ${n} ${o.status}`,new Ct(t,o.status,s.method,n)}function St(n){const s=n.responseText||n.response;if(!s)return s;try{return JSON.parse(s)}catch{return s}}const Pt=n=>{typeof XMLHttpRequest>"u"&&se(Et,"XMLHttpRequest is undefined");const s=new XMLHttpRequest,o=n.action;s.upload&&s.upload.addEventListener("progress",m=>{const v=m;v.percent=m.total>0?m.loaded/m.total*100:0,n.onProgress(v)});const t=new FormData;if(n.data)for(const[m,v]of Object.entries(n.data))Array.isArray(v)?t.append(m,...v):t.append(m,v);t.append(n.filename,n.file,n.file.name),s.addEventListener("error",()=>{n.onError(ue(o,n,s))}),s.addEventListener("load",()=>{if(s.status<200||s.status>=300)return n.onError(ue(o,n,s));n.onSuccess(St(s))}),s.open(n.method,o,!0),n.withCredentials&&"withCredentials"in s&&(s.withCredentials=!0);const f=n.headers||{};if(f instanceof Headers)f.forEach((m,v)=>s.setRequestHeader(v,m));else for(const[m,v]of Object.entries(f))he(v)||s.setRequestHeader(m,String(v));return s.send(t),s},ke=["text","picture","picture-card"];let Rt=1;const ee=()=>Date.now()+Rt++,_e=z({action:{type:String,default:"#"},headers:{type:$(Object)},method:{type:String,defau