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

(二次开发)关于在数据模型保存时新增弹窗的问题 #21

Open
1731lin opened this issue Jan 8, 2021 · 2 comments
Open
Labels
bug Something isn't working

Comments

@1731lin
Copy link

1731lin commented Jan 8, 2021

Bug 描述
如何在数据模型res_datatype_create.js保存时,引入弹窗?在其他js如param_editor_core.js中点击事件可以通过new MessageBox({
data: {
}
}).$inject(document.body);引入弹窗

重现步骤

  1. 定义一个组件,类似于public\src\module\poplayer\profile_bind_layer.js
  2. 在res_datatype_create.js中引入
    NEJ.define(['pro/poplayer/messagebox'],function (message)
    创建组件
    pro.__handleSubmit = function () {
    // 正在提交当中, 不用再次提交
    if (this.__submit) {
    return;
    }
    if (this.__formObj.
    $checkValidity()) {
    this.__disableBtn(this.__formElem['save'], '提交中...', true);
    var options = this.__getSubmitOptions();
    new MessageBox({
    data: {
    }
    }).$inject(document.body);
    .......
    };
  3. bug 重现

期望结果
期望在保存后出现弹窗

截图
有截图就是最好的。
image
Uploading image.png…

软件环境

  • 操作系统及版本win10:
  • Node及版本:v10.14.2
  • 浏览器及版本:google

其他信息
其他信息可以填这里。

@1731lin 1731lin added the bug Something isn't working label Jan 8, 2021
@huntbao
Copy link
Collaborator

huntbao commented Jan 8, 2021

看着应该能弹出的,看下DOM结构元素在不在,还有样式是否写对了,即是否在当前弹窗之上

@1731lin
Copy link
Author

1731lin commented Jan 11, 2021

看着应该能弹出的,看下DOM结构元素在不在,还有样式是否写对了,即是否在当前弹窗之上

应该是$ inject(document.body);的问题,当前窗口被销毁了,然后显示不出来,如何注入他的父节点的body上

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants