new CascadeSelector()
CascadeSelector 多级级联选择器
- Since:
-
- 2016/09/06
Methods
-
constructor(opt)
-
constructor 组件构造函数
Parameters:
Name Type Description opt
Object 组件配置参数 Properties
Name Type Argument Description config
Object 组件配置 Properties
Name Type Argument Description container
Dom 组件所在的容器 setContents
Array 数组中为每列元素的html片段字符串 hasDetail
boolean 是否有最后一列‘查看详情’ getRowIndex
function <optional>
获取某一列的行index,参数(data, col) animation
Boolean 是否要动画效果 data
Object 渲染所需数据 indexArr
Array <optional>
每一列默认focus在哪一行(不传根据getRowIndex获取在哪一行) nameArr
Array 下一级数据的字段名字数组 -
destroy()
-
destroy 销毁组件
-
getCurFocusNode()
-
getCurFocusNode 获取当前焦点所在的 dom 元素
Returns:
当前焦点所在的 dom 元素- Type
- DOM
-
getName()
-
getName 获取组件名称
Returns:
- Type
- String
-
hide()
-
hide 隐藏组件
-
on(event, callback)
-
on 注册事件回调函数
Parameters:
Name Type Description event
String 事件名称 ('ok', 'selectIndexChange', 'blur', 'hide') callback
function 回调函数(返回参数e, e.node dom节点, e.data 节点数据) -
reRender( [indexArr] [, data])
-
reRender 重新渲染组件
Parameters:
Name Type Argument Description indexArr
Array <optional>
每一列默认focus在哪一行 data
Object <optional>
重新渲染所需数据 -
show( [index])
-
show 显示级联选择器组件,可能会调整第一列focus所在的行
Parameters:
Name Type Argument Description index
Number <optional>
第一列focus所在行 -
un(event, callback)
-
删除注册的回调value
Parameters:
Name Type Description event
String 事件名称 callback
function 回调函数