forked from N3-components/N3-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
n3Progressbar.vue
executable file
·54 lines (51 loc) · 1.02 KB
/
n3Progressbar.vue
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
53
54
<template>
<div
:class="classObj"
:style="{width: now + '%',height: height}">
{{label ? now + '%':'' }}
</div>
</template>
<script>
export default {
props: {
height: {
type: String,
default: '20px'
},
now: {
type: Number,
require: true
},
label: {
type: Boolean,
default: false
},
type: {
type: String
},
striped: {
type: Boolean,
default: false
},
animated: {
type: Boolean,
default: false
},
prefixCls: {
type: String,
default: 'n3'
}
},
computed: {
classObj () {
let {prefixCls, type, striped, animated} = this
let klass = {}
klass[prefixCls + '-progress-bar'] = true
klass[prefixCls + '-progress-bar-' + type] = true
klass[prefixCls + '-progress-bar-striped'] = striped
klass[prefixCls + '-progress-bar-animated'] = animated
return klass
}
}
}
</script>