Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

嵌套调用artDialog时,数据无法穿透 #354

Open
RainyGao-GitHub opened this issue Jun 1, 2021 · 1 comment
Open

嵌套调用artDialog时,数据无法穿透 #354

RainyGao-GitHub opened this issue Jun 1, 2021 · 1 comment

Comments

@RainyGao-GitHub
Copy link

No description provided.

@RainyGao-GitHub
Copy link
Author

  1. 版本: artDialog版本:7.0.1

  2. 重现步骤:
    在用artDialog打开的对话框页面里,再次调用artDialog打开另外一个页面

  3. 现象
    嵌套调用artDialog时,对话框可以显示,但数据无法穿透(第二次调用获取到的dialog和data都是undefined)

  4. 问题分析
    var artdialog = top.dialog.get(window)
    输入数据window是正确的,但window里的dialog和data是undefined,所以应该是第二层调用artDialog时存在bug,导致没有正确传入dialog和data数据

  5. 代码调用流程
    (1)在project.html中第一次调用artDialog显示对话框
    function showZipInArtDialog(docInfo)
    {
    var d = dialog({
    id: "ZipViewer" + docInfo.docId,
    title: docInfo.name,
    url: 'zipViewerForArt.html',
    msg: '页面正在加载,请稍等...',
    data: docInfo,
    });
    d.show();
    }
    此时在zipViewerForArt.htm中通过以下代码能够获取到dialog和dialog的data:
    var artDialog = top.dialog.get(window);
    var docInfo = artDialog.data;

(2)然后在zipViewerForArt.htm中再次调用artDialog创建对话框
function showTextInArtDialog(docInfo)
{
var d = dialog({
id: "TextEditor" + docInfo.docId,
title: docInfo.name,
url: 'textEditorForArt.html',
msg: '页面正在加载,请稍等...',
data: docInfo,
});
d.show();
}
此时在textEditorForArt.htm中通过以下代码无法获取到dialog和dialog的data(全都是undefined):
var artDialog = top.dialog.get(window);
var docInfo = artDialog.data;

@RainyGao-GitHub RainyGao-GitHub changed the title artDialog里面的页面无法再打开artDialog 嵌套调用artDialog时,数据无法穿透 Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant