aui / artDialog

经典的网页对话框组件

Home Page:http://aui.github.com/artDialog/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

top.dialog.getCurrent() 方法有BUG

doocal opened this issue · comments

弹2个弹窗时,第2个弹窗用 getCurrent() 获取到当前窗体对象,回传值后remove(),第1个弹窗再用 getCurrent() 就拿不到对象了(应该可以用 top.dialog.get(id) 但是每次要传id 麻烦,只要是 showModal 的弹窗应该只有一个 getCurrent() )。

弹出页面2:

var t = top.dialog.getCurrent();
t.close({id:1}).remove();


父页面,弹出页面1(他本身也是弹出窗口(showModal),等于是弹窗里面再弹窗):

top.dialog({
id: 'test-dialog',
title: 'loading..',
url: './dialog-content.html',
onclose: function () {
if (this.returnValue) {
console.log('onclose', this.returnValue);
}
}
}).show();


button 一些业务处理回传值,然后remove()(此时 getCurrent() 获取不到对象了,当前窗口应该就是自身)。

var t = top.dialog.getCurrent();
t..close({id:1,name:'test'}).remove();

这样描述不知道能不能看懂。。。。。。