示例

基本形式

<div><jr-slider min={0} max={100}/></div>
<div><jr-slider min={0} max={100} showTips={false}/></div>
let component = new JRUI.Component({
template: template
});

自定义宽度和长度

<div><jr-slider min={0} max={200} width={300} height={10}/></div>
<div><jr-slider min={0} max={200} width={400} height={15}/></div>
<div><jr-slider min={0} max={200} width={350} height={20}/></div>
let component = new JRUI.Component({
template: template
});

是否显示输入框

<jr-slider min={0} max={200} showInput={true}/>
let component = new JRUI.Component({
template: template
});

滑块是否有跳跃

<div><jr-slider min={0} max={200} step={25} showInput={true}/></div>
<div><jr-slider min={0} max={200} step={25} showStep={true} showInput={true}/></div>
let component = new JRUI.Component({
template: template
});

禁用,只读

<div><jr-slider min={0} max={200} step={25} disabled={true} showStep={true} showInput={true}/></div>
<div><jr-slider min={0} max={200} step={25} readonly={true} showStep={true} showInput={true}/></div>
let component = new JRUI.Component({
template: template
});

API

Classes

JRSliderComponent

Constants

Component

JRSlider 滑动条

Functions

config()

JRSlider ⇐ Component

Kind: global class
Extends: Component

new JRSlider()

Param Type Default Description
[options.data] Object = 绑定属性
[options.data.value] number 0 <=> 数值
[options.data.min] number 0 <=> 最小值
[options.data.max] number 100 <=> 最大值
[options.data.width] number 250 <=> 宽度
[options.data.height] number 10 <=> 高度
[options.data.step] number 1 <=> 间隔
[options.data.showStep] boolean false <=> 是否显示间隔
[options.data.showInput] boolean false <=> 是否显示输入框
[options.data.showTips] boolean true => 是否显示tips
[options.data.readonly] boolean => 是否只读
[options.data.disabled] boolean => 是否禁用
[options.data.visible] boolean => 是否显示
[options.data.class] string => 补充class

Component


JRSlider 滑动条

Kind: global constant

config()

Kind: global function
Access: protected