vue-round-slider icon indicating copy to clipboard operation
vue-round-slider copied to clipboard

TooltipFormat With Array v-model

Open recep-yildiz opened this issue 5 years ago • 2 comments

As i saw, tooltip can't be formatted with array values.

I have an array like "arr[0, 24]" (v-model="arr")

i need to format it like "0 am - 12 pm", couldn't achieve this

by the way, in events, options.value should be an object, not a string

recep-yildiz avatar Jul 28 '20 05:07 recep-yildiz

@ItStark the model supports any kind of type such as number | sting | array. Currently the array type was not defined in the props, so that it might throw the warring when set array value. That I will correct and push a new version.

And through the tooltipFormat you can achieve any custom value, here I have updated a simple demo:

https://codesandbox.io/s/dazzling-bouman-eg8dm?file=/src/components/SliderDemo.vue

Is this the expected one?

Also regarding the options.value type, commonly we maintained the string type only for the value prop. Even what kind of type you passed, it will maintain the string type only. If still you want the value as array then you can get it through a computed property. Can you give more info about your requirement, so that I can suggest a better solution or if needed ll integrate with the source. Thanks...

soundar24 avatar Jul 28 '20 19:07 soundar24

I will achieve just like you said, gonna use computed property for that.

The link you shared is just like i would like to do. Thanks so much.

recep-yildiz avatar Jul 29 '20 00:07 recep-yildiz