252 Unstar Star 475 Fork 257

稻米 / LigerUIJavaScript

Dialog如何构建回调函数?

Closed
QiuFW  Opened this issue

使用$.ligerDialog.open的时候怎么写回调函数,可以在Buttons里写,但是没法return,而且函数执行不阻断,无法等待Dialog关闭在返回值。

17593 ligerui 1578915163 3976 icrystal 1578914224 total 3 participants

Comments (2)

rover.lee 2014-12-23 11:05

可以写在open的data参数里加一个回调函数,在新打开的页面里直接获取data变量,返回时直接回调。

样例:

父页面open:

data: { callback:operateCallBack }

打开页面:

frameElement.dialog.get('data').callback();

17593 ligerui 1578915163
稻米 2015-07-26 09:19 owner

Status changed to closed

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
JavaScript
1
https://gitee.com/ligerui/LigerUI.git
git@gitee.com:ligerui/LigerUI.git
ligerui
LigerUI
LigerUI

Search