import{_ as i}from"./index.c8cfbd6c.js";import{e as d,o as a,g as _,F as t,a as m,l as r,f as b,X as y}from"./@vue.e84e1286.js";import{p}from"./preview.2bfe2f00.js";import"./vue-router.54876e93.js";import"./bus.f1893518.js";import"./mitt.550594b0.js";/* empty css */const x={class:"demo-progress"},k={__name:"demo1",setup(l){const e=o=>o===100?"\u6EE1":`${o}%`;return(o,c)=>{const s=d("m-progress");return a(),_("div",x,[t(s,{percentage:50}),t(s,{percentage:100,format:e}),t(s,{percentage:100,status:"success"}),t(s,{percentage:100,status:"warning"}),t(s,{percentage:50,status:"error"})])}}};var w=i(k,[["__scopeId","data-v-8d11dbf0"]]);const N={},$={class:"demo-progress"};function I(l,e){const o=d("m-progress");return a(),_("div",$,[t(o,{"text-inside":!0,"stroke-width":26,percentage:70}),t(o,{"text-inside":!0,"stroke-width":24,percentage:100,status:"success"}),t(o,{"text-inside":!0,"stroke-width":22,percentage:80,status:"warning"}),t(o,{"text-inside":!0,"stroke-width":20,percentage:50,status:"error"})])}var C=i(N,[["render",I],["__scopeId","data-v-94f16e08"]]);const P={class:"demo-progress"},B={__name:"demo3",setup(l){const e=m(20),o=m("#409eff"),c=[{color:"#f56c6c",percentage:20},{color:"#e6a23c",percentage:40},{color:"#5cb87a",percentage:60},{color:"#1989fa",percentage:80},{color:"#6f7ad3",percentage:100}],s=u=>u<30?"#909399":u<70?"#e6a23c":"#67c23a",g=()=>{e.value+=10,e.value>100&&(e.value=100)},v=()=>{e.value-=10,e.value<0&&(e.value=0)};return(u,h)=>{const n=d("m-progress"),f=d("m-button");return a(),_("div",P,[t(n,{percentage:e.value,color:o.value},null,8,["percentage","color"]),t(n,{percentage:e.value,color:s},null,8,["percentage"]),t(n,{percentage:e.value,color:c},null,8,["percentage"]),r("div",null,[t(f,{leftIcon:"icon-minus",onClick:v}),t(f,{leftIcon:"icon-add",onClick:g})])])}}};var V=i(B,[["__scopeId","data-v-d15fa8e0"]]);const M={},q={class:"demo-progress"};function A(l,e){const o=d("m-progress");return a(),_("div",q,[t(o,{type:"circle",percentage:0}),t(o,{type:"circle",percentage:25}),t(o,{type:"circle",percentage:100,status:"success"}),t(o,{type:"circle",percentage:70,status:"warning"}),t(o,{type:"circle",percentage:50,status:"error"})])}var E=i(M,[["render",A],["__scopeId","data-v-bf3d1a80"]]);const F={class:"demo-progress"},S={__name:"demo5",setup(l){const e=m(10),o=m(0),c=[{color:"#f56c6c",percentage:20},{color:"#e6a23c",percentage:40},{color:"#5cb87a",percentage:60},{color:"#1989fa",percentage:80},{color:"#6f7ad3",percentage:100}],s=()=>{e.value+=10,e.value>100&&(e.value=100)},g=()=>{e.value-=10,e.value<0&&(e.value=0)};return b(()=>{setInterval(()=>{o.value=o.value%100+10},500)}),(v,u)=>{const h=d("m-progress"),n=d("m-button");return a(),_("div",F,[t(h,{type:"dashboard",percentage:e.value,color:c},null,8,["percentage"]),t(h,{type:"dashboard",percentage:o.value,color:c},null,8,["percentage"]),r("div",null,[t(n,{leftIcon:"icon-minus",onClick:g}),t(n,{leftIcon:"icon-add",onClick:s})])])}}};var X=i(S,[["__scopeId","data-v-ef54524c"]]);const j={class:"markdown-body"},z=r("h1",null,"Progress \u8FDB\u5EA6\u6761",-1),D=r("h4",null,"\u7528\u4E8E\u5C55\u793A\u64CD\u4F5C\u8FDB\u5EA6\uFF0C\u544A\u77E5\u7528\u6237\u5F53\u524D\u72B6\u6001\u548C\u9884\u671F",-1),G=r("br",null,null,-1),H=r("h2",null,"\u76F4\u7EBF\u8FDB\u5EA6\u6761",-1),J=r("h4",null,"Progress \u7EC4\u4EF6\u8BBE\u7F6Epercentage\u5C5E\u6027\u5373\u53EF\uFF0C\u8868\u793A\u8FDB\u5EA6\u6761\u5BF9\u5E94\u7684\u767E\u5206\u6BD4\uFF0C\u5FC5\u586B\uFF0C\u5FC5\u987B\u5728 0-100\u3002\u901A\u8FC7 format \u5C5E\u6027\u6765\u6307\u5B9A\u8FDB\u5EA6\u6761\u6587\u5B57\u5185\u5BB9",-1),K={class:"source"},L=r("h2",null,"\u767E\u5206\u6BD4\u5185\u663E",-1),O=r("h4",null,"\u767E\u5206\u6BD4\u4E0D\u5360\u7528\u989D\u5916\u63A7\u4EF6\uFF0C\u9002\u7528\u4E8E\u6587\u4EF6\u4E0A\u4F20\u7B49\u573A\u666F\u3002Progress \u7EC4\u4EF6\u53EF\u901A\u8FC7 stroke-height \u5C5E\u6027\u66F4\u6539\u8FDB\u5EA6\u6761\u7684\u9AD8\u5EA6\uFF0C\u5E76\u53EF\u901A\u8FC7 text-inside \u5C5E\u6027\u6765\u6539\u53D8\u8FDB\u5EA6\u6761\u5185\u90E8\u7684\u6587\u5B57\u3002",-1),Q={class:"source"},R=r("h2",null,"\u81EA\u5B9A\u4E49\u989C\u8272",-1),T=r("h4",null,"\u53EF\u4EE5\u901A\u8FC7 color \u5C5E\u6027\u6765\u8BBE\u7F6E\u8FDB\u5EA6\u6761\u7684\u989C\u8272\u3002 \u8BE5\u5C5E\u6027\u53EF\u4EE5\u63A5\u53D7\u5341\u516D\u8FDB\u5236\u989C\u8272\u503C\uFF0C\u51FD\u6570\u548C\u6570\u7EC4",-1),U={class:"source"},W=r("h2",null,"\u73AF\u5F62\u8FDB\u5EA6\u6761",-1),Y=r("h4",null,"Progress \u7EC4\u4EF6\u53EF\u901A\u8FC7 type \u5C5E\u6027\u6765\u6307\u5B9A\u4F7F\u7528\u73AF\u5F62\u8FDB\u5EA6\u6761\uFF0C\u5728\u73AF\u5F62\u8FDB\u5EA6\u6761\u4E2D\uFF0C\u8FD8\u53EF\u4EE5\u901A\u8FC7 width \u5C5E\u6027\u6765\u8BBE\u7F6E\u5176\u5927\u5C0F",-1),Z={class:"source"},tt=r("h2",null,"\u4EEA\u8868\u76D8\u5F62\u8FDB\u5EA6\u6761",-1),et=r("h4",null,"\u901A\u8FC7\u6307\u5B9A type \u5C5E\u6027\u5230 dashboard \u4F7F\u7528\u63A7\u5236\u9762\u677F\u8FDB\u5EA6\u680F",-1),ot={class:"source"},rt=y("
\u53C2\u6570 | \u8BF4\u660E | \u7C7B\u578B | \u53EF\u9009\u503C | \u9ED8\u8BA4\u503C |
---|---|---|---|---|
percentage | \u767E\u5206\u6BD4\uFF08\u5FC5\u586B\uFF09 | number | 0-100 | 0 |
type | \u8FDB\u5EA6\u6761\u7C7B\u578B | string | line/circle/dashboard | line |
stroke-width | \u8FDB\u5EA6\u6761\u7684\u5BBD\u5EA6\uFF0C\u5355\u4F4D px | number | \u2014 | 6 |
text-inside | \u8FDB\u5EA6\u6761\u663E\u793A\u6587\u5B57\u5185\u7F6E\u5728\u8FDB\u5EA6\u6761\u5185\uFF08\u53EA\u5728 type=line \u65F6\u53EF\u7528\uFF09 | boolean | \u2014 | false |
status | \u8FDB\u5EA6\u6761\u5F53\u524D\u72B6\u6001 | string | success/warning/error | \u2014 |
color | \u8FDB\u5EA6\u6761\u80CC\u666F\u8272\uFF08\u4F1A\u8986\u76D6 status \u72B6\u6001\u989C\u8272\uFF09 | string/function/array | \u2014 | \u2018\u2019 |
width | \u73AF\u5F62\u8FDB\u5EA6\u6761\u753B\u5E03\u5BBD\u5EA6\uFF08\u53EA\u5728 type \u4E3A circle \u6216 dashboard \u65F6\u53EF\u7528\uFF09 | number | 126 | |
show-text | \u662F\u5426\u663E\u793A\u8FDB\u5EA6\u6761\u6587\u5B57\u5185\u5BB9 | boolean | \u2014 | true |
stroke-linecap | circle/dashboard \u7C7B\u578B\u8DEF\u5F84\u4E24\u7AEF\u7684\u5F62\u72B6 | string | butt/round/square | round |
format | \u6307\u5B9A\u8FDB\u5EA6\u6761\u6587\u5B57\u5185\u5BB9 | function(percentage) | \u2014 | \u2014 |