Component

FineUI. Component

(abstract) new Component(options)

Description:
Parameters:
Name Type Description
options Object

初始参数

Properties
Name Type Default Description
renderTo string ''

渲染到的DOM节点

cls string ''

CSS类

disabled boolean false

是否禁用

tooltip string ''

提示信息

tooltipType string 'qtip'

提示信息类型(可选项为:qtip, title)

tooltipTitle string ''

提示信息标题(仅在 tooltipType=qtip 时有效)

tooltipHideMode string 'auto'

提示信息隐藏模式(仅在tooltipType=qtip时有效)(可选项为:auto, user)

tooltipPosition string ''

提示信息的位置(仅在tooltipType=qtip时有效)(可选项为:'', top, topstart, topend, bottom, bottomstart, bottomend, left, leftstart, leftend, right, rightstart, rightend)

hidden boolean false

是否隐藏

hiddenMode string 'display'

隐藏模式(可选项为:display, visibility, offsets)

style string | Object

CSS样式

attrs Object

节点属性

attrSelector string ''

节点属性对应的节点(默认为this.el)

width number

宽度

height number

高度

anchor string ''

锚点值(当父容器的布局为anchor时有效)

columnWidth string ''

列宽度(介于0-1的小数,比如0.25)(当父容器的布局为column时有效)

x number

绝对定位的X坐标(当父容器的布局为absolute时有效)

y number

绝对定位的Y坐标(当父容器的布局为absolute时有效)

rowspan number

表格合并行数(当父容器的布局为table时有效)

colspan number

表格合并列数(当父容器的布局为table时有效)

flex number

子控件的尺寸(当父容器的布局为vbox或者hbox时有效)

block number

块大小,超小屏幕(当父容器的布局为block时有效)

blockSM number

块大小,小屏幕(当父容器的布局为block时有效)

blockMD number

块大小,中等屏幕(当父容器的布局为block时有效)

blockLG number

块大小,大屏幕(当父容器的布局为block时有效)

listeners Object

初始事件绑定(key 为事件名,value 为回调函数;语义等价于控件创建后调用 on() 逐一绑定。详见 on() 方法的对照示例)

type string 'Component'

控件类型

Extends

Members

el :jQuery

Description:
  • 控件对应的jQuery节点对象

控件对应的jQuery节点对象

Type:
  • jQuery

Methods

getEncodedText(text) → {string}

Description:
  • 获取编码后的字符串

Parameters:
Name Type Description
text string

原始字符串

Returns:

编码后的字符串

Type
string

isType(value) → {boolean}

Description:
  • 检测当前实例是否指定的控件类型

Inherited From:
Example
grid1.isType('panel') // 返回true
grid1.isType('grid')  // 返回true
Parameters:
Name Type Description
value Object

控件类型

Returns:

如果当前实例是指定的控件类型,返回true;否则返回false

Type
boolean

Events

beforehide

Description:
  • 隐藏控件之前触发(返回false则取消隐藏操作)

beforeshow

Description:
  • 显示控件之前触发(返回false则取消显示操作)

hide

Description:
  • 隐藏控件时触发

layout

Description:
  • 布局控件时触发

remove

Description:
  • 移除控件时触发(调用 remove() 时,控件 DOM 被销毁之前触发;可用于清理外部资源 / 解绑全局事件)

render

Description:
  • 渲染控件时触发

show

Description:
  • 显示控件时触发