\FormBuilder\componentsSlider

滑块组件 Class Slider

Summary

Methods
Properties
Constants
__construct()
col()
setProps()
getProps()
value()
getValue()
getField()
getTitle()
required()
validate()
__call()
build()
()
()
()
()
()
()
()
()
()
No public properties found
No constants found
init()
setRequired()
$field
$title
$name
$props
$value
$col
$validate
$propsRule
N/A
No private methods found
No private properties found
N/A

Properties

$field

$field : String

字段名

Type

String

$title

$title : String

字段昵称

Type

String

$name

$name : string

组件名称

Type

string

$props

$props : array

组件的规则

Type

array

$value

$value : 

字段的值

Type

$col

$col : array

栅格规则

Type

array

$validate

$validate : array

字段验证规则

Type

array

$propsRule

$propsRule : array

组件属性设置规则

Type

array

Methods

__construct()

__construct(String  $field, String  $title, String  $value = null) 

FormComponentDriver constructor.

Parameters

String $field

字段名

String $title

字段昵称

String $value

字段值

col()

col(  $span) : $this

Parameters

$span

Returns

$this

setProps()

setProps(array  $props = array()) : $this

批量设置组件的规则

Parameters

array $props

Returns

$this

getProps()

getProps(  $name) : mixed|null

获取组件的规则

Parameters

$name

Returns

mixed|null

value()

value(  $value) : $this

设置组件的值

Parameters

$value

Returns

$this

getValue()

getValue() : string

获取组件的值

Returns

string

getField()

getField() : String

获取组件的字段名

Returns

String

getTitle()

getTitle() : String

设置组件的昵称

Returns

String

required()

required(boolean  $required = true) : $this

Parameters

boolean $required

Returns

$this

validate()

validate(array  $validate) : $this

添加验证规则

Parameters

array $validate

Returns

$this

__call()

__call(  $name,   $arguments) : $this

设置组件属性

Parameters

$name
$arguments

Throws

\Exception

Returns

$this

build()

build() : array

Returns

array

()

() : 

$this min(float $min) 最小值, 默认 0

Returns

()

() : 

$this max(float $max) 最大值, 默认 100

Returns

()

() : 

$this step(float $step) 步长,取值建议能被(max - min)整除, 默认 1

Returns

()

() : 

$this disabled(Boolean $bool) 是否禁用滑块, 默认 false

Returns

()

() : 

$this range(Boolean $bool) 是否开启双滑块模式, 默认

Returns

()

() : 

$this showInput(Boolean $bool) 是否显示数字输入框,仅在单滑块模式下有效, 默认 false

Returns

()

() : 

$this showStops(Boolean $bool) 是否显示间断点,建议在 step 不密集时使用, 默认 false

Returns

()

() : 

$this showTip(String $tip) 提示的显示控制,可选值为 hover(悬停,默认)、always(总是可见)、never(不可见)

Returns

()

() : 

$this inputSize(String $size) 数字输入框的尺寸,可选值为large、small、default或者不填,仅在开启 show-input 时有效

Returns

init()

init() 

组件初始化

setRequired()

setRequired(null  $message = '',   $trigger = 'change',   $type = null) : $this

设置组件的值为必填

Parameters

null $message
$trigger
$type

Returns

$this