Class: View

View(viewElement, viewInfo, viewScope)

new View(viewElement, viewInfo, viewScope)

视图
Parameters:
Name Type Description
viewElement Document | Element
viewInfo ViewInfo
viewScope *
Source:

Methods

$find(…args) → {jQuery}

查找标签元素,参数格式与 jQuery.find() 相同
Parameters:
Name Type Attributes Description
args any <repeatable>
Source:
Returns:
Type
jQuery

$ui(name) → {jQuery}

查找标签元素,通过 Global.config.uiNameAttributeName 指定的属性
Parameters:
Name Type Description
name string
Source:
Returns:
Type
jQuery

callService(url, dataopt, optsopt) → {AjaxResult}

调用远程接口
Parameters:
Name Type Attributes Description
url string
data * <optional>
opts * <optional>
Source:
Returns:
Type
AjaxResult

getDataModel() → {uiData.Model}

返回数据模型
Source:
Returns:
Type
uiData.Model

getUrlParam(name) → {string}

返回 URL 参数,需要服务端返回 URL 相关信息,可通过改写 ViewResponse 变更获取方式。
Parameters:
Name Type Description
name string
Source:
Returns:
Type
string

getUrlParams() → {object}

返回 URL 参数,需要服务端返回 URL 相关信息,可通过改写 ViewResponse 变更获取方式。
Source:
Returns:
Type
object

getViewElement() → {Document|Element}

返回视图元素
Source:
Returns:
Type
Document | Element

getViewInfo() → {object}

返回视图信息
Source:
Returns:
Type
object

getViewScope() → {*}

返回视图作用域
Source:
Returns:
Type
*