From ce14d1065faceddc587d9f5b8d15a893b4743604 Mon Sep 17 00:00:00 2001 From: Marcos Mariani Date: Fri, 12 Jun 2020 20:52:38 -0300 Subject: [PATCH] Formatter Function Add the ability to format the value displayed on the slider through the function "formatter" --- src/components/vsSlider/vsSlider.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/vsSlider/vsSlider.vue b/src/components/vsSlider/vsSlider.vue index d3b0e96ee..f15e29977 100644 --- a/src/components/vsSlider/vsSlider.vue +++ b/src/components/vsSlider/vsSlider.vue @@ -50,7 +50,7 @@ - {{ valueCircle1 }} + {{ formatter(valueCircle1) }} {{ textFixed }} @@ -79,7 +79,7 @@ - {{ valueCircle2 }} + {{ formatter(valueCircle2) }} {{ textFixed }} @@ -141,6 +141,10 @@ export default { textFixed: { default: null, type: String + }, + formatter: { + default: value => value + type: Function } }, data: () => ({