Methods
back()
返回
- Source:
createPage(id) → {Page}
通过ID创建Page对象
Parameters:
Name | Type | Description |
---|---|---|
id |
string |
- Source:
Returns:
- Type
- Page
executeReceiverById(id, jsonStr)
执行Receiver通过Id
Parameters:
Name | Type | Description |
---|---|---|
id |
string | |
jsonStr |
string |
- Source:
fireEvent(dom, type, params)
触发一个自定义事件
Parameters:
Name | Type | Description |
---|---|---|
dom |
HtmlElement | |
type |
string | |
params |
Object |
- Source:
getFirstId() → {string}
获取第一页真正的ID
- Source:
Returns:
- Type
- string
getFirstPage() → {Page}
获取历史记录中的栈第一个元素
- Source:
Returns:
- Type
- Page
getFirstPageId() → {string}
获取第一个页面的pageId
- Source:
Returns:
- Type
- string
getHistoryLength() → {number}
获取历史栈长度
- Source:
Returns:
- Type
- number
getId(pageId) → {string}
根据模板page的ID获取真正page的ID
注释:pageId_时间戳?parameters
Parameters:
Name | Type | Description |
---|---|---|
pageId |
string |
- Source:
Returns:
- Type
- string
getLastPage() → {Page}
获取历史记录中的栈顶的元素
- Source:
Returns:
- Type
- Page
getPageById(id) → {Page}
根据ID获取page对象
Parameters:
Name | Type | Description |
---|---|---|
id |
string |
- Source:
Returns:
- Type
- Page
getPageByIndex(index) → {Page}
根据索引获取page对象
Parameters:
Name | Type | Description |
---|---|---|
index |
string |
- Source:
Returns:
- Type
- Page
getPageIdByHash() → {string}
通过hash值获取pageId
例子: "#info_1541214530597?id=1"
- Source:
Returns:
- Type
- string
getParameter() → {Object}
获取转场的参数
- Source:
Returns:
- Type
- Object
getParameterByHash() → {string}
通过hash获取参数Parameter
- Source:
Returns:
- Type
- string
getRequest(page) → {Object}
获取父窗体的setRequest的值
Parameters:
Name | Type | Description |
---|---|---|
page |
Page |
- Source:
Returns:
- Type
- Object
getSingleInstance(pageId) → {Page}
根据pageId获取单例对象
Parameters:
Name | Type | Description |
---|---|---|
pageId |
string |
- Source:
Returns:
- Type
- Page
getTemplateConfig(pageId, attr) → {Object}
获取模板的属性
Parameters:
Name | Type | Description |
---|---|---|
pageId |
string | |
attr |
string |
- Source:
Returns:
- Type
- Object
indexOfById(id) → {number}
根据id获取索引
Parameters:
Name | Type | Description |
---|---|---|
id |
string |
- Source:
Returns:
- Type
- number
preload(pageDom) → {Promise}
预加载pageDom中所有要预加载的页面
Parameters:
Name | Type | Description |
---|---|---|
pageDom |
HtmlElement |
- Source:
Returns:
- Type
- Promise
registerReceiver()
注册Receiver对象
- Source:
sendBroadcast(intent)
发送无序广播
Parameters:
Name | Type | Description |
---|---|---|
intent |
Object | { action:[string] action categorys:[array] 分类 bundle:Object 参数 } |
- Source:
sendOrderedBroadcast(intent)
发送有序广播
Parameters:
Name | Type | Description |
---|---|---|
intent |
Object | { action:[string] action categorys:[array] 分类 bundle:Object 参数 } |
- Source:
startPage(pageId, option)
页面跳转
Parameters:
Name | Type | Description |
---|---|---|
pageId |
string | (pageId = pageId + params) 如: page1?a=1&b=2; |
option |
Object | { reload : [true | false] } |
- Source:
unregisterReceiver()
解除注册Receiver对象
- Source:
unregisterReceiverByDom(el)
解除注册通过Page中的Dom
Parameters:
Name | Type | Description |
---|---|---|
el |
HtmlElement |
- Source: