You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
2.1 KiB
1 lines
2.1 KiB
import{_ as p,G as d,H as g,Z as u,e as h,o as _,c as f,f as c,D as m,g as v,A as y}from"./index-9b4667b6.js";var l={exports:{}};(function(n,r){const e=function(t){t||(t={}),this.timeConstant=t.timeConstant||1e3,this.progress=0,this._running=!1,this._intervalFrequency=100,this.autoStart=t.autoStart||!1,this.parent=t.parent,this.parentStart=t.parentStart,this.parentEnd=t.parentEnd,this.autoStart&&this.start()};e.prototype.start=function(){this._time=0,this._intervalId=setInterval(this._onInterval.bind(this),this._intervalFrequency)},e.prototype._onInterval=function(){this._time+=this._intervalFrequency,this.setProgress(1-Math.exp(-1*this._time/this.timeConstant))},e.prototype.end=function(){this.stop(),this.setProgress(1)},e.prototype.stop=function(){clearInterval(this._intervalId),this._intervalId=null},e.prototype.createSubProgress=function(t){const a=t.start||this.progress,s=t.end||1,o=Object.assign({},t,{parent:this,parentStart:a,parentEnd:s,start:null,end:null});return new e(o)},e.prototype.setProgress=function(t){this.progress=t,this.parent&&this.parent.setProgress((this.parentEnd-this.parentStart)*this.progress+this.parentStart)},n.exports=e})(l);const x=l.exports;const S={key:0,class:"fullscreen-loading"},b={class:"loading-spinner"},P=d({name:"FullScreenLoading"}),I=Object.assign(P,{props:{loadingVisible:{type:Boolean,default:!1},loadingText:{type:String,default:"\u6587\u4EF6\u6570\u636E\u5BFC\u5165\u4E2D\uFF0C\u8BF7\u7A0D\u5019..."},timeConstant:{type:Number,default:3e4}},setup(n){const r=n,e=g(new x({timeConstant:r.timeConstant,autoStart:!0}));u(()=>r.loadingVisible,s=>{s?(e.progress=0,e.start()):e.end()});const t=[{color:"#f56c6c",percentage:20},{color:"#e6a23c",percentage:40},{color:"#5cb87a",percentage:60},{color:"#1989fa",percentage:80},{color:"#6f7ad3",percentage:100}],a=()=>{let s=0;return parseInt(e.progress*100)<=99?s=parseInt(e.progress*100):s=99,s};return(s,o)=>{const i=h("el-progress");return n.loadingVisible?(_(),f("div",S,[c("div",b,[c("span",null,m(n.loadingText),1)]),v(i,{class:"w500px mt12px","stroke-width":14,percentage:a(),color:t},null,8,["percentage"])])):y("",!0)}}}),k=p(I,[["__scopeId","data-v-4c9d6aa5"]]);export{k as default};
|