mirror of
https://gitlab.com/wirelos/sprocket-ui.git
synced 2025-12-15 14:18:23 +01:00
copy old frontend
This commit is contained in:
25
src/app/components/base/Slider/Slider.js
Normal file
25
src/app/components/base/Slider/Slider.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import $ from 'jquery';
|
||||
import Component from '../../../core/Component';
|
||||
import markup from './Slider.html';
|
||||
|
||||
export default class Slider extends Component {
|
||||
|
||||
constructor(ctx, node, template) {
|
||||
super(ctx, node, template || markup);
|
||||
this.render(this.config);
|
||||
}
|
||||
|
||||
onChange(evt) {}
|
||||
|
||||
sliderChange(evt) {
|
||||
this.value = evt.target.value;
|
||||
this.onChange(evt);
|
||||
}
|
||||
|
||||
|
||||
subscribe() {
|
||||
this.node.delegate('input', 'input',
|
||||
this.sliderChange.bind(this));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user