forked from kouchao/vue-layui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogress.vue
More file actions
52 lines (52 loc) · 862 Bytes
/
progress.vue
File metadata and controls
52 lines (52 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<template>
<div
class="layui-progress"
:class="'layui-progress-' + size"
>
<div
class="layui-progress-bar"
:class="'layui-bg-' + theme"
:style="[
color ? 'background-color: ' + color : '',
{
width: percentage + '%'
}
]"
>
<span
v-if="showText"
class="layui-progress-text"
>
{{ text ? text : percentage + "%" }}
</span>
</div>
</div>
</template>
<script>
export default {
name: 'LayProgress',
props: {
percentage: {
type: Number,
default: 0
},
theme: {
type: String,
default: ''
},
color: {
type: String,
default: ''
},
size: {
type: String,
default: ''
},
showText: Boolean,
text: {
type: String,
default: ''
}
}
};
</script>