<template>
  <el-progress :stroke-width="strokeWidth" :percentage="value" :format="format" v-bind="otherProps"></el-progress>
</template>

<script>
export default {
    props: {
        strokeWidth: {
            type: Number
        },
        percentage: {
            type: Number
        },
        otherProps: {
            type: Object,
            default: function () {
                return {
                };
            }
        }
    },
    data () {
        return {};
    },
    computed: {
        value () {
            return this.percentage > 100 ? 100 : this.percentage;
        }
    },
    methods: {
        format () {
            return `${this.percentage}%`;
        }
    }
};
</script>
