<template>
  <div class="demo-progress-format">
    <ui-progress
      :percentage="30"
      :format="percentage => percentage + 'day'"
      type="circle">
    </ui-progress>
    <ui-progress
      :percentage="100"
      :format="format"
      type="circle"
      status="success">
    </ui-progress>
  </div>
</template>

<script>
import { Progress } from "amumu-ui"
export default {
  components: {
    "ui-progress": Progress,
  },
  methods: {
    format(percentage) {
      if (percentage === 100) {
        return "success"
      }
      return percentage + "day"
    },
  },
}
</script>

<style lang="scss">
.demo-progress-format {
  .mm-progress--circle {
    margin-right: 20px;
  }
}
</style>
