更新时间:2007-01-15 15:33:41
Widget接口
Widget
Widget接口,控件Class完全实现此接口
Methods
render(renderDom)
渲染
Parameters:
Name |
Type |
Description |
---|---|---|
renderDom |
HtmlElement | 原始html对象 |
set(name, val)
设置属性
Parameters:
Name |
Type |
Description |
---|---|---|
name |
String | 属性名称 |
val |
Any | 属性值 |
get(name) →{Any}
获取属性
Parameters:
Name |
Type |
Description |
---|---|---|
name |
String | 属性名称 |
Returns:
属性值
Type Any
on(type, contextopt, callback)
绑定事件
Parameters:
Name |
Type |
Attributes | Description |
---|---|---|---|
type |
String | 事件名称 | |
context |
Object | <optional> | 上下文参数,回调函数里可用this.context获取 |
callback |
function | 回调函数 |
off(type, callback)
解绑事件
Parameters:
Name |
Type |
Description |
---|---|---|
type |
String | 事件名称 |
callback |
function | 回调函数 |
doMethod(name, …arg) → {Any}
调用方法
Parameters:
Name |
Type |
Attributes | Description |
---|---|---|---|
name |
String | 方法名称 | |
arg |
Any | <repeatable> | 调用参数 |
Returns:
根据方法返回不同值
Type Any
destroy()
销毁控件