forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.2 KiB
42 lines
1.2 KiB
/** |
|
* Created by Urthur on 2017/9/4. |
|
*/ |
|
Demo.Slider = BI.inherit(BI.Widget, { |
|
_defaultConfig: function () { |
|
return BI.extend(Demo.Slider.superclass._defaultConfig.apply(this, arguments), { |
|
baseCls: "demo-slider", |
|
min: 10, |
|
max: 50 |
|
}) |
|
}, |
|
_init: function () { |
|
Demo.Slider.superclass._init.apply(this, arguments); |
|
var self = this; |
|
BI.createWidget({ |
|
type: "bi.vertical_adapt", |
|
element: this, |
|
width: 100, |
|
items: [{ |
|
type: "bi.htape", |
|
items: [{ |
|
el: { |
|
type: "bi.slider", |
|
min: 16, |
|
max: 50, |
|
ref: function (_ref) { |
|
self.slider = _ref; |
|
} |
|
} |
|
}], |
|
height: 30, |
|
width: 100 |
|
}] |
|
}); |
|
this.slider.setValue("30"); |
|
|
|
this.slider.on(BI.SliderNormal.EVENT_CHANGE, function () { |
|
console.log(this.getValue()); |
|
}) |
|
} |
|
}); |
|
BI.shortcut("demo.slider", Demo.Slider); |