|
10 | 10 | <demonstration
|
11 | 11 | title="线形进度条 — 百分比外显"
|
12 | 12 | anchor="xian-xing-jin-du-tiao-bai-fen-bi-wai-xian"
|
13 |
| - :highlight="sourcecodeA"> |
| 13 | + :highlight="sourcecodeA" |
| 14 | + :multiple="true"> |
14 | 15 | <template slot="source">
|
15 |
| - <vm-progress :percentage="0"></vm-progress> |
16 |
| - <vm-progress :percentage="70"></vm-progress> |
17 |
| - <vm-progress :percentage="30" strokeColor="purple"></vm-progress> |
18 |
| - <vm-progress :percentage="30" status="exception"></vm-progress> |
19 |
| - <vm-progress :percentage="50" status="info"></vm-progress> |
20 |
| - <vm-progress :percentage="80" status="warning"></vm-progress> |
21 |
| - <vm-progress :percentage="100" status="success"></vm-progress> |
| 16 | + <div class="vd-demo__block vd-demo__block-2"> |
| 17 | + <span class="vd-demo__demonstartion">默认文字</span> |
| 18 | + <vm-progress :percentage="0"></vm-progress> |
| 19 | + <vm-progress :percentage="70"></vm-progress> |
| 20 | + <vm-progress :percentage="30" strokeColor="purple"></vm-progress> |
| 21 | + <vm-progress :percentage="30" status="exception"></vm-progress> |
| 22 | + <vm-progress :percentage="50" status="info"></vm-progress> |
| 23 | + <vm-progress :percentage="80" status="warning"></vm-progress> |
| 24 | + <vm-progress :percentage="100" status="success"></vm-progress> |
| 25 | + </div> |
| 26 | + <div class="vd-demo__block vd-demo__block-2 vd-custom-text"> |
| 27 | + <span class="vd-demo__demonstartion">自定义文字,需要附加样式</span> |
| 28 | + <vm-progress :percentage="0">占比 0%</vm-progress> |
| 29 | + <vm-progress :percentage="70">占比 70%</vm-progress> |
| 30 | + <vm-progress :percentage="30" strokeColor="purple">占比 30%</vm-progress> |
| 31 | + <vm-progress :percentage="30" status="exception">占比 30%</vm-progress> |
| 32 | + <vm-progress :percentage="50" status="info">占比 50%</vm-progress> |
| 33 | + <vm-progress :percentage="80" status="warning">占比 80%</vm-progress> |
| 34 | + <vm-progress :percentage="100" status="success">占比 100%</vm-progress> |
| 35 | + </div> |
22 | 36 | </template>
|
23 | 37 | <template slot="explanation">
|
24 | 38 | <code>Progress</code> 组件设置 <code>percentage</code> 属性即可,表示进度条对应的百分比,必填,必须在 <code>0-100</code>。
|
|
28 | 42 | title="线形进度条 — 百分比内显"
|
29 | 43 | anchor="xian-xing-jin-du-tiao-bai-fen-bi-nei-xian"
|
30 | 44 | description="百分比不占用额外控件,适用于文件上传等场景。"
|
31 |
| - :highlight="sourcecodeB"> |
| 45 | + :highlight="sourcecodeB" |
| 46 | + :multiple="true"> |
32 | 47 | <template slot="source">
|
33 |
| - <vm-progress :percentage="0" :text-inside="true" :stroke-width="18"></vm-progress> |
34 |
| - <vm-progress :percentage="70" :text-inside="true" :stroke-width="18"></vm-progress> |
35 |
| - <vm-progress :percentage="30" :text-inside="true" :stroke-width="18" strokeColor="purple"></vm-progress> |
36 |
| - <vm-progress :percentage="30" :text-inside="true" :stroke-width="18" status="exception"></vm-progress> |
37 |
| - <vm-progress :percentage="50" :text-inside="true" :stroke-width="18" status="info"></vm-progress> |
38 |
| - <vm-progress :percentage="80" :text-inside="true" :stroke-width="18" status="warning"></vm-progress> |
39 |
| - <vm-progress :percentage="100" :text-inside="true" :stroke-width="18" status="success"></vm-progress> |
| 48 | + <div class="vd-demo__block vd-demo__block-2"> |
| 49 | + <span class="vd-demo__demonstartion">默认文字</span> |
| 50 | + <vm-progress :percentage="0" :text-inside="true" :stroke-width="18"></vm-progress> |
| 51 | + <vm-progress :percentage="70" :text-inside="true" :stroke-width="18"></vm-progress> |
| 52 | + <vm-progress :percentage="30" :text-inside="true" :stroke-width="18" strokeColor="purple"></vm-progress> |
| 53 | + <vm-progress :percentage="30" :text-inside="true" :stroke-width="18" status="exception"></vm-progress> |
| 54 | + <vm-progress :percentage="50" :text-inside="true" :stroke-width="18" status="info"></vm-progress> |
| 55 | + <vm-progress :percentage="80" :text-inside="true" :stroke-width="18" status="warning"></vm-progress> |
| 56 | + <vm-progress :percentage="100" :text-inside="true" :stroke-width="18" status="success"></vm-progress> |
| 57 | + </div> |
| 58 | + <div class="vd-demo__block vd-demo__block-2"> |
| 59 | + <span class="vd-demo__demonstartion">自定义文字</span> |
| 60 | + <vm-progress :percentage="0" :text-inside="true" :stroke-width="18">占比 0%</vm-progress> |
| 61 | + <vm-progress :percentage="70" :text-inside="true" :stroke-width="18">占比 70%</vm-progress> |
| 62 | + <vm-progress :percentage="30" :text-inside="true" :stroke-width="18" strokeColor="purple">占比 30%</vm-progress> |
| 63 | + <vm-progress :percentage="30" :text-inside="true" :stroke-width="18" status="exception">占比 30%</vm-progress> |
| 64 | + <vm-progress :percentage="50" :text-inside="true" :stroke-width="18" status="info">占比 50%</vm-progress> |
| 65 | + <vm-progress :percentage="80" :text-inside="true" :stroke-width="18" status="warning">占比 80%</vm-progress> |
| 66 | + <vm-progress :percentage="100" :text-inside="true" :stroke-width="18" status="success">占比 100%</vm-progress> |
| 67 | + </div> |
40 | 68 | </template>
|
41 | 69 | <template slot="explanation">
|
42 | 70 | <code>Progress</code> 组件可通过 <code>stroke-width</code> 属性更改进度条的高度,并可通过 <code>text-inside</code> 属性来将进度条描述置于进度条内部。
|
|
264 | 292 | width: 350px;
|
265 | 293 | margin-bottom: 15px;
|
266 | 294 | }
|
| 295 | + .vd-custom-text .vm-progress-bar { |
| 296 | + padding-right: 100px; |
| 297 | + margin-right: -105px; |
| 298 | + } |
267 | 299 | }
|
268 | 300 | .btn-striped {
|
269 | 301 | margin-bottom: 20px;
|
|
0 commit comments