add vertical progressbar

This commit is contained in:
Rijn 2017-07-21 12:36:16 -05:00
parent 7f08fb512a
commit 48921bf57d
3 changed files with 39 additions and 2 deletions

View file

@ -43,6 +43,10 @@
strokeWidth: {
type: Number,
default: 10
},
vertical: {
type: Boolean,
default: false
}
},
data () {
@ -68,7 +72,10 @@
return type;
},
bgStyle () {
return {
return this.vertical ? {
height: `${this.percent}%`,
width: `${this.strokeWidth}px`
} : {
width: `${this.percent}%`,
height: `${this.strokeWidth}px`
};
@ -78,7 +85,8 @@
`${prefixCls}`,
`${prefixCls}-${this.currentStatus}`,
{
[`${prefixCls}-show-info`]: !this.hideInfo
[`${prefixCls}-show-info`]: !this.hideInfo,
[`${prefixCls}-vertical`]: this.vertical
}
];