HoangJK / nativescript-range-seek-bar

A NativeScript Range Seek Bar widget.
Apache License 2.0
10 stars 13 forks source link

Nativescript vue #9

Open wesley3523 opened 5 years ago

wesley3523 commented 5 years ago

I am using vue in nativescript. Can you also provide this on Nativescript Vue?

AlexBa commented 5 years ago

Same here. This would be great.

AlexBa commented 5 years ago

I found out how you can use this plugin in Vue.js

In app.ts

import { RangeSeekBar } from "nativescript-range-seek-bar/range-seek-bar";
...
Vue.registerElement('RangeSeekBar', () => RangeSeekBar);

in component.vue

<RangeSeekBar :minStartValue="(item.currentMin / item.absoluteMax) * 100" :maxStartValue="(item.currentMax / item.absoluteMax) * 100" @rangeSeekBarFinalValue="test" />

Addionally, you can't set a maxValue greater than 100 with Vue.js. So you have to convert the values into percents. Maybe it's related to this here: https://github.com/WorldDownTown/RangeSeekSlider/issues/61.

keithoys commented 3 years ago

I found out how you can use this plugin in Vue.js

In app.ts


import { RangeSeekBar } from "nativescript-range-seek-bar/range-seek-bar";
...

Hi @AlexBa I'm facing this issue:

Screenshot 2021-08-13 at 10 45 39 AM

EDIT: Confirmed it works with the following code:

Vue.registerElement('RangeSeekBar', () => require('nativescript-range-seek-bar/range-seek-bar').RangeSeekBar);