Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.44 KB

README.md

File metadata and controls

43 lines (33 loc) · 1.44 KB

@baloise/web-app-pipes-vue

Continuous Release npm npm bundle size npm GitHub GitHub issues

Installation

npm install @baloise/web-app-pipes-vue

Usage

In Vue 3 just import the pipe function and use it in computed functions or return it to the template. Vue 3 has removed pipes/filters Link.

<template>
  <p>{{ formatedClaimNumber }}</p>
</template>

<script lang="ts">
import { computed, defineComponent, ref } from 'vue'
import { balClaimNumber } from '@baloise/web-app-pipes-vue'

export default defineComponent({
  setup() {
    const claimNumber = ref('73001217169')

    const formatedClaimNumber = computed(() => balClaimNumber(claimNumber.value))

    return {
      formatedClaimNumber,
    }
  },
})
</script>