G
G
GreenMan18992018-03-24 09:38:56
JavaScript
GreenMan1899, 2018-03-24 09:38:56

How to bind reactive form data output via v-model using jquery-ui?

I created the simplest calculator on Vue.js
https://codepen.io/danilst/pen/KovqZE?editors=1011

But I haven’t figured out yet whether it’s possible to somehow just link the jquery-ui slider with the v-model attribute, because . jq-ui slider doesn't use inputs:
<div id="slider"></div>

$( function() {
    $( "#slider" ).slider();
} );

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2018-03-24
@GreenMan1899

You need to make a custom component with v-model
https://ru.vuejs.org/v2/guide/components.html#%D0%...
Draw your slider inside.
You make the property valid value
When you change its value, you call this.$emit('input', this.value)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question