feat(admin): 新增管理后台前端资源文件 feat(api): 实现获取用户统计数据的API接口 - 添加获取用户道具卡数量、优惠券数量和积分余额的接口 - 实现设置默认地址和删除地址的接口 feat(service): 新增用户统计服务方法 - 实现GetUserStats方法查询用户统计数据 - 添加地址管理相关服务方法 fix(core): 修复静态资源路由问题 - 调整静态资源路由配置 - 优化404路由处理逻辑 chore: 更新前端构建配置 - 添加Windows平台构建命令 - 更新README构建说明
2 lines
4.6 KiB
JavaScript
2 lines
4.6 KiB
JavaScript
var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,o=(t,a,s)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s;import{a2 as i,ak as l,_ as c,d as p,X as u,c as d,d5 as f,d6 as b,bO as y,b3 as h,b4 as v,bv as g,aa as k,e as m,f as w,k as x,i as $,u as O,h as j,g as I,j as N,m as P,y as B,z as D,au as F,ab as S,ap as T}from"./index-ip5gDR6L.js";const W=i({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:e=>e>=0&&e<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:l(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:l([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:l(Function),default:e=>`${e}%`}}),_=p({name:"ElProgress"}),E=p((L=((e,t)=>{for(var a in t||(t={}))r.call(t,a)&&o(e,a,t[a]);if(s)for(var a of s(t))n.call(t,a)&&o(e,a,t[a]);return e})({},_),z={props:W,setup(e){const t=e,a={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},s=u("progress"),r=d(()=>{const e={width:`${t.percentage}%`,animationDuration:`${t.duration}s`},a=M(t.percentage);return a.includes("gradient")?e.background=a:e.backgroundColor=a,e}),n=d(()=>(t.strokeWidth/t.width*100).toFixed(1)),o=d(()=>["circle","dashboard"].includes(t.type)?Number.parseInt(""+(50-Number.parseFloat(n.value)/2),10):0),i=d(()=>{const e=o.value,a="dashboard"===t.type;return`\n M 50 50\n m 0 ${a?"":"-"}${e}\n a ${e} ${e} 0 1 1 0 ${a?"-":""}${2*e}\n a ${e} ${e} 0 1 1 0 ${a?"":"-"}${2*e}\n `}),l=d(()=>2*Math.PI*o.value),c=d(()=>"dashboard"===t.type?.75:1),p=d(()=>-1*l.value*(1-c.value)/2+"px"),T=d(()=>({strokeDasharray:`${l.value*c.value}px, ${l.value}px`,strokeDashoffset:p.value})),W=d(()=>({strokeDasharray:`${l.value*c.value*(t.percentage/100)}px, ${l.value}px`,strokeDashoffset:p.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),_=d(()=>{let e;return e=t.color?M(t.percentage):a[t.status]||a.default,e}),E=d(()=>"warning"===t.status?f:"line"===t.type?"success"===t.status?b:y:"success"===t.status?h:v),L=d(()=>"line"===t.type?12+.4*t.strokeWidth:.111111*t.width+2),z=d(()=>t.format(t.percentage)),M=e=>{var a;const{color:s}=t;if(g(s))return s(e);if(k(s))return s;{const t=function(e){const t=100/e.length;return e.map((e,a)=>k(e)?{color:e,percentage:(a+1)*t}:e).sort((e,t)=>e.percentage-t.percentage)}(s);for(const a of t)if(a.percentage>e)return a.color;return null==(a=t[t.length-1])?void 0:a.color}};return(e,t)=>(w(),m("div",{class:$([O(s).b(),O(s).m(e.type),O(s).is(e.status),{[O(s).m("without-text")]:!e.showText,[O(s).m("text-inside")]:e.textInside}]),role:"progressbar","aria-valuenow":e.percentage,"aria-valuemin":"0","aria-valuemax":"100"},["line"===e.type?(w(),m("div",{key:0,class:$(O(s).b("bar"))},[j("div",{class:$(O(s).be("bar","outer")),style:I({height:`${e.strokeWidth}px`})},[j("div",{class:$([O(s).be("bar","inner"),{[O(s).bem("bar","inner","indeterminate")]:e.indeterminate},{[O(s).bem("bar","inner","striped")]:e.striped},{[O(s).bem("bar","inner","striped-flow")]:e.stripedFlow}]),style:I(O(r))},[(e.showText||e.$slots.default)&&e.textInside?(w(),m("div",{key:0,class:$(O(s).be("bar","innerText"))},[N(e.$slots,"default",{percentage:e.percentage},()=>[j("span",null,P(O(z)),1)])],2)):x("v-if",!0)],6)],6)],2)):(w(),m("div",{key:1,class:$(O(s).b("circle")),style:I({height:`${e.width}px`,width:`${e.width}px`})},[(w(),m("svg",{viewBox:"0 0 100 100"},[j("path",{class:$(O(s).be("circle","track")),d:O(i),stroke:`var(${O(s).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":e.strokeLinecap,"stroke-width":O(n),fill:"none",style:I(O(T))},null,14,["d","stroke","stroke-linecap","stroke-width"]),j("path",{class:$(O(s).be("circle","path")),d:O(i),stroke:O(_),fill:"none",opacity:e.percentage?1:0,"stroke-linecap":e.strokeLinecap,"stroke-width":O(n),style:I(O(W))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),!e.showText&&!e.$slots.default||e.textInside?x("v-if",!0):(w(),m("div",{key:2,class:$(O(s).e("text")),style:I({fontSize:`${O(L)}px`})},[N(e.$slots,"default",{percentage:e.percentage},()=>[e.status?(w(),B(O(S),{key:1},{default:D(()=>[(w(),B(F(O(E))))]),_:1})):(w(),m("span",{key:0},P(O(z)),1))])],6))],10,["aria-valuenow"]))}},t(L,a(z))));var L,z;const M=T(c(E,[["__file","progress.vue"]]));export{M as E};
|