vue-custom-form/public/components/range.js
2023-08-02 23:48:08 -04:00

40 lines
383 B
JavaScript

const Range =
{
props: ["field"],
components: {
},
setup(props)
{
const value = Vue.ref(50);
Vue.watch(value, (c, _p) => {
props.field.value = c;
});
return { value };
},
template: `
<div>
Range Input!
<input
v-model="value"
type="range"
min="0"
max="100"
value="50"
step="1"
>
</div>
`
}
export default Range