Skip to content

EpItemCount

Props

NameDescriptionTypeDefault
countThe count of items to display.number-
singularThe singular form of the item name.string-
pluralThe plural form of the item name.string-

INFO

This component does not use events, slots.

Component Code

vue
<template>
  <span>
    {{ count }} {{ count === 1 ? singular : plural }}
  </span>
</template>

<script setup>
  defineOptions({
    name: 'EpItemCount'
  })

  const props = defineProps({
    /**
     * The count of items to display.
     */
    count: {
      type: Number,
      required: true
    },
    /**
     * The singular form of the item name.
     */
    singular: {
      type: String,
      required: true
    },
    /**
     * The plural form of the item name.
     */
    plural: {
      type: String,
      required: true
    }
  })
</script>